iOS 15 Untrusted Developer issue - xcode

I have updated recently to a new iOS 15 and after I built and run my application in Xcode, while have been logged in with a same developer account as before iOS 15 installation, I get this message:
The operation couldn’t be completed. Unable to launch com.xyz.xyz.xyz
because it has an invalid code signature, inadequate entitlements or
its profile has not been explicitly trusted by the user.
and the error log:
Could not launch “my-project0name” Domain: IDEDebugSessionErrorDomain
Code: 3 Failure Reason: The operation couldn’t be completed. Unable to
launch com.xyz.xyz.xyz because it has an invalid code signature,
inadequate entitlements or its profile has not been explicitly trusted
by the user. User Info: {
DVTRadarComponentKey = 855031;
IDERunOperationFailingWorker = DBGLLDBLauncher;
RawUnderlyingErrorMessage = "The operation couldn\U2019t be completed. Unable to launch com.xyz.xyz.xyz because it has an invalid
code signature, inadequate entitlements or its profile has not been
explicitly trusted by the user."; }
System Information
macOS Version 11.6 (Build 20G165) Xcode 13.0 (19234) (Build 13A233)
Timestamp: 2021-09-21T12:36:18+02:00
Earlier (on iOS14), this could be solved by going to:
Settings.app -> General -> Profile -> Select Profile -> Trust
But now (on iOS15) I can't actually find it at that location. How would I fix this?

From what i understand, this might be a bug connected to iOS 15 / xcode 13.
I found a solution which is to create a new Apple ID and use it to sign your app in xcode.
You can add a new team by going into "Signing & Capabilities"-tab and select "Add account" where you select a team.
Once you've done this and run the application on your device again, the option to trust the application in Settings > General > Device Management should appear!

As #ujell pointed out. The provisioning profile generated prior iOS 15 is preventing installation on the new release. Therefore, you will need to generate a new provisioning profile for your app. Try the following:
Quit Xcode
Go to the directory of cached provisioning profiles (cd
~/Library/MobileDevice/Provisioning Profiles/)
Back up the existing
files to another directory
Remove all profiles listed under
~/Library/MobileDevice/Provisioning Profiles/
Launch Xcode
Install/run the app on your device
Xcode will detect that there are no eligible profiles on your local system and request a new one during the next build to a device. The new profile will be compliance with iOS 15 provisioning.
NOTE: if it still doesn't work, then install the iOS 15.2 beta release (Build 19C5026i or later) on your device and try the steps above again.

Indeed, it looks like, the problem occurs only with IOS >hardware< real devices running >= iOS 15
I see no option in Settings allowing me to set the app dev as trusted.
This does NOT occur with my older (real) iPad Air, running with iOS 12.5. The app runs immediately without prompting for trust etc.
It also runs without problems on Xcode's simulator devices with iOS 15.
So yes, I think it is an iOS 15 and/or Xcode issue.
reported this to Apple.

Ios15 changes trusted application position to:
settings -> general -> vpn and device manage
then you can see your application under the Developer App, click it and verify it

iOS 13
in your iphone,got to
Settings -> General -> VPN and device management -> Developer app ->Trust and accept

At least my issue was the result of Apple again messing with the code signing creating a ling tail of side effects.
iOS15 code signs differentially on the "new" type of certificates.
I'm developing an app that is connection to a device via WIFI without internet connection.
The initial development was done on Xcode 13.1 and an iOS14 iPad. That worked well. As usual the iPad needed to be on a WIFI with internet connection at the first launch to verify the code signing. After that it was fine to launch the app from Xcode to the iPad while it being on the WIFI without internet connection. The app didn't need any additional code signing verification.
After updating the iPad to iOS15 every launch started to fail with the error unverified when the iPad was on WIFI without internet connection. Launching on the iPAD on WIFI with internet connection was fine.
It seems like iOS15 causes apps to verify code signing on every launch - not only the first any more.
After searching and fiddling with Provisioning Profiles for several days I found out that Apple now has two different types of certificates - an "iOS Development" certificate and a "Apple development" certificate. The latter being the "new" thing.
Deleting my automatically created certificate and creating a "new" - and then a new provisioning profile solved my problems.
My app now only needs to verify code signing at the first launch.
This fixed my code signing / developer verification issues.

iOS 15:
Settings -> General -> VPN and device manage -> business apps -> Tap on your certificate and install it.

Might be a bit late, but to anyone still searching for a solution to this problem, I finally fixed it by turning on automatic date & time settings.
On your iPhone: go to Settings  > General > Date & Time.
Then turn off and on again the "Set Automatically" setting.
For somme absurd and unknown reason that seemed to solve the problem, for me at least.
Hope it helps.
Note: I have an iPhone 7 with iOS 15.6 and i use xCode 13.4.1

Just install the Developer app on the physical host iOS device.
Go to account and signin from you developer apple id
Now under Settings > General > VPN & Device Management you'll be able to see organisations.
Trust the ones you want to
You'll now be able to open the applications signed by that organisation

Related

Unable to simulate iOS application on my device. "Unable to verify APP"

I'm trying to build and simulate my app from xcode to my device but I'm struggling with an error that always show up when I run my application.
Error:
Could not launch “AppName” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: The operation couldn’t be completed. Unable to launch org.reactjs.native.example.AppName because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.
When I tap the app button on my phone it says:
"Unable to verify app. An internet connection is required to verify the trust of the developer ... This app will not be available until verified."
I already trusted the developer on Settings > General > VPN & Device Management but even when I trust it the app still saying "Not verified"
My app runs normally on xcode simulator.
iOS version: 16.2 Xcode version: 14.1 macOS: Ventura 13.0.1
I already trusted the developer on Settings > General > VPN & Device Management but even when I trust it the app still saying "Not verified"
I've solved it. I went into ~/Library/MobileDevice/Provisioning Profiles and cleared the old profiles. At the same time I restarted my iOS device. Upon restart I was able to go to preferences, and trust the development cert, and also verify the app successfully. I was able to run it from Xcode after this.

Xcode 13 - Cannot Submit Archive - Errors occurred while locating signing assets

This issue only started after updating to Xcode 13. Never had it under 12.x and no other changes. I am tying to send an Archive to Appstore Connect for a client. I have the "App Manager" role which has always been enough for this activity. However, when trying to send or even validate in Xcode, I receive an error related to "locating signing assets" with the log indicating the following:
2021-10-02 18:18:38 +0000 [MT] Failed to locate signing assets with
errors: (
"Error Domain=DeveloperAPIServiceErrorDomain Code=5 "Communication with Apple failed."
UserInfo={IDEDistributionIssueSeverity=3,
NSLocalizedRecoverySuggestion=You are not allowed to perform this
operation. Please check with one of your Team Admins, or, if you need
further assistance, please contact Apple Developer Program Support.
https://developer.apple.com/support,
NSLocalizedDescription=Communication with Apple failed.}",
"Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'com.company.app' were found"
UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=No
profiles for 'com.company.app' were found,
NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store
provisioning profiles matching 'com.company.app'.}" )
I have tried to remove my account from Xcode and re-add, but to no effect. Again, I have had the App Manager role forever and never had a problem until upgrading to Xcode 13. I was thinking of having him elevate me to "Administrator" but that really should not be necessary. I also created a new distribution cert through Xcode (no errors there) but that didn't help either.
As an update. I went the manual route and created a profile and chose to select it manually rather than having Xcode handle it automatically. That worked. However, of course it should not have to work that way and I still don't understand why the automatic method is failing.
Anything else I can try?
It seems an Apple issue with the automatic sign-in process with Xcode 13. But maybe it's a wanted behavior for Xcode 13 using cloud base certs instead of the local ones.
Here's my story looking for a solutions for this.
I can confirm that downgrade back to Xcode 12 or switch to the manual signing way all works fine
Someone says that doing that:
Switch "automatically manage signing" in the project or re-select
Team. Make sure the changes appear in the project file:
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic;
May solve the issue, but it didn't work for me.
It seems that Xcode 13
In Xcode 13 or later, Xcode will cloud sign any apps or software for
distribution when you’re using the Xcode Organizer archive and
distribution workflow. Additional permissions are available in App
Store Connect to enable Admins and Developers to sign apps and
software with these certificates.
So I ended up enabling Access to Cloud Managed Distribution Certificate in App Store Connect -> Users and Access for my account, as Jane Doe said in this thread.
And that did solve the issue.
Here are all my references:
https://developer.apple.com/forums/thread/690763
https://developer.apple.com/forums/thread/688626
https://help.apple.com/developer-account/#/dev8e84490b9

Xamarin/XCode register provisioning profile error

I have the following problem. I'm creating Xamarin iOS application(by vs for max 2017) and during a building I have this error:
No installed provisioning profiles match the installed iOS signing
identities.
As far as I can understand the solution of this problem is connected with creating provisioning profile by xCode. But when I try to generate provisioning profile(with name testtesyui) by xCode I see this error:
Failed to create provisioning profile.
There are no devices registered in your account on the developer website.
Plug in and select a device to have Xcode register it.
No profiles for 'testtesyui' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'testtesyui'.
I don't have any real iOS device and I'm planning to use iOS emulator.
Below, I listed screnshoots from xCode ui(I've hid personal data):
xCode account settings,
xCode general settings
Could some one help with this problem? Please let me know if you need more details.
Thanks.
Updating:
I opened info.plist file in vs for mac and I saw the following:
info.plist content.
I've tried to sign in in my apple account, but in the end I saw this message:
signin. As a result, I still cannot select my team.
Could you please give advice where am I wrong?
my problem was in a solution configuration. By some reason, I tryed to build my application in Debug|iPhone mode, not in Debug|iPhoneSimulator mode.
When I switched to Debug|iPhoneSimulator mode, then the build works fine.
You need to enable automatic signing to work with simulator
Once you’ve ensured you have an Apple ID connected to Visual Studio for Mac, you’re ready to enable Automatic Signing
Steps
In your iOS project, open the Info.plist file. In the Signing section, select your team from the Team dropdown:
Then, select the Automatically manage signing  checkbox.
More Info here

Xcode 8: Your account does not have sufficient permissions to modify containers

I'm getting this error with code signing with Xcode 8:
Your account does not have sufficient permissions to modify containers
What does it want from me?
I also faced this issue in XCode 8.3.3 (8E3004b). I just went to Project Settings → Capabilities tab, then toggled iCloud off and on. Once I went back to the General tab, the errors were gone.
This seems like it may be a bug with XCode 8.
To resolve this, I unchecked the "automatically manage signing" checkbox in the of my target's General settings. I then archived my project by manually setting the provisioning profiles. After that succeeded, I went back and again checked the "automatically manage signing" checkbox and it stopped complaining with errors that made no sense.
Just had this issue with XCode 8.3.2 after we enabled iCloud Capabilities and the entitlements changed. We use automatic signing - xcode managed profile. Going into Xcode -> Preferences -> Download All Profiles wouldn't fix the problem UNTIL we temporarily made team members Admin and repeated the process. At that point XCode realized the new provisioning profile and the problem was solved.
Just goto Xcode capabilities section and see if any of the capability showing error then disable that and enable again. Then come to your Signing section in General. The issues will go now
1) Remove all automatically created provision profiles from
~/Library/MobileDevice/Provisioning Profiles/
2) In Xcode 11.1 and higher remove and add capabilities
I faced this issue in XCODE Version 8.3.3 (8E3004b). To resolve this go to project settings. In capabilities tab -> iCloud -> containers. Verify whether valid iCloud containers are selected and you have permission to access these containers. This should resolve the issue.
I was having the same problem too after I added a new device with Xcode 8.3.3 (same issue present in Xcode beta 9.0 as well). My Apple Developer account wasn't an administrator at the time either. I tried deleting my provisioning profiles and re-downloading them but that didn't work. I tried manually downloading and installing the provisioning profiles from developer.apple.com, but that didn't work either. I had my Apple Developer account made an Administrator following advice from dchappelle https://stackoverflow.com/a/43812123/5760384 and voila! The provisioning errors went away. (I'd reply to his post, but I don't have enough reputation.)
Full text of error:
Your account does not have sufficient permissions to modify
containers. Provisioning profile "myApp" doesn't include the currently
selected device "myDevice". Code signing is required for product type
'Application' in SDK 10.3
Another potential solution, depending on your needs, is to upgrade to the paid version of the Apple Developer Program; this gives you access to the iCloud container features. Once paid and activated (the membership application takes a few hours to go through if you're an individual... sometimes a few days if you're a business) you'll need to enable iCloud features via the online dashboard or via XCode as per Apple's instructions. You may then have to restart XCode.
I had the same issue with Xcode 9.2. But in my case, the problem was in Keychain: my dev certificate was saved into login keychain by default. I was able to build an app on a device only when I moved it to System keychain.
So the steps are next:
Open Keychain Access
Open login keychain (you can see the list of all keychains on the left top corner of the window)
Drag and drop your dev/distribution certificate into System keychain
You may need to input password.
PS: while doing this steps you also may need to unlock locks on the keychains.
I had this problem and I fixed it by logging in to the iTunes development portal and accepted the new Terms & Conditions. I was basically locked out until these were accepted.
I was getting this error because I was in another team (my university team account), which was severely limiting my access to developer.apple.com features. Once I left that team (I added an answers here because even this was a bit of a pain), I was able to remove & re-add my account to XCode. It then worked.
EDIT: It happened again on a new machine (an M1 mac), and this time I had left the university account. By removing and adding back "Apple Pay" capability in Signing & Capabilities, it immediately fixed itself.
None of the other answers worked for me. E.g. The app doesn't even use iCloud, and enabling-disabling it didn't help. Deleting profiles, revoking certificates, disabling/re-enabling automatically manage signing also didn't help.
Go to Xcode -> preferences -> Accounts.
Remove your Apple ID & login back. Refresh the signing in on your project target
I had the same issue using Xcode 9.3
Solution:
1 - Deselect "Automatic manage signing"
2 - Created a Provisioning profile for dev and dist and added in Keychain.
3 - Again when you come back to Sighing (debug and release) you can see your created provisioning profile in a dropdown
4 - Crate archive by selecting "Generic iOS devices" in the project schema

