Xcode couldn't find any iOS App Store Provisioning Profiles - ios

I'm using a beta of Xcode 9. I've archived my iOS Project and whenever I try to validate it, I get this error for every one of the targets in my app:
And I'm getting this error for every target like I said. The provisioning profile for each of the targets is an Xcode Managed Profile. What am I doing wrong?

You should try two options:
1) In Developer.Apple.com create a distribution provisioning profile, download it, and select it. Then re-archive your project and validate. This should dismiss the error.
2) If option 1 doesn't work for you, click the Export button beside archive and save your .app file to your Desktop. Then open Application Loader (In Xcode, click Xcode > Open Developer Tool > Application Loader). Enter your credentials, then upload the app using the .app file you generated and saved to your Desktop.
Note: Sometimes Xcode shows fake errors when validating and Application Loader will ignore those and allow you to upload a build successfully.
When Application Loader is finished, you should then be able to see your build in iTunesConnect after about 15-30 minutes.

It happened to me when I wanted to make an enterprise build but I accidentally selected to upload build to App Store.

Mine worked on a simple second attempt with no changes or rebuild.

Related

Xcode: Product archive is not appearing under the archive section for uploading the app to App store

I am building and archiving an app to upload it to the App store. I could build and archive the app in the Xcode. But the archive is not appearing in the list. Following is what I have done so far.
I have the set the version and build number under the General tab.
Then I have also set up the Team and app identifier and other information required under the Signing & Capabilities tab.
Then I set the Generic IOS device for Simulator.
Then I archive the app.
The build was successful without any issue. But when I go to the Window -> Organiser, I cannot find the archive as follow. There is no archive for the app at all.
I looked up for the solution and I tried setting the Skip install to NO as follow and archived again.
Still, the archive is not appearing. It is working for the other app. Not for this app. What could be the possible reason and how can I fix it?
I have found the problem. After setting the Skip install options, I needed to restart the XCode.
It's possible that Spotlight has not indexed the archive. Look to see if the archive is on the filesystem and then open it from the command line:
open ~/Library/Developer/Xcode/Archives/2020-11-04/appname\ 11-4-20,\ 12.48 PM.xcarchive
The open command will cause archive to be opened by Xcode Organizer.
If it still isn't showing, but the archive is definitely on the filesystem, look at Products directory inside the archive. There should only be a single product, which is in Applications/yourapp.app. If there is more than one thing under Products then you will need to figure out what else is there and stop it from being copied there during the archive process. Many times it will be some other framework, and you can prevent it from being installed into the archive by enabling the SKIP_INSTALL flag for the framework.

Unable to upload app to App Store connect

I am trying to upload my app to the App Store connect but I'm not able to.
I was testing my app using Xcode 12 and without realising it was beta software, I archived my app and uploaded it. Now when I click on submit for review it says Binary Invalid. Then, I realized that I wasn't supposed to upload it using Xcode beta. Now, when I try uploading it with Xcode 11.5, It isn't letting me sign the app as I get an error saying Profile doesn’t include the com.apple.application-identifier entitlement .
I have tried the following Methods and none seem to work.
Close Xcode and Delete all provisional Files from ~/Library/ApplicationSupport/MobileProvisions/
2.Change the Bundle ID and also tried repeating (1.)
Create new certificates and profiles from the developer website(Both original and new bundle IDs)
Delete Xcode and reinstall it.
But in the end it only uploads it with Xcode 12 beta. (And throws an error saying Binary Invalid)
Please help me rectify this issue.
I struggled with this problem for two days, simple fix is to;
Build with 11.5
Archive / Upload with 12 beta
Here is the answer. Create your archive. In the organizer, select your archive. Choose distribute app. Then instead of upload, choose export. Export the archive to a folder on your hard drive. Now download transporter from the App Store. Transporter replaced "Application Loader" or whatever it used to be called in the developer tools menu of Xcode.
Now sign into Transporter with your dev account and upload the .ipa found in your exported archive folder using Transporter.
It will work under Big Sur!

Xcode 7.1 "iTunes store operation failed you are not authorized to use this service"

