OGeek|极客世界-中国程序员成长平台

标题: ios - Watchkit 应用程序无法仅在 ipad 上启动 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 09:08
标题: ios - Watchkit 应用程序无法仅在 ipad 上启动

我正在尝试向 TestFlight 提交应用,但由于这个原因被拒绝了两次:

2.3 Details

However, we attempted to review your app but were unable to install the app on iPad. The UIRequiredDeviceCapabilities key in the Info.plist is set in such a way that the app will not install on an iPad.

Next Steps

Please check the UIRequiredDeviceCapabilities key to verify that it contains only the attributes required for your app features or the attributes that must not be present on the device. Attributes specified by a dictionary should be set to true if they are required and false if they must not be present on the device.

当我尝试在 ipad 模拟器上启动应用程序时,出现错误:

Oct  2 11:32:04 exploiter.local com.apple.dt.Xcode[59574] <Error>: Error 

Domain=LaunchServicesError Code=0 
"The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x7fe30acc1950 
{Error=WatchKitTwoAppMissingExtension, ErrorDescription=WatchKit 2 app at /Users/yair/Library/Developer/CoreSimulator/Devices/1E3162E3-A525-4B7E-B36C-4EC17B4C7A96/data/Library/Caches/com.apple.mobile.installd.staging/temp.sq7Y13/extracted/MA.app/Watch/MA WatchKit App.app 
is missing its app extension.}

有人见过这个问题吗?



Best Answer-推荐答案


我相信这会对某人有所帮助,因为我认为这是一个 xcode 错误。

发生的情况是,在 Apple Watch 扩展上打开 HealthKit 功能会将值 healthkit 添加到同一目标的 UIRequiredDeviceCapabilities 数组中。

由于某种奇怪的原因,该值会阻止应用在任何 iPad 设备上正常启动。从 Apple Watch 扩展目标 plist 中手动删除 healthkit 值修复了问题并且提交成功。

此外,如果在删除值后您在该屏幕上看到警告,您可以忽略它。该应用将毫无问题地部署和安装。

关于ios - Watchkit 应用程序无法仅在 ipad 上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32911035/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4