Creates a proxy for an application associated with the specified bundle identifier.
- Xcode 9.0+
Although every app has an unique bundle ID, there are times when XCTest needs to decide which particular build of an app to use for testing. On macOS, multiple builds of the same app can exist on a single device. On iOS and tvOS, a build of the app may need to be copied onto the device for testing. In both cases, XCTest detects a matching build to use in the following order, based on the current test scheme selected in Xcode.
Any matching build in the "Target Dependencies" list of a test target built by the test scheme.
Any matching build from the "Targets" list of the test scheme's "Build" action.
Any matching build from the root level of the test target's Build Products folder.
For iOS and tvOS apps, the matching app build (if found) is installed onto the device and launched. If no matching app is found, the device's existing installed app for the requested bundle ID is launched.
For macOS apps, the matching app build (if found) is launched from its existing location. If no matching app build is found, the default app build on the device for the requested bundle ID (as determined by Launch Services) is launched.