菜鸟教程小白 发表于 2022-12-12 09:08:47

ios - Watchkit 应用程序无法仅在 ipad 上启动


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

<blockquote>
<p>2.3 Details</p>

<p>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.</p>

<p>Next Steps</p>

<p>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.</p>
</blockquote>

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

<pre><code>Oct2 11:32:04 exploiter.local com.apple.dt.Xcode &lt;Error&gt;: Error

Domain=LaunchServicesError Code=0
&#34;The operation couldn’t be completed. (LaunchServicesError error 0.)&#34; 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.}
</code></pre>

<p>有人见过这个问题吗?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>我相信这会对某人有所帮助,因为我认为这是一个 xcode 错误。</p>

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

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

<p>此外,如果在删除值后您在该屏幕上看到警告,您可以忽略它。该应用将毫无问题地部署和安装。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - Watchkit 应用程序无法仅在 ipad 上启动,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/32911035/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/32911035/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - Watchkit 应用程序无法仅在 ipad 上启动