菜鸟教程小白 发表于 2022-12-11 19:58:29

ios - 如何在不打开 Xcode 的情况下直接响应原生应用程序?


                                            <p><p>我正在尝试在我的 iPhone 中直接运行 reactnative 应用程序。
命令 <code>react-native run-ios --device "XXXX 设备"</code>
不适合我
得到。</p>

<blockquote>
<p>installing and launching your app on ***** iPhone6...
** INSTALLATION SUCCEEDED **</p>
</blockquote>

<pre><code>Unable to mount developer disk image, (Error Domain = com.apple.dtdevicekit Code = 601 &#34;Could not locate device supportfiles.&#34;
UserInfo = {
DeviceType = iPhone7,
2,
NSLocalizedDescription = Could not locate device support files.,
NSLocalizedRecoverySuggestion = This iPhone 6 is running iOS 11.3(15E216),
which may not be supported by this version of Xcode.
}) {
DeviceType = &#34;iPhone7,2&#34;;
NSLocalizedDescription = &#34;Could not locate device support files.&#34;;
NSLocalizedRecoverySuggestion = &#34;This iPhone 6 is running iOS 11.3 (15E216), which may not be supported by this version of Xcode.&#34;
}
</code></pre>

<blockquote>
<p>xcodebuild: error: Unable to find a destination matching the provided destination specifier: {
       id: 2 dcfa6f3928359203a08971f89513000a776d10f
      }</p>

<p>Unsupported device specifier option.
The device“ My Mac” does not support the following options: id
Please supply only supported device specifier options.</p>
</blockquote></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>你应该指定<code>simulator</code>参数,阅读更多<a href="https://facebook.github.io/react-native/docs/running-on-simulator-ios" rel="noreferrer noopener nofollow">Running On Simulator</a> </p>

<pre><code>react-native run-ios --simulator=&#34;iPhone X&#34;
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在不打开 Xcode 的情况下直接响应原生应用程序?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/49630277/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/49630277/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在不打开 Xcode 的情况下直接响应原生应用程序?