ios Xcode“无法启动”。仅将“安全”报告为错误

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

Xcode "Could not launch". Only reports "Security" as error

iosxcode5enterprise

提问by GusOst

I've edited the app name out. Other than that the dialog is exactly like this. I'm developing an enterprise app and I've tried restarting xcode and the iPhone I'm developing on. No change. Anyone encountered this? Are there any log posts that could point me in the right direction or get me more details. There is nothing in the regular log from what I can see.

我已经编辑了应用程序名称。除此之外,对话框完全是这样的。我正在开发一个企业应用程序,我尝试重新启动 xcode 和我正在开发的 iPhone。没变。有人遇到过这个吗?是否有任何日志帖子可以为我指明正确的方向或让我了解更多详细信息。从我所看到的,常规日志中没有任何内容。

Could not launch

无法启动

Update

更新

Found this in the device log:

在设备日志中找到了这个:

<Warning>: Unable to launch com.bundleID.etc because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.

<Warning>: Unable to launch com.bundleID.etc because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.

Which is a bit weird since it worked yesterday and all profiles etc. were issued a week ago.

这有点奇怪,因为它昨天有效并且所有配置文件等都是在一周前发布的。

回答by GusOst

Apparently after upgrading the OS and such you must manually launch the app on the device and say that you trust the developer of the software.

显然,在升级操作系统后,您必须在设备上手动启动该应用程序,并表示您信任该软件的开发人员。

That error message disappeared now.

该错误消息现在消失了。

回答by Mark Struzinski

I had the problem of not having the app on my device, so I couldn't manually launch it to accept the prompt. For me, I got this to work after deleting all expired provisioning profiles from my device, which forced Xcode to install a new one.

我的设备上没有应用程序的问题,所以我无法手动启动它来接受提示。对我来说,在从我的设备中删除所有过期的配置文件后,我得到了这个工作,这迫使 Xcode 安装一个新的。

After this, I was able to get my app to run.

在此之后,我能够让我的应用程序运行。

回答by CMash

I just got this issue running on an iOS 8 device for the first time as it required me to launch manually on the device (it copies it fine but doesn't launch it) and then state that I trust the developer.

我第一次在 iOS 8 设备上运行了这个问题,因为它要求我在设备上手动启动(它可以很好地复制它但没有启动它),然后声明我信任开发人员。

回答by BillyRayCyrus

If you sign the app with Enterprise provisioning you will get this error. It will still install the app on your phone, but apparently you cannot debug an app signed this way. You must either sign the app with Developer provisioning or manually launch the app in the phone.

如果您使用 Enterprise Provisioning 签署应用程序,您将收到此错误。它仍会在您的手机上安装该应用程序,但显然您无法调试以这种方式签名的应用程序。您必须使用开发人员配置对应用程序进行签名,或者在手机中手动启动应用程序。

回答by Ahmet Kazim Günay

I had the same issue solved like this:

我有同样的问题是这样解决的:

It can be happen because your developer profile is not assigned as TRUSTED in your phone or watchos settings.

这可能是因为您的开发者资料在您的手机或 watchos 设置中没有被指定为“受信任”。

You can set your profile as TRUSTED as below:

您可以将您的个人资料设置为受信任,如下所示:

  • Go to Settings,
  • Profile
  • Assign your profile as Trusted there.
  • 前往设置,
  • 轮廓
  • 在那里将您的个人资料指定为受信任。

回答by u84six

Using xcode 7 with an iOS device running version 9.2, I had to:

在运行 9.2 版的 iOS 设备上使用 xcode 7,我必须:

  1. Open 'Settings'
  2. Tap 'General'
  3. Tap 'Device Management'
  4. Tap 'Developer App' that's in the list
  5. Tap 'Trust (developer name)'
  6. Tap 'Trust' in the popup
  1. 打开设置'
  2. 点按“通用”
  3. 点击“设备管理”
  4. 点击列表中的“开发者应用”
  5. 点击“信任(开发者名称)”
  6. 在弹出窗口中点击“信任”

The app should load and launch when you run xcode.

当您运行 xcode 时,应用程序应该加载并启动。

回答by Sveta

  1. Choose Window->Devices.
  2. Right click on the device in left column, choose "Show Provisioning Profiles".
  3. Click on the provisioning profile in question.
  4. Press the "-" button Continue to removing all affected profiles.
  5. Re-install the app.
  1. 选择窗口->设备。
  2. 右键单击左栏中的设备,选择“显示配置文件”。
  3. 单击相关的配置文件。
  4. 按“-”按钮继续删除所有受影响的配置文件。
  5. 重新安装应用程序。

回答by pkamb

To fix the process launch failed: Securityissue, tap the app icon on your iOS device after running the app via Xcode.

要解决此process launch failed: Security问题,请在通过 Xcode 运行应用程序后点击 iOS 设备上的应用程序图标。

Be sure to tap the app icon while the Xcode alert is still shown. Otherwise the app will not run.

确保在 Xcode 警报仍然显示时点击应用程序图标。否则应用程序将无法运行。

  1. Run the app via Xcode. You will see the security alert below. Do not press OK.
  1. 通过 Xcode 运行应用程序。您将在下方看到安全警报。不要按确定

Could not launch "AppName" process launch failed: Security

无法启动“AppName”进程启动失败:安全

  1. On your iOS device, tap the newly installed app icon:
  1. 在您的 iOS 设备上,点击新安装的应用程序图标:

tap the app icon on your iOS device

点击 iOS 设备上的应用程序图标

  1. After tapping the icon, you should now see an alert asking you to "Trust" the Untrusted App Developer. After doing so the app will immediately run, unconnected to the Xcode debugger.

    • If you do not see this "Trust" alert, you likely pressed "OK" in Xcode too soon. Do not press "OK" on the Xcode alertuntil aftertrusting the developer.
  1. 点击该图标后,您现在应该会看到一条警告,要求您“信任”不受信任的应用程序开发人员。这样做后,应用程序将立即运行,与 Xcode 调试器断开连接。

    • 如果您没有看到此“信任”警报,则您可能过早在 Xcode 中按了“确定”。信任开发人员之前不要在 Xcode 警报上按“确定”

Trust this developer?

相信这个开发商吗?

  1. Finally, go back and press "OK" on the Xcode alert. You will have to re-run the app to connect the running app on your iOS device to the Xcode debugger.
  1. 最后,返回并在 Xcode 警报上按“OK”。您必须重新运行应用程序才能将 iOS 设备上正在运行的应用程序连接到 Xcode 调试器。

Now press OK in Xcode.

现在在 Xcode 中按 OK。

回答by seal ag leamh

I had the same problem as above and resolved it by changing the code signing identity to iOS Developer

我遇到了与上面相同的问题,并通过将代码签名身份更改为 iOS Developer 来解决它

(I had tried all of the other steps above first)

(我首先尝试了上述所有其他步骤)

I can now run the app in xcode and see debug output

我现在可以在 xcode 中运行应用程序并查看调试输出