Permission Denied when running Mac app after upgrading to XCode 4.4

I had a working Mac application until I updated to XCode 4.4 and Mountain Lion. Now the application still compiles, but when I try to run it I get an error message.
error: failed to launch '/Users/username/James/mac/Browser/trunk/Browser/DerivedData/Browser/Build/Products/Debug/Browser.app/Contents/MacOS/Browser' -- Permission denied*
Can anybody explain why I might be getting this?
I found this on an iPhone 5 (iOS 6.0) newly set up for development. I had to manually launch the app on the phone, and it said "Are you sure you want to launch this app signed by this devloper?" Once I approved that, the "permission denied" went away and it now launches from Xcode.
Unlock the Device
Try simply unlocking your device before running on it. I was stumped by this very same issue. Upon building and running with no changes to OS, environment, code, etc., I was receiving the error.
Similar questions have been asked here and here, but were not helpful in this situation.
This is caused by an entitlement (and, presumably, having the wrong kind of certificate for it).
If you have the sandbox enabled, and try to sign with a Developer ID certificate, your application will crash on launch (as of Lion—I haven't tried this on Mountain Lion).
If you have iCloud enabled, and try to sign with a Developer ID certificate, your application will not launch at all—in Xcode, you'll get the error message in the question, and in Finder, the application will launch ever so briefly and then get SIGKILLed.
Presumably, there is a right kind of certificate with which one can sign an app in order to be able to test with a sandbox and maybe even iCloud that you can obtain if you have a Mac Developer Program membership. A Developer ID certificate is not that kind of cert.
(That solves my problem, anyway. Dennis, what kind of cert were you trying to sign with?)
Open the organizer and make sure you're mac is in developer mode.
Also check your gatekeeper settings.
The device is seeing the app as an "unauthorized app downloaded from the web" for lack of a better description. Go into Settings > Security & Privacy, and at the bottom, allow applications downloaded from Anywhere.
Throwing a few thoughts on the wall:
Are you perhaps building on an external disk? Some drives get special permissions (like the "ignore permissions" checkbox), or maybe have ACLs set in a weird way. Tried building on internal startup disk?
Are you code signing? Have you tried just turning that off, to see if there's a bug in code signing or entitlements? Not the first time a new codesign tool has a bug.
Have you tried using xcode-select and updating any command line tools that are installed to make sure they all match the version of Xcode used?
Do you have any shell script build phases or the likes that might be editing the application after it's been signed, thus breaking the signature?
Have you checked if your hard disk is full or there's a (broken?) symlink somewhere in a path, or a volume name that has been unmounted?
i am sure this is long been figured out, but I have been getting the Permission denied and it turned out I had to add my laptop to the provisioning profile. I had recently reimaged my machine and in doing so the provisioning profile was no longer valid for that machine. It worked fine until i enabled iCloud. That's when the permission denied started.
Check the organizer in XCODE, click on the devices tab and click on your machine on the left. Check to see that the UDID it shows is listed in the devices section in your mac developer portal.
The short answer is when you get this error message, there is no valid development provisioning profile in the built application.
That alone won't solve your problem! There are a number of common causes of this:
You've moved to a new machine and haven't installed the provisioning profile in Xcode. Also see below
You've moved to a new machine and it's not in developer mode OR not added to the provisioning profile
For both of these, let Xcode regenerate it, or do it yourself in the Member centre... You can validate the causes is something to do with your provisioning profile by running Console and filtering on taskgated where you can see which provisioning profile it is trying to use (it will pull the one embedded in the application first, then try to pull from any installed on the Mac).
Make sure you check in your build settings that the right one is being used for Debug builds. Simple steps that normally resolve (XCode 5)
Go to member centre and create a new development profile
Select the app and certificate
Validate that the machine you are using is in the list of machines to be included in the profile, tick the box
Generate the certificate
Download it, and drag it over the Xcode icon in the doc
Go to the Build Settings tab in your target and set the provisioning profile to the one you've just downloaded
You haven't configured your iCloud/APN/GameCenter entitlements correctly.

Resources