由于权限不足,代码签名无效

我试图在我的物理设备上运行一个应用程序,它开始在我的设备上构建,然后由于“无效的代码签名、不适当的权限或其配置文件没有得到用户明确的信任而崩溃。”。'

我已经将我的 iPhone 和 Xcode 更新到最新版本,试图清理 build 和编辑 run scheme build 配置为‘ Release’,并试图将我的可执行文件设置为‘ Ask On Launch’。我搜索了一个 Iphone 开发者文件的钥匙链,似乎找不到一个,但我不知道我应该做什么。

有人能帮忙吗?

32478 次浏览

The problem is that the developer is not trusted on the device. If you manually try to run the apps on the device, you will see an Untrusted Developer message.

To solve this issue on the device, go to Settings > General > Profiles or Settings > General > Device Management, depending on the device type and the iOS version. There, trust the developer and allow the apps to be run.

Please check the internet connection of the Testing IOS device, Signature verification fails if device isn't connected to Internet.

For newer versions on your iPhone (version 14+)

Settings > General > Device Management (In the VPN section past Date & Time section).
Then trust the device

Adding newer settings 2022 iPhone 15 variation. Load the app --> Next as below.

Settings > General >
VPN & Device Management > Developer App > Trust "Apple Development:....."

on your iphone, Settings > General > Profiles or Settings > General > Device Management

Developer app. (Click on) for trust.

In my case simply reconnecting the lightning cable did the job.

I had the same issue, I just

  1. Created a new Project with the sample Hello world
  2. Deployed it to the device - it was working
  3. Deployed my desired app again and it started working

I hope it helps.

If nothing works, do this,

Open XCode -> Window -> Devices & Simulators. Remove your device from that window. Reconnect the device and you will receive the trust certificate again.

This work after upgrading to iOS 15.

If you see this issue happen out of nowhere, one other possible source of the problem is a network outage.

Your device will periodically need to dial out to a service to validate the provisioning profile. I don't have details on how often this needs to happen but I do know this validation action happens during the app's startup. If your device can't connect to the internet or Apple is experiencing an outage, it can interrupt this process and produce this error.

You can check the status of Apple's services here: https://developer.apple.com/system-status/ Certificates, Identifiers & Profiles is what you want to keep an eye on.

If none of the above works and you've already trusted the developer, try 4G/5G connection instead of wifi.