iOS 9 Change In Notifications Alert After Uninstall/Reinstall
We've had an ongoing problem with iOS system alerts blocking our scripts from running, such as allowing notifications, location services, camera access, etc. Our workaround prior to iOS 9 was to install the app and accept all the prompts manually once, then they wouldn't come up again when the app was uninstalled/reinstalled from our scripts because the settings were remembered on the device.
Now with iOS 9, the notification setting is not saved. This means that every time our scripts run, the notification alert comes up and blocks the rest of our tests from running (I attached a screenshot of this alert). I also found this post with more detail about what's happening: https://forums.developer.apple.com/message/50273#50273
Has anyone else run into this and come up with any solutions? We've tried tapping a specific point on the screen, which doesn't work because TestComplete doesn't see the app when these alerts are up. We can't use ImageRepositories for the same reason. We haven't found any properties or settings to set these values or disable the prompts on the device or in TestComplete. One possible solution is to not uninstall the app every time our scripts run, but we really want a clean build every time so we don't keep any bad data around. If we leave it the way it is now, we have to manually tap "OK" to this prompt when it gets to that point in the script, which prevents us from running our tests on a schedule, e.g. every night.
Any ideas would be appreciated :)
Thanks,
Corey
Found a workaround!
After installing the app and launching it, we get the Notification alert. This blocks the rest of the script from running. I noticed yesterday (by accident) that if the app is removed, installed, and launched again through our script with the alert still up, the script works! It just runs in the background behind the alert that is currently displayed.
I'm not sure why this happens, but I think we can at least run our tests now without the manual step of allowing notifications.
-Corey