-1

I am a Swift learner and I need to test my apps on my iPhone 11. I have the 16.0.2 version of iOS. So, I click on the "run" button on Xcode and build it. But I saw an error on Xcode which says:

"Could not launch “ProjectName”" and "The operation couldn’t be completed. Unable to launch com.name.ProjectName because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user."

And I saw an error on my phone says "Untrusted Developer".

I know I can allow using the app in settings but I don't want to do this every time when I want to test my app. Is there anything I can do to avoid these warnings every time I run the application?

HangarRash
  • 7,314
  • 5
  • 5
  • 32
  • Make sure your iOS project is setup with "Automatically manage signing" enabled and you select an account for the Team. This makes it a lot easier to have the provisioning profile and certificate setup. You also need a paid Apple developer account to run apps on real devices. – HangarRash Apr 06 '23 at 00:40
  • Does this answer your question? [iOS 15 Untrusted Developer issue](https://stackoverflow.com/questions/69267550/ios-15-untrusted-developer-issue) – HangarRash Apr 06 '23 at 00:41
  • @HangarRash You can run on real devices with a free developer account, but the number of devices you can register is limited to 1 and apps need to be rebuilt every 7 days – Paulw11 Apr 06 '23 at 01:43
  • @Paulw11 Thanks for the correction. It’s been a long time and I was fuzzy on that detail. – HangarRash Apr 06 '23 at 01:45
  • @HangarRash The option is enabled and the Team is also selected. But for testing, I have to go to settings from my phone and give permission every time. I just wanted to ask if we can do something to avoid this. – salavias Apr 06 '23 at 13:25

1 Answers1

0

Have you enabled: Settings -> Developer? Is your Mac trusted and paired with your device? Is code signing set to automatic?

This should work and as quoted before for testing on real device no paid account is needed.

  • Yes, this is enabled. And my Mac was trusted and paired with my phone. And code is signing set to automatic. But it is not working. I must allow it in the settings every time I run the code. – salavias Apr 10 '23 at 22:39