[iOS] Unable to maintain developer trust settings between tests

If ‘fullReset’: False, the app is uninstalled before each test and requires me go to in and manually trust the developer under “Enterprise App” in the iPhone settings (every single time).

If ‘noReset’: True, the app’s trust is maintained (because it is never uninstalled) but the app is not reset to a clean slate before each test.

Neither of these options allow me to effectively test on a real iOS device. Obviously I have to have fullReset=false, but why is trust forgotten after each test? What am I missing here?

Capabilities:

desired_capabilities={
            #
            "platformName": "iOS",
            "platformVersion": str(softwareVersion),
            "deviceName": str(deviceName),
            'udid': str(udid),
            'app': '/Users/XXX/Documents/Automation/apps/X.ipa',
            'newCommandTimeout': 5000,
            'fullReset': False,
            "automationName": "XCUITest",
            "xcodeSigningId": "iPhone Developer",
            'xcodeOrgId': "XXXXXXXXXX",
            'useNewWDA': False,
        })

The workaround I’ve found (although not ideal) is leaving a different app from the same developer installed on the device at all times, thus trust is maintained.

1 Like

This is the only workaround. Because iPhone itself says “DEVELOPER_NAME” are trusted on this iPhone and will be trusted until all apps from the developer are deleted. So you should install another app with a different bundle ID (Same bundle ID with different version won’t work) but same developer.