Trying to submit iOS and Apple Watch OS2 extension update from ios 9.0 to 9.1. I recently updated Xcode to version 7.1 and now I'm hitting this problem without changing anything else.
iTunes store operation failed you are not authorized to use this service
What I've tried:
Removed developer account from Xcode -> added developer account back into Xcode -> Still hit the error.
I tried Xcode -> Preferences -> Apple ID -> Download All to get my latest provisioning profiles up to date. Still get the error.
Deleted all old archives, cleaned project, archive again. Still get the error.
Increased build number and version number in both the project and in itunes connect. Still get the error.
Deleted derived data in the Library -> Developer folder and I still get the error.
Cleaned the project -> Archived the project again -> Unchecked "enable bitcode" and I still receive the error.
Code Signing Settings:
Watch Target -> Provisioning profile automatic code signing iOS Developer
Watch Target Extension -> Provisioning profile automatic code signing iOS Developer
iOS Target -> Provisioning profile automatic code signing iOS Developer
Still hit the error message with the provisioning profile settings.
Reinstalled Xcode 7.1 -> Still hit the error message.
I've also confirmed that all my developer and distribution provisioning profiles are valid and downloaded.
Observations:
One thing I've noticed is that when I archive the app and look in the Window -> Organizer I notice my iOS apps on the left side for my archives. This app I'm trying to submit has no name next to it. However, if I delete all old archives for this app the app name shows up again next to the app icon. Maybe a bug with Xcode but I have no clue.
Another thing I've noticed is I've been able to successfully submit iOS archives that have no WatchKit extension using Xcode 7.1. I'm not sure if the WatchKit extension could be the problem but it is a possibility.
Also when the archive is ready to be uploaded to iTunes Connect I notice a couple of things. First, the iOS App defaults to the active provisioning profile: "MyApp" Distribution profile. However, both the WatchKit app and app extensions automatically default to the XC* wildcard provisioning profile. I'm not sure if this whole problem could just be related to a provisioning profile error but it is possible.
iOS Target -> Build Phases -> Embed Watch Content is set as:
$(CONTENTS_FOLDER_PATH)/Watch
Application Loader Submission Attempt:
Tried and failed with the following error message:
ERROR ITMS-90171 "Invalid Bundle Structure - The Binary file 'MyApp.app/Watch/MyAppWatch.app/_WatchKitStub/WK' is not permitted. Your app can't contain stand alone executables or libraries other then the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide..."
Again, I used this exact same project structure to submit the ios app and watchkit OS2 extension on Xcode 7.0 ios 9.0.x no problem. I think the error message is inaccurate unless I'm misconfiguring something but I imagine I would've hit the error back on Xcode 7.0
Any help on how to solve this would be awesome. I've found no help googling and reading other SO posts and I've been stuck on this for far too long. Thanks!
I met the same issue today and I think it is a bug of Xcode 7.1
Finally I managed to submit my app via Application Loader. There were warnings but it did work.
Here are the basic steps:
Archive
Export
Xcode menu --> Xcode --> Open Developer Tool --> Application Loader
Double click "Deliver Your App" and choose the file exported in step #2
click next and follow the instructions until the end
I found the solution by unchecking the Include bitcode option.
In mi case, it seems that updating to Xcode 7.1 removed some account information. So, after a few attempts to upload it from Xcode, I opened Application Loader, and it asked me to login. I logged in and finally could submit to the App Store from the Organizer. Hope it helps someone.
it is the enable bitcode on the bottom when you submit the upload. uncheck the box. for some reason it comes with 2 boxes checked by default on xcode 7.1
Set team in target-> General-> Team
Check and set appropriate provisioning profile in targets/project build settings.
Try with Xcode to upload build if find same issue.
Or
Try with application loader it will work.
In my case I think it should be a xcode 7.1 bug. I re-added my account, re-generated profile, rebuild the app (restart my mac) but none of them work! I got this error when I first validated the app.
Then I created a new profile and the validation passed. But the first time uploading the app xcode still showed that error. Unwilling to give up I clicked the upload button again and this time it succeeded!
I faced the same issue then I uploaded through Application Loader from XCODE menu and it showed so many error like missing icon for iPad etc .
So please try you app to load through Application Loader and see complete detail of errors you might have in your application.
I got it working through Application Loader after fixing these issues.
I am using Xcode 7.1.1. and it appears to be an issue with Xcode, because I successfully submitted the build via Application Loader. Now, I suspect that I added too many SDKs / adapters inside the code that may have caused issues with the app's delivery. But there's no way of knowing that for sure.
During upload my API Analysis to the App Store was skipped, because it was too large, but I doubt that may caused Xcode to upload the app to the App Store.
If Xcode fails to upload, try Application Loader.
Solved for Xcode 7.2 by revoking and recreating the cert:
Image of what to click here (sorry no embed reputation)
In XCode go into this menu:
XCode -> Preferences -> Accounts
When on the accounts tab, I selected my email in the Apple Id list (on the left).
Then on the right there is a list of of teams under Team Name, select the correct Team and click on View Details.
Finally, there's a list of Signing Identities, next to "iOS Distribution" click Reset.
I didn't have to restart XCode, I just immediately resubmitted to iTunes from Organizer with no problems.
Edit: Thanks #Dover8 for the info about possible effects.
https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Resetting Certificates Using Xcode
If Xcode detects an issue with a signing identity, it displays an
appropriate action in Accounts preferences. If Xcode displays a Create
button, the signing identity doesn’t exist in Member Center or on your
Mac. If Xcode displays a Reset button, the signing identity is not
usable on your Mac—for example, it is missing the private key. If you
click the Reset button, Xcode revokes and re-creates the corresponding
certificate.
Try to check your iOS Provisioning Profiles on
https://developer.apple.com/account/ios/profile/profileList.action
In my case one of profiles was marked as "Invalid" and after profile regeneration an error no longer appears
I got the same problem.
Tried to Upload To App Store.. 3-4 times.
Then I Hit the Validate... button and validation was success.
After that tried to upload again and it succeeded.
Then i cursed apple...
It seems to be related to the latest iTunesConnect update and "roles".
If I look at the "iTunesConnect Users" screen, we have three accounts,
(1) is "Admin, Legal", (2) is "Technical, Marketer", and (3) is "Technical Only".
Now when you click the email address to check the details and "roles" of #2 then only "Marketer" is checked, and only the marketer permissions are available.
For #3 the correct checkmark ( Technical ) is set, and also "Create Apps and Submit versions" is shown as an available "App feature".
It might be a work-around to change permissions to disable and re-enable "technical", or maybe give more permissions and make the person an Admin (temporary, of course).
Also - for the Jenkins users out there, you might have copied some certificates from the "login" keychain to the "system" keychain. Try removing them from the system-keychain ( I think that was this step which made my "Archive" not end up in 'not authorized ...' message and actually pass the verify again).

