iOS:如何调试“新鲜发射”来自网址的应用程式 [英] iOS: How to debug "freshly launching" an app from a URL
问题描述
从网址启动应用程式时,网址是否新鲜启动应用程式,或是是否恢复已被暂停使用的应用程式。
When launching an app from a URL, there is a distinction between whether the URL is freshly launching an app, or if it's resuming an app that has been put into a suspended state.
我的问题是,如何从URL中调试新鲜启动的过程?在Xcode中点击运行会自动打开应用程序。然后,我必须暂停应用程序到达Safari并访问我的测试站点。但是如果我关闭我的挂起的应用程序,Xcode不再附加它,我无法调试。
My question is, how do I debug the process of a "fresh launch" from a URL? Hitting "Run" in Xcode automatically opens the app. Then, I have to suspend the app to reach Safari and access my test site. But if I close my suspended app, Xcode is no longer attached to it and I'm unable to debug.
推荐答案
可以在设备上遵循。成立于此链接。
These steps can be followed on the device. Founded at this link.
- 从Xcode运行应用程序将其安装在您的设备上,然后从Xcode停止
。 - 强制从应用程序切换器中退出应用程序设备上的UI。
- 导航到Xcode中项目的方案。在运行
部分的信息选项卡下,有一个等待可执行文件
启动的单选按钮。确保这是选中,而不是
自动选项。 - 从Xcode运行应用程序。它不会在设备上打开
,但调试器将等待它打开,然后
将附加到它。
- Run the app from Xcode to install it on your device and then stop it from Xcode.
- Force quit the app from the app switcher UI on the device.
- Navigate to the scheme for the project in Xcode. Under the Run section's Info tab, there is a radio button for "Wait for executable to be launched". Make sure this is checked instead of the "Automatically" option.
- Run the app from Xcode. It will not open on the device, but the debugger will wait for it to open and then it will attach to it.
在由Marc-AlexandreBérubé建议的模拟器上。
On the emulator as suggested by Marc-Alexandre Bérubé.
- 在仿真器上运行应用程序。强制在仿真器上退出该应用程序,
- 按
cmd + shift +(命中h两次)
。 - 打开您的终端并输入此
xcrun simctl openurl启动http:// yourdomain / path
。
- Run your app on the emulator.
- Force quit the app on the emulator. Press
cmd+shift+(hit h twice)
. Swipe the app up. - Open your terminal and enter this
xcrun simctl openurl booted http://yourdomain/path
.
这篇关于iOS:如何调试“新鲜发射”来自网址的应用程式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!