Enterprise build failing on iPadOS because it cannot find watchOS

Hello there,

I am writing because our team has been dealing for a couple of weeks with some issue related to Enterprise builds.

We have a nighty build that we use for in-house manual testing. With Xcode 14, we triggered the watchOS migration to have a single target and this messed up our enterprise builds for iPadOS 15.

One of our devs cannot install the build on their iPad with the following error:

    "<LSApplicationProxy: 0x283f63260> com.companyname.ent.appname file:///private/var/containers/Bundle/Application/70487F3B-511C-4812-ACD6-DFE0F070E62A/AppName.app/ <com.companyname.ent.appname  <placeholder >:1>"
) (appInfos: (null))

error	09:56:22.478004-0800	appstored	[UPPCF61D323/com.companyname.ent.appname ] Failing installation after receiving error: Error Domain=IXUserPresentableErrorDomain Code=1 "Unable To Install "AppName"" UserInfo={NSLocalizedDescription=Unable To Install "AppName", NSLocalizedFailureReason=Please try again later., NSLocalizedRecoverySuggestion=Found WatchKit 2.0 app at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.6wkcAh/extracted/Payload/appname.app/Watch/appname-watchos.app but it does not have a WKWatchKitApp or WKApplication key set to true in its Info.plist, NSUnderlyingError=0x107d60c10 {Error Domain=MIInstallerErrorDomain Code=92 "Found WatchKit 2.0 app at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.6wkcAh/extracted/Payload/appname.app/Watch/appname-watchos.app but it does not have a WKWatchKitApp or WKApplication key set to true in its Info.plist" UserInfo={LegacyErrorString=InvalidWatchKitApp, FunctionName=-[MIExecutableBundle watchKitV2AppBundleWithError:], SourceFileLine=1833, NSLocalizedDescription=Found WatchKit 2.0 ap

error	09:56:22.516819-0800	installcoordinationd	-[IXSClientConnection _remote_createAppInstallCoordinatorWithSeed:createIfNotExisting:requireMatchingIntent:completion:]: Failed to locate an existing coordinated app install with bundle ID com.companyname.ent.appname for client appstored (pid 173)

error	09:56:22.713218-0800	appstored	Failed to set fraction completed: 0.00 for: com.companyname.ent.appname

We tried deleting the targets and manually creating a new one from scratch. We simply have no idea why iPadOS 15 is failing to install because of watchOS when it shouldn't be looking for it in the first place.

Any help to end our suffering will be greatly appreciated.

Answered by Frameworks Engineer in 739158022

Aha, thank you for the follow-up. Can you please try adding MinimumOSVersion~ipad = "9.0" to the Watch app's Info.plist? This should have been added automatically but might have been missed somehow.

This is the important part: “but it does not have a WKWatchKitApp or WKApplication key set to true in its Info.plist.” The Watch App still gets validated even when installing on iPad, and if you’ve converted to single target, it needs to have WKApplication set to true.

We actually do have the value WKApplication: true set in the watch target's Info.plist.

In addition, the application installs and works on iOS 16.1, iPad OS 16.1, and iPad OS 15.7, but it fails on iPad OS 14.8 and that's when we get this error reported.

Here's a snippet from our main app target Info.plist:

	<key>CFBundleIdentifier</key>
	<string>com.ourcompany.ent.projectname</string>
	<key>MinimumOSVersion</key>
	<string>14.0</string>

and from the watch target:

	<key>WKApplication</key>
	<true/>
	<key>CFBundleIdentifier</key>
	<string>com.ourcompany.ent.projectname.watchkitapp</string>
	<key>WKCompanionAppBundleIdentifier</key>
	<string>com.ourcompany.ent.projectname</string>
	<key>MinimumOSVersion</key>
	<string>7.0</string>

We have been shipping a watch extension for the past two years, but it's only once we migrated to Xcode 14, turned off bitcode, and created a new single WatchKit 2.0 target (replacing the old WatchKit 1.0 extension) that this error arose.

As @CannedMango said, those are the values we have and we do not have any idea why this started happening.

We do not know of this happening on App Store builds, just enterprise ones. Could this be because App Store builds are sliced while enterprise ones aren't?

Accepted Answer

Aha, thank you for the follow-up. Can you please try adding MinimumOSVersion~ipad = "9.0" to the Watch app's Info.plist? This should have been added automatically but might have been missed somehow.

Hi, thanks for your prompt response.

It looks like that was the issue, and now we our install on iOS 14 is working.

To answer your question, we are passing in a manual plist file (we run a manual hash check on the bundle, so we need it pre-generated) that we moved over from the old WatchKit 1.0 extension, and we might have missed that property ourselves.

Ah, that explains it! Not a property you probably would have thought to add. :-) Glad it’s working now!

Thank you very much! This thing had been bugging us for weeks at this point

Enterprise build failing on iPadOS because it cannot find watchOS
 
 
Q