How to launch system apps in an iOS Xcode UI test case

Xcode 9

Here's the solution using Xcode 9

let messageApp = XCUIApplication(bundleIdentifier: "")

You can find a list of bundle identifier for the system apps in this post

Xcode 8

For Xcode 8 it's a little bit more complicated In order to launch an application from the Springboard you need to import the following headers

Then use the following (for example with Health)


@interface Springboard : NSObject

+ (void)launchHealth;


@implementation Springboard

+ (void)launchHealth
    XCUIApplication *springboard = [[XCUIApplication alloc] initPrivateWithPath:nil bundleID:@""];
    [springboard resolve];

    XCUIElement *icon = springboard.icons[@"Health"];

    if (icon.exists) {
        [icon tap];

        // To query elements in the Health app
        XCUIApplication *health = [[XCUIApplication alloc] initPrivateWithPath:nil bundleID:@""];



class Springboard {
    static let springboard = XCUIApplication(privateWithPath: nil, bundleID: "")

    class func launchHealth() {


        let icon = springboard.icons["Health"]
        if icon.exists {

            // To query elements in the Health app
            let health = XCUIApplication(privateWithPath: nil, bundleID: "")

Swift 4

let app = XCUIApplication(bundleIdentifier: "")