The application does not have a valid signature Xcode 7.3 - ios

When I run my project in simulator it works fine. But run the project in real device always gave me a app installation failed message which is:
'The application does not have a valid signature'
I have valid developer certificate, provisioning profile. I cleaned my project, removed Derived Data but nothing solved my problem yet. screenshot what I got

Go to your project build settings, look for section "Code Signing":
Make sure your (correct and valid) developer certificate is selected under "Code Signing
Identity"
Make sure "Provisioning Profile" is set to "Automatic"
See screenshot:
If still not working:
Open keychain app
Look for your developer certificate and make sure it is valid and has
no duplicates (if there are duplicates, delete and leave one valid
certificate only)
Open Xcode and go to preferences
Select "Accounts" tab
Select your Apple ID user
Double click on your team (in the bottom right side of the window)
Right click on any provision profile (bottom list)
Select "Show in finder"
Delete all files in that folder
Go back to Xcode window, and click on "Download All"
Press "Done"
Try to re-build project
If still not working, let me know.

I was with the same problem.
I installed the last update of OS X and my problem was fixed!
I hope that it can help you!

Related

Xcode Automatic sign in and provisioning profile errors

I'm trying to run my iOS app on TestFlight. the app runs on the simulator but when I connect it to my iPhone and try to run it, the ffollowing error shows up.
Automatic signing failed
Xcode failed to provision this target. Please file a bug report at https://bugreport.apple.com/ and include the Update Signing report from the Report navigator.
Provisioning profile "iOS Team Provisioning Profile: com.uditi.clima" doesn't support the Keychain Sharing capability.
Provisioning profile "iOS Team Provisioning Profile: com.uditi.clima" doesn't include the keychain-access-groups entitlement.
I tried to change my bundle identifier. I am new to iOS Dev and not sure how things work. error screenshot
I switched on keychain sharing but an error appears - Automatic sign in failed
Thanks!
This is due to some certification issues over at Apple, but in the meantime here's a workaround:
Open the project in Xcode. Select the project from the Project Navigator, then select your Target from the column.
Click on the General tab, and under the Signing section, enable "Automatically manage signing".
Next, click on the Capabilities tab and make sure both "Keychain Sharing" and "App Groups" are switched to "On". Ignore any error messages.
An entitlements file will be generated in the Project Navigator. The file is recognizable by its extension .entitlements.
Move the .entitlements file to the root folder by dragging it until it's right underneath the project file.
Now, back in the "Capabilities" tab, turn off "Keychain Sharing" and "App Groups". Ignore any error messages.
Select the project and go to its "Build Settings" tab. Directly beneath the tab, select both "All" and "Combined". Scroll down (or use the search, upper right) to find the "Code Signing Identity" section and change all of the options to iOS Developer.
Next, scroll to (or search for) the "Code Signing Entitlements" section. Double click the text field next to "Code Signing Entitlements" and type in the entire name of the .entitlements file you moved before. For example, HelloWorld.entitlements.
This should solve the provisioning error until Apple addresses these certification issues.
Just change Trust to System default on Developer ID Certification Authority
if u want to use your m1 mac as phone:
Are you maybe running Xcode in Rosetta mode? I had this issue, exactly as mentioned above. To fix this I closed Xcode, turned off Rosetta and it's now working as expected.
https://developer.apple.com/forums/thread/676083
Recently I faced the exact same problem,
Searched a lot with no success on the way others suggested.
I have found a work around by just removing every single capability below signing... like app group, network extension, keychain sharing, etc... I just remove everything below signing and then add them again right away then all error gone with a successful build.
Reboot of my laptop fixed the problem

Xcode Failed to load profile