Xcode: Problems with getting my App to the AppStore

I am trying to upload my app to the AppStore with Application Loader
I tried to archive my project in order to generate the "ipa" file for Application Loader and the archive process got stuck at "Compiling swift sources" for almost 5hrs; I took to the response I read from - Xcode 6.0 taking forever to archive my project and I successfully generated the .ipa file with iTunes but while trying to upload with Application Loader, I get the error:
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning
profile included in the bundle com.youngbobby.MyAppName
[Payload/MyAppName.app] is invalid. [Missing code-signing
certificate]. A Distribution Provisioning profile should be used when
submitting apps to the App Store. For more information, visit the iOS
Developer Portal."
I have generated my keychain certificate and my distribution provisioning profile and I still get that error during submission. Do you think the error is related to the method I used? Do I have to maintain the traditional "archive" method? If yes, what would be the fastest way to archive and generate my .ipa file? I have tried enabling Whole Module Optimisation as suggested here all to no avail.
Any help would be greatly appreciated.
EDIT
I did a quick check on why my archive process was stuck at "Compiling swift sources" using "cmd + 8" and I noticed that my local Data store swift file which is a long Dictionary of type [[String:Anyobject]] was the cause of the problem. I can't really explain why it is so but I want to maintain the traditional method of archive and send because it seems using iTunes to generate my ipa file does not agree with my provisioning profile.
When you are building the project, it is still building for debugging, hence it is using the development provisioning profile.
Before you do the build to create the .app, go to the Scheme (just to the right of the stop button, to the left of the device on which you are running).
Click that and choose "Edit Scheme..."
Under the Run section, there is a setting for Build Configuration.
Change that from Debug to Release (if you are using the standard build config and you have configured the Release config to use your distribution profile and signing identity).
Close that window, then change your device to the generic "iOS Device option (make sure you don't have any devices plugged into your Mac).
Once you've done that, run your build again and the ipa created should be built with your release configuration and signed correctly.
You are probably using a Development Provisioning profile.
Go to your dev center.
Create a new provisioning profile, select App Store and select your bundle ID. create that and download it.
Control drag that provisioning profile to Xcode, Change build settings in target and project to the one you downloaded now and as Distribution.
Compile and build your app. Archive it and start uploading it to App store.
That should do it.
P.S do select your team correctly before you configure your build settings.
EDIT
If you already have done these steps just revoke the old one and create a new Provisioning profile and check.
Finally got my problem solved.
It seems all I needed to do while my app was compiling swift sources was to WAIT
I reduced the amount of Data in my Datastore file and the Archive process took less than 10 seconds to archive.
Pity, Xcode does not show a Timer to calculate how long it would take to archive a project and looking at the progress bar does not really guarantee that the process is working as in my case was a relatively huge one. So, maintaining the huge data I had, I simply had a 6hr nap and by the time I was up, my project was successfully archived and all other processes worked seamlessly :)
If you find your project 'stuck at compiling swift sources' during Archive Process, all you need to do is Wait.

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.

Resources