I have an older phone that I would like to use for testing. It is an iPhone 6s running iOS 11.4.1
I can run my app on the device, but I can't run any unit tests. When I try, I get the following error:
dyld: could not load inserted library '__PLATFORMS__/iPhoneOS.platform/Developer/usr/lib/libXCTestBundleInject.dylib' because image not found
If I try the exact same thing on my new iPhone 11 Pro running iOS 13.2.3, I get the same error, but the tests work fine.
I've only seen this problem definitively referenced one other place: github.com/CocoaPods/CocoaPods/issues/9165
I tried added "-weak_framework XCTEST -weak-lXCTestSwiftSupport" to linker flags and "$(PLATFORM_DIR)/Developer/usr/lib" Library search path, but it didn't help. I tried cleaning the build folder, deletingn the previous app, and restarting the device. Same problem.
I guess I should have upgraded to iOS 12 when I had the chance. I didn't expect to get blocked on something like this. I would like to have some backwards compatibility. Is there any other way to upgrade an iOS13-capable device to iOS 12? I think the iPhone 6 was one of the few that is only upgradeable to iOS 12. I might be able to find one of those. Any other suggestions?
I filed a bug report (FB7488431).
Thanks. Looking at your bug report it seems to have been fixed in Xcode 11.3, which was just released. When you get time, give that a whirl and let us know how you get along.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"