My Xcode suddenly got a weird issue that there's some provisioning profiles I couldn't download or even import them manually. Got an error message all the time.
I tried to uninstall and reinstall Xcode again, and still got the problem. Also, I manually copied the profile into ~Library/Mobile Device/Provisioning Profiles folder, and my Xcode wouldn't recognize it.
Have anyone seen the issue before? Please don't ask me to delete and re-create the profile as it's a company provisioning profile, and it worked on my colleagues' computer.
Just recognize I was able to load or install all distribution profiles, all development profiles got the issue.
Here are a few checks I go through when I get anomalous behavior from Xcode with respect to development provisioning profiles.
Check to ensure that you have selected the correct Apple ID and correct Team by clicking Xcode > Preferences > Accounts > select the correct Apple ID on the left-hand side of the panel, and select the correct Team at the lower-right hand side of the panel
Check to ensure that you have installed the necessary components for Xcode by clicking Xcode > Preferences > Components > ensure the correct Toolchain is selected, then > Check and Install Now
Download the provisioning profile manually from the Apple Developer Portal, then drag-and-drop it onto your Xcode dock icon.
Open your project in Xcode and click on the project icon in Project navigator > Build Settings > scroll down to Code Signing Identity > ensure is set to iOS Developer
While still in Build Settings, scroll down to Provisioning Profile > ensure the name of the profile you expect is selected or that it is set to Automatic
Try to build.
If that doesn't work, you can try altering step 4. by doing the following instead:
Make sure to not select "Automatic" for the "Provisioning Profile" field(s) in Xcode > Build Settings
Instead, set all "Provisioning Profile" fields specifically to the profile with which you are trying to build
open the Terminal app
cd to the directory of your Xcode project
cd into your Xcode project, like so: cd MyProject.xcodeproj/
cd xcuserdata
open project.pbxproj -a TextEdit
hold the "command" key and tap "F" on your keyboard
enter 'PROVISIONING_PROFILE' and press 'return'
if 1 or more results are found, ensure the value to the right of the PROVISIONING_PROFILE variable is set to the UUID of the profile you want (i.e. compare to what you see in Quick Look to ensure a match)... if 0 options are found, something else may be wrong with your xcodeproj file
the UUID should be a string (surrounded by double-quotes), e.g. PROVISIONING_PROFILE = "abcdef01-2345-6789-abcd-ef0123456789";
save the file with TextEdit and then close TextEdit
try to build again
For those who also got this issue, I was able to resolve this bug by deleting complete my XCode 9.4.1 and all local provisioning profiles, and update to latest XCode 10.0. After that, I can install and load all profiles as usual.
Kindly make sure installed mobileprovision file is valid, otherwise kindly regenerate the mobileprovision from developer.apple.com site and import it manually in xcodeproject IDE.

None of the valid provisioning profiles include the devices

I have removed some of the devices from the provisioning profile from apple portal for adhoc distribution and downloaded and installed it in xcode 6.
But upon archiving the project it shows the error for missing devices and invalid provisioning profile .
I have wasted 3-4 hours regarding this issue but found no luck.
Any kind of help would be greatly appreciated.
I just had this error as well. I am not sure if all of these steps are required, but the is exactly what I did to fix it, and it worked for me...
On the device, I removed the provisioning profile that was in General -> Profile.
In Xcode, under window tab open up the "Devices" window. (shift+cmd+2)
Choose the device and copy its identifier
Login to developer.apple.com and go to the "Certificates, Identifiers & Profiles" area
If the device in question is not registered, register it in the "Devices" area. (My device was not registered, so I registered it)
In Xcode preferences under Xcode tab, go to the Accounts tab and choose your Apple ID.
Choose the identity from the list and then hit the "View Details..." button.
Under "Signing Identities", only "iOS Development" was listed.
Click the "refresh" button on the lower-left of this details page.
I was informed that I didn't have a distribution certificate and asked if I wanted Xcode to request one for me. I chose Yes (or Request)
'iOS Distribution" then showed up also, just under the "iOS Development" entry
Hit the "Done" button
Exit from the Xcode preferences
Choose the Target for your project, then choose the "General" tab
Choose the "Team" dropdown and pick your team, even if it is already selected. This causes Xcode to refresh its info about the Team.
At this point, my warning next to "Team" went away. I then tried to run my app on the problem iOS device again and it worked as expected.
I hope that by following these steps, it will at least help you get closer to fixing your problem.
I only have this problem when archiving so I do not bother to investigate, unplug the iPhone and archiving works just fine.
In my case I needed to remove the Team ID from the bundle identifier in targets settings > General.
If you have the Team selected below this id will be added automatically.
I followed a lot of the instructions out there about resetting profiles and restarting xcode but still had no luck. Eventually I set team to 'none' and reset the build configuration as indicated here:
https://developer.apple.com/library/ios/qa/qa1814/_index.html
Bingo.
This was for a project I hadn't updated in a year or so and I had just updated to xcode 7.3.
I had a similar problem where my device was properly registered and had been working for some time before suddenly stopping. All of the provisioning profiles were up to date and I was still able to download other Xcode projects onto my device. My developer account was listed as the Team under Targets -> General -> Team but it still wouldn't work. So I switched Team to None and attempted to build the Project again. It gave me an error for not selecting a valid Team, but then an option popped up to choose one of the ones registered earlier in Accounts. I just clicked on my developer ID and that seemed to fix the problem.

