7

I am currently trying running UITests where I am reinstalling the app after each test according to this answer: https://stackoverflow.com/a/36168101/13081999

I am guessing it has something to do with the new Version of Xcode 11.4 because the release notes say:

Previously, when running UI tests, the target under test was reinstalled before each test started. Starting in Xcode 11.4, the target under test is installed once per test session and device, speeding up UI tests considerably. (24776269)

I already tried using the Legacy Build System but that did not change a thing.

This is the detailed error message:

Details

Could not locate installed application Domain: com.apple.platform.iphoneos Code: -1 Recovery Suggestion: Install claimed to have succeeded, but application could not be found on device. bundleId = xx.xxxx.xxx.xx

Installed application was not present in database of installed apps after multiple lookup attempts.

Domain: com.apple.platform.iphoneos

Code: -1

System Information

macOS Version 10.15.4 (Build 19E266) Xcode 11.4 (16134)

Tried running the test on an iPad (7th Generation) iOS 13.4

JtheSaw
  • 109
  • 4

3 Answers3

0

It appears to be a bug (or feature) of Xcode 11.4, so that it may not recognise that the app has been deleted if you follow the procedure given in https://stackoverflow.com/a/36168101/13081999 ; in fact others have encountered the same type of problem, and have reported it to Apple, e.g., FB7666257.

I would suggest going back to Xcode 11.3 for now, if you need to delete the test app before each new test. Or manually delete the test app each time.

auspicious99
  • 3,902
  • 1
  • 44
  • 58
  • I already fill in a bug in Apple, right after Xcode 11.4 has been released. I also created a forum thread about it (https://forums.developer.apple.com/thread/131532). But, I haven't had any news from any of them... :/ – cesarmarch May 08 '20 at 15:44
0

This actually was a bug Apple fixed in Xcode 11.4 (According to the release notes provided on Xcode 11.4 (Testing) section). Only one application installation per test session is allowed, for faster execution of the tests.

0

Make sure you have the 'Enable UI Automation' setting enabled under the 'Developer' app in Settings. Hopefully, that solves the problem.

t.ios
  • 1,024
  • 12
  • 18