xcode 无法启动“<appName>”未能获得进程 <processNumber> 的任务?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14048051/
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-09 04:41:33  来源:igfitidea点击:

Could not launch "<appName>" failed to get the task for process <processNumber>?

xcodeios6build-error

提问by user1930959

Using Xcode 4.5.2 and building for iOS4 or newer, I get this message when building for my device (iOS 6.0.1 on 4s). I dismiss the dialog then relaunch the app on my device which seems to work. I am newer to iOS development, so I aplogize in advance if this is a silly question.

使用 Xcode 4.5.2 并为 iOS4 或更高版本构建时,我在为我的设备(iOS 6.0.1 on 4s)构建时收到此消息。我关闭对话框,然后在我的设备上重新启动似乎可以工作的应用程序。我是 iOS 开发的新手,所以如果这是一个愚蠢的问题,我提前道歉。

Thank you in advance for your help.

预先感谢您的帮助。

回答by frin

My issue was using Distribution provisioning profile for signing the app, once I made a development provisioning profile, the app installed and ran on iPhone just fine.

我的问题是使用分发配置文件对应用程序进行签名,一旦我创建了开发配置文件,该应用程序就可以在 iPhone 上安装并运行得很好。

回答by Joseph Humfrey

The answer seems to be "you need to fix your provisioning profile", but can happen for several reasons, as indicated by other answers on here.

答案似乎是“您需要修复您的配置文件”,但可能有多种原因,如此处的其他答案所示。

In my case, I hadn't added a new device to an existing developer provisioning profile, so I just re-created the profile with the new device, and it worked!

就我而言,我没有将新设备添加到现有的开发人员配置文件中,所以我只是使用新设备重新创建了配置文件,并且成功了!

回答by Fabian Guerra Soto

In my case happens all time I add a new device ID then update the provision profile, download and "install it on Xcode 5".

在我的情况下,每次我添加一个新的设备 ID 然后更新配置文件,下载并“在 Xcode 5 上安装它”时都会发生这种情况。

To fix this:

要解决此问题:

  • Go to Xcode>Preferences>Account Tab>Select Apple ID>View Details>Refresh Button (Bottom left corner).
  • Reinitiate Xcode.
  • 转到 Xcode>Preferences>Account Tab>Select Apple ID>View Details>Refresh Button(左下角)。
  • 重新启动 Xcode。

Start again the app, you will be able to test the app in the device.

再次启动该应用程序,您将能够在设备中测试该应用程序。

回答by pdschuller

Here's what my situation was and how I solved the problem:

这是我的情况以及我如何解决问题:

  • I had been running the app from Xcode to my phone and all was fine
  • I switched to a different code signing identity (I had to change the bundle name also to match)
  • I ran the app to my phone and got the error. The app would install, but not open.
  • Did a bunch of stuff like Clean, close n open Xcode; delete the app from the phone. All to no good effect.
  • 我一直在将应用程序从 Xcode 运行到我的手机上,一切都很好
  • 我切换到不同的代码签名身份(我也必须更改包名称以匹配)
  • 我将应用程序运行到我的手机上并收到错误消息。该应用程序会安装,但不会打开。
  • 做了一堆像 Clean, close n open Xcode 这样的东西;从手机中删除应用程序。都没有什么好的效果。

SOLUTION: turned the phone off n on.

解决方案:关闭手机 n 打开。

Coincidence?  I think not.   :-)

巧合?我想不是。:-)

回答by Vlad

XCode 6:

代码 6:

Just create provisioning profile for development and assing it to Project -> Build settings -> Provisioning profile

只需为开发创建配置文件并将其分配给 Project -> Build settings -> Provisioning profile

For upload you have to change provisioning profile for Distribution profile.

对于上传,您必须更改分发配置文件的配置文件。