Add mobileprovision file to Xcode

I know this is simple, but I've read through all the questions and there doesn't seem to be a simple answer to this.
I've created an appID. I've created a mobileprovision file, downloaded it and double clicked it and that all seems fine.
How do I get this profile though to show up in XCode? and where would it show up?
using latest version of iOS and XCode.
It's appearing, evidently it just takes time to appear.
Open Organizer in Xcode (Window -> Organizer), go to the Devices tab and select Provisioning Profiles in the left drawer. Then use the Refresh button on the bottom right.
Update 2018
From #mikeLspohn comment: Go to Window > Devices then right-click on your device and select Show Provisioning Profiles ... from there you can click on +/- to add or remove profiles -
Two steps:
First drag it onto iTunes. Dropping a .mobileProvision onto iTunes will install it in ~/Library/MobileDevice/Provisioning Profiles where it is supposed to go.
Second double-click on .mobileProvision to add it to the Xcode store.
It doesn't hurt to relaunch Xcode after that.
You can always just drag the file onto the Xcode dock icon. This will add it to Xcode's store. When your target has the correct bundle ID and you have the private key, you should be able to select the appropriate profile and signing identity in the Code Signing build settings.
In XCode 12.2, click Window in the menu > Devices and Simulators
Right click you device, and select Show Provisioning Profiles...
Then click "+" to add your .mobileprovision files.
UPDATE:
The method above added mobileprovision files and shows in Xcode UI. However, it does not add to
/Users/myusername/Library/MobileDevice/Provisioning Profiles
And when I build from Xcode, it still says the mobileprovision files are missing.
And the end, I found I only need to double click each mobileprovision file to add them under the folder of
/Users/myusername/Library/MobileDevice/Provisioning Profiles
And my Xcode has no issue building this time.
Xcode 12.3
Select your project in the navigator
Select your target
Select Signing and Capabilities
Uncheck the Automatically Manage Signing Box
You will then see a dropdown to select a provisioning profile. You can 'download' directly from Apple, assuming you've set up the profile on the developer site. Or you can 'Import' a file you've downloaded separately.
Now, check the Automatic Signing box again.
I am not sure if this is necessary, but as Hongbo Miao has pointed out, you can download the file and double click it to 'add it to the library'.
Go to http://developer.apple.com in Safari on your device and navigate to the SDK/downloads section. From that page, download the .mobileconfig file and when prompted, Install. This will allow you to install beta builds when you go to Settings -> General -> Software Update.

No identities were available - administrator request

I had problems while "archiving" my app. I think there are invalid profiles because of iPhone Update to 5.1 and XCode update to 4.2.2.
I've taken now more than 4 hours to get rid of certification issues while using this thread step by step 3 times (which costs a lot of time):
Getting "A valid signing identity matching this profile could not be found in your keychain" warning
I still have the following fault:
No identities were available
An administrator must request identities before they can be downloaded.
The "Download identities" button went back to this window after processing some seconds.
Do you know how to get out of this wood of certification documentations and solve that fault?
Visit Member Center
Go to "iOS Provisioning Portal" -> "Certificates" (Left sidebar) >> "Distribution" tab
Check field "Provisioning Profiles". If empty, next (4)
Go to "Provisioning" (Left sidebar) -> "Distribution" tab. Press "New Profile" and complete it.
Go back to (3) check the field again.
Download and "run" (double click) the new provisioning profile.
In your project's build settings select the NEW provisioning profile (it might have the same name as the old one)
In your project's build settings update your code signing identities (all of them) to the new one if there is one. (The old one was probably expired which is one of the biggest causes for the error message you saw)
Verify that your bundle ID is correct (CaSe SeNsEtIvE)
Back to XCode Organizer - Devices. Click TEAM (Left sidebar) and click "Refresh" (right-bottom). You will find XCode fetch the new profile. If new content loaded, repeat steps 6 and 7 (they will have been changed!) *If you can't find team because you are running a newer version of xCode, go to Xcode preferences (clicking "Xcode" on the mac toolbar on the top left corner of your screen) and go to account, select your team and click refresh. If new content loaded, repeat steps 6 and 7 (they will have been changed!)If you are in Preferences -> Accounts and you still can't refresh, then:
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Validate or distribute your app again. It should work.
If this didn't work then go to "TEAM" under project settings > targets and select "none"... Now that you have selected None you will need to repeat step 7 and change the code signing identities (all of them) and try archiving again.
Lastly, if none of the above worked. Simply create a new production certificate AND create a new provisioning profile with the same bundle ID. (Yes, this will work if you are updating an app that is already live). Download the cert and prov. profile and run both (double click). Now repeat step 6 and archive. This should work.
#Takoi's answer is correct. However, with my latest version of Xcode, there is no TEAM option in the Devices section of the Organizer. I had to do the following instead to refresh the credentials:
Go to Xcode->Preferences
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Hope this helps!
Make sure the bundle id in your .plist file in XCode is the same as the bundle id in itunesconnect, if it's off, it won't be able to match the archive to the profile on itunesconnect when validating/distributing.
This is a little easier now.
You go to the app itunesconnect and login
click "certificates"
Provisioning Profiles / Distribution
generate a profile,
download the profile
double click it
I am a member of 2 teams and had the same problem while uploading one of the projects.
Changing General -> Identity -> Team to None in project settings (XCode 5) allowed me to upload the application to iTunesConnect.
Screenshot is here
My certificate had expired which resulted in my provisioning profile being expired.
Once I -
Updated my certificate on the iOS web portal
Clicked Edited on the provision profile
Selected the new certificate and clicked generate
In Xcode I refreshed my provisioning profiles
Error went away
I guess it is written somewhere in the stream, I did not read all in detail. I just want to emphasise on this point:
Due to an annoying xCode behavior, once you've set up everything, you HAVE TO clean the project and Quit xCode.
Then relaunch and build. Now you know if it works or not.
It looks like you're going to have to request another developer cert. Go to the iOS dev center website and go to the provisioning portal. Click the certificates tab and follow the directions. https://developer.apple.com/ios/manage/certificates/team/howto.action
To be clear, you're problem doesnt seem to be provisioning related, it's specifically the developer cert. if you do get another cert, you'll have to create all new profiles to sign your apps with.
My bundle identifier was named differently. I had to change it from Nyquist.GasBro to com.Nyquist.GasBro which is what I had in the provisioning profile.
None of previous answers helped me, so I post my issue.
Dev Center: Certificates, Identifiers & Profiles > Provisioning Profile > Distribution
Make sure that there is a distribution provisioning profile, and App ID in it is exactly the same as Bundle ID of your app in Xcode (Project Settings > General > Identity > Bundle Identifier).
Xcode: Project Settings > Build Settings > Code Signing:
Provisioning profile - choose that Distribution provisioning profile name (not Development!)
Code Signing Identity - I choosed Automatic since I have only one.
P.S. Before doing this, I deleted all unused and expired provisioning profiles and signing identities from Dev Center and from Xcode. Then, refreshed as mentioned in other answers: Xcode: Preferences > Accounts > (my Apple ID) > View Details > Refresh.
The answer that you are looking for is that when you generate the certificate request for COMMON NAME you need to put your HUMAN NAME as in John Smith, not your app name. Apple uses this term Common Name in 2 different ways and doesn't tell you that the certificate is supposed to have your name on it whereas in another area they ask for common name and want the APP name.
I had the same problem.
Nothing mentioned on this page did not work for me until i was deleted everything from archive.
After that problem disappear.
For those who says that the Ad Hoc Distribution profile wont work this year 2014, I have to agree.
In Build Settings locate the Code Signing setting: for Release choose your Store Distribution and then select Menu>Product>Archive.
Later, in the Organizer Window, select your archive and clic in Validate. It will let you select the Ad Hoc profile and validate... then select Distribute, it will let you save as .ipa file.

Resources