我可以在不调试的情况下从 Xcode 运行 iPhone 应用程序吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14694441/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:43:06  来源:igfitidea点击:

Can I run an iPhone app from Xcode without debugging it?

iosxcode

提问by Greg

Is it possible to have Xcode automatically launch an app on my iOS device from Xcode 4.6 without attaching its debugger to the app? I'm working on an automated build system, so manually launching the app is not an option.

是否可以让 Xcode 在我的 iOS 设备上从 Xcode 4.6 自动启动应用程序而不将其调试器附加到应用程序?我正在开发一个自动构建系统,因此手动启动应用程序不是一种选择。

I've found Run Without Building under the Product -> Perform Action menu, but that still attaches the debugger. I can edit the scheme to make Xcode wait until the app is launched manually before attaching the debugger, but that's basically the opposite of what I want.

我在 Product -> Perform Action 菜单下找到了 Run without Building,但它仍然附加了调试器。我可以编辑方案,让 Xcode 在附加调试器之前等待应用程序手动启动,但这基本上与我想要的相反。

回答by Rob

If you want to launch an app from Xcode without launching the debugger, I would uncheck the “Debug executable” option in the Xcode scheme:

如果您想在不启动调试器的情况下从 Xcode 启动应用程序,我将取消选中 Xcode方案中的“调试可执行文件”选项:

enter image description here

在此处输入图片说明



If you want to launch an app manually, you can:

如果您想手动启动应用程序,您可以:

  • Select your device in the "scheme" dropdown;
  • Build the app (don't run);
  • Open the organizer and go to the "devices" tab;
  • Drag your app from the "Products" folder in the main Xcode project navigator to the device in the organizer window and it will be installed; and
  • You can then run the app manually from the device at that point.
  • 在“方案”下拉菜单中选择您的设备;
  • 构建应用程序(不要运行);
  • 打开管理器并转到“设备”选项卡;
  • 将您的应用程序从 Xcode 主项目导航器中的“Products”文件夹拖到管理器窗口中的设备上,它将被安装;和
  • 然后,您可以在那时从设备手动运行该应用程序。

This process can be useful when diagnosing startup performance and you want to run the app on the device completely separate from Xcode (and the debugger, if you have a debug build).

当诊断启动性能并且您希望在与 Xcode 完全分离的设备上运行应用程序(和调试器,如果您有调试版本)时,此过程非常有用。

回答by Jichao

xcode 6.3.1 enter image description here

Xcode 6.3.1 在此处输入图片说明

unselect the debug execute, then you could run without debugging.

取消选择调试执行,然后您可以在不调试的情况下运行。

回答by rooster117

Just Build and run and once it launches press stop and open the app manually. It will then be the app you built but not connected.

只需构建并运行,一旦它启动,按停止并手动打开应用程序。然后它将是您构建但未连接的应用程序。