Add mobileprovision file to Xcode - ios

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.

Related

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.

How to see the downloaded provisioning profile in xcode 8.3.2?

How to see the downloaded provisioning profile in xcode 8.3.2? Previously there was a see details button for every added team in xcode. Now I can see a manage certificate button which will list all certificates. Where can I see the downloaded profiles? Is there any way to see the profiles inside xcode? I know we can goto ~Library/MobileDevice/Provisioning Profiles folder and check this.
In Xcode 8.3.2 you can only see the name of the profile and created and expiry date.Project Settings > Select Target In signing section press the icon in front of the Provisioning Profile.
If you just wan't to know that latest profile profile has been download or not. See this https://stackoverflow.com/a/44061528/1825618

The application does not have a valid signature Xcode 7.3

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!

ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."

When I upload to Application Loader I receive the following message:
ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."
I have this contained in my app folder. When I compress no matter how obvious I make the provisioning profile, I receive this error trying to upload my app for Apple.
If you are using Ionic / Cordova like I am see this announcement...
https://github.com/apache/cordova-ios/issues/407
It's just one setting, then re-run your Archive to Submit to the Apple Store like normal.
Go to "File" > "Project Settings..."
then select "Legacy Build System"
To upload a archive to AppStoreConnect I had to change the default build system in xcode10 within "File > Project / Workspace Settings" and change it to the Legacy Build system.
This worked for me
Access https://developer.apple.com/account
1 - Certificates, IDs & Profiles
2 - Provisioning Profiles
3 - Distribution
4 - Add Button
5 - Distribution -> App Store -> Continue
6 - Choose Apple Id -> Continue
7 - Select certificates -> Continue
8 - Set Profile Name -> Continue
9 - Download
10 - In Xcode -> Product -> Archive, In Re-sign "App Name" make option Manually manage signing -> choose the Distribution certificate and import your provisioning profile downloaded on step 9.
Sorry for my English, I'm from Brazil
If you submit your build to the AppStore in an IPA archive format (example: Game.ipa), make sure that the Payload folder is at the root of the archive, otherwise you'll get the error: Missing Provisioning Profile - - Apps must contain a provisioning profile in a file named embedded.mobileprovision.
in .plist add
Application requires iPhone environment , Yes !
I tested this , really worked !
I've faced same problem and solved by following below points.
For our clarification, please re-download your distribution provisional profile.
Please make sure you are generating ipa by setting "Generic iOS Device" in xcode.
Clean and build your project.
Place your product file in "Payload" folder and compress this folder and change .zip to .ipa
Now upload your ipa. It worked for me.
Hope this helps.
For those that are using the command line to build, and were using the flag (UseModernBuildSystem=0) to avoid this problem, seems that since the release of package cordova-ios 5.0.0, it's no longer needed. So if you update your Ionic / Cordova App dependency, will work normally.
I can confirm your solution works. To summarize the hacks so far:
1. While building, we need to do (if using ionic) ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
2. When you open it in Xcode, you can continue using "Automatic Sign" for the project, but when you upload the archive to App Store (for TestFlight or App Store) , you need to select "manually manage signing". When you select manual signing you will see there is no associated provisioning profile (huh...) so select one, and the right distribution profile.
I've managed to upload and distribute successfullly.
To locate the embedded provisioning profile in the app binary:
In Xcode, select your project in the project navigator.
Click the disclosure triangle next to the project to reveal the contents.
Click the disclosure triangle next to Products to reveal the binary.
Control-click the binary file, and choose “Show in Finder” from the shortcut menu to go to the Xcode build location in the Finder.
In the Finder, Control-click the binary file, and choose Show Package Contents from the shortcut menu.
For iOS apps, a provisioning profile called embedded.mobileprovision appears in the Finder window.
For Mac apps, the embedded file is called embedded.provisionprofile.
To verify the entitlements of the embedded provisioning profile
Launch Terminal (located in /Applications/Utilities), and enter this text (do not press Return):
security cms -D -i
In the Finder, drag the provisioning profile in the app binary to Terminal.
Press Return.
This command outputs a property list in XML format.
If you don't have an embedded.mobileprovision file, that seems to be the problem and you probably did not build the app properly for app store distribution.
I redid the 'Upload to App XStore..." and it worked the second time.

Provisioning Profile Issue in Xcode 6 (duplicate)

I have been working on iPhone application development when i try to use my already existing provisioning profile that is working well in Xcode 5 will misbehave.
My development provisioning profile replace with production and it will automatically chose Xc:....
type provisioning profile
and also become production release.
Any Idea what is going on?
Go to Apple Developer Page and find the distribution provisioning profile you want to use.
Select it, click Edit, re-name the profile, and click Generate.
Download the provisioning profile to the Desktop and drag it onto the Xcode 6 icon.
Re-start Xcode 6.
Open the organizer window and click Submit on the archive you built. Xcode will automatically pick your explicit profile instead of the generic one.
Download the iPhone Configuration Utility:
http://support.apple.com/kb/DL1465
Close xCode.
Open iPhone Configuration Utility and click on Provisioning Profiles on the left side.
Delete the autogenerated ones and make sure your existing one is downloaded.
Restart xCode.
When you build again, it should use your old one.

Resources