Cannot install app via Testflight and local builds on iPadOS 14

After updating to XCode 14 and migrating our watchOS application to the new single target, we found that it is not possible anymore to deploy the application to iPads running OS version 14.X. The error (s. attached) seems to indicate that this is related to the watch application: "A WatchKit app within this app is not a valid bundle."

When trying to install through Testflight the error is simply "Unable to install". Upon locking through the device logs during testing I found out through Configurator, that a similar error message occurs there. This problem only occurs on iPads running the older OS version, newer devices are apparently not affected. Also running the app on simulator with iPadOS 14.X seems to work.

I am looking for adive on how to resolve the issue described above.

Answered by wonfr in 731419022

Unfortunately, the only solution we found is to create a new target for the watch application and migrate all the files and assets, as replacement for the automatically merged one. This seems to fix the issue on these specific devices.

Accepted Answer

Unfortunately, the only solution we found is to create a new target for the watch application and migrate all the files and assets, as replacement for the automatically merged one. This seems to fix the issue on these specific devices.

More specifically the old info.plist file seemed to be the culprit. Upon creating a new target the default build setting is that info.plist is automatically generated. When trying to re-use the old info.plist the error would occur, even with the new target. —  wonfr

Thanks to wonfr note, we found that the only action you need is to add MinimumOSVersion~ipad key to the Watch App target plist. You can put there your iOS deployment target version to be consistent with other settings. Alternatively, you can bump your Watch App deployment target to a higher value,

My guess is that old iPadOS is unaware of such bundle types, and is trying to verify it as iOS/iPadOS bundle. The system checks for MinimumOSVersion key, but in Watch App plist there is watchOS version instead. In our case, it was 7.0, which is considered a wrong value for iOS apps (9.0 is the minimal AFAIK).

Note that even if you didn't add MinimumOSVersion, the Xcode would add it to the app bundle using the value from build settings. That's why we should use ~ipad modifier: to allow storing actual value for watchOS, but overriding it for iPads.

Thanks Ixbndr! I had found that setting my watch app and WatchKit app extension deployment targets to 9.0 solved the issue, but I wanted to support watchOS 8.0. Your solution worked for me.

Cannot install app via Testflight and local builds on iPadOS 14
 
 
Q