Xcode won't let me upload my app - ios

I have an iOS app created with Cordova, and have just paid my $99 to apple to upload it to the App Store. I've created the app archive, but in the Organizer Upload to App Store… is grayed out, and I've got "Distribution requires enrollment in the Apple Developer Program."
Here is my account in preferences, which I have tried removing and re-adding
What am I missing?

I see you have two Team entries. I believe the issue might be because you have the "Personal Team" option selected under your Project settings page.
In Xcode, in the Filesystem sidebar, select the Project node, select your main Target, and choose the non-Personal Team entry. Ensure you have a device selected so you can provision it, then rebuild and rearchive, then it should work.

What happened to work for me was to "Enable Bitcode: Yes" under Build Options in my project target in Xcode. With that enabled I was able to upload to app store via the Application Loader.
I had to archive the project and export with bitcode attached.
I know this is way past the time for the original post, but hopefully it can help someone looking for a similar solution.

Related

Xcode couldn't find any iOS App Store Provisioning Profiles

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.

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 doesn't show options in build settings

I developed a game with Unity and created the Xcode project, so now I want to publish the game to the App Store. I bought the license and set the correct key in the Mac, but there's a problem: I can't select options in the build settings; it show me only a blank text area. The first time I opened the project, I was able to change the configuration and Xcode showed me the options.
How i can fix this problem?
this is a screen:
Are you planning to change provisioning profile and code signing identity?
It's under Code Signing section. Under that set the correct developer, publisher profiles and provisioning profile.

TestFlight beta-testing iOS app

I completed to develop my first app. Right now i want to distribute my beta throught https://testflightapp.com
I tried to create .ipa file with this tutorial - http://help.testflightapp.com/customer/portal/articles/402782-how-to-create-an-ipa-xcode-4
In the very beginning i should select Entitlements, but there is not such category as Code Signing..
Any helps? Thnx.
PS I have a developer account.
UPD. Does somebody create ipa files for TestFlight on XCode 4.3? How do you do that?
I skipped entitlements altogether. With Xcode 4.2 and later I have not needed them.
Make sure your Archive Scheme uses your Debug configuration. Then just do an Archive of the project (under the Product menu). Save the Archive someplace. Then drag that Archive file onto the TestFlightApp's green "Upload Build" button. That easy. No messing around with entitlements, etc.
Before you do this, make sure you can actually build a correctly formed archive by building, and e-mailing it to one of your testers and see if it can be loaded. There are a bunch of things that have to work before you can use TestFlightApp. Just because you can Build and Run from Xcode doesn't mean that it will work on a remote device that doesn't already have your provisioning file. For example, you have to have your App ID, provisioning profiles and Device ID's all configured correctly via the Provisioning Portal. Once I did that, and verified that my .ipa files can be installed manually, then just uploading to TestFlightApp.com worked without having to do entitlements.
I wrote this up and put it on TestFlightApp's support forum, but for some reason TestFlightApp.com won't let me into the support area so I can find it - I can't use my login to access their "Tender" account.
That's because that tuturial was done for another version of Xcode.
Just create a new property list file (Entitlements.plist) in your Xcode project and it let you edit it as a Entitlements file just fine.
The What's New in Xcode (pdf) documentation states that:
The iOS platform has supported entitlements for a while, and with Lion, Mac OS X does as well. With Xcode 4.1, the project editor provides a UI for setting up entitlements for Mac OS X applications. You can set entitlements for each target in the project editor. There is also a default code-signing entitlements file available in the file templates in the utilities pane.
In the Summary tab of your project editor is a section titled Entitlements. Check the "Enable Entitlements" box to have Xcode automatically create an Entitlements plist for you. This section also governs the entitlements' interaction with iCloud and Keychain.

How do I create a release build in Xcode?

Why is it that when I build an application, Xcode creates a debug build? I want to create a release build. How can I do this?
Product / Scheme / Edit Scheme..
And from the menu that comes up, select Release under "Build Configuration".
Xcode 11
I found this question because I had already finished debugging my app and I wanted to make a release build for the app store. I always forget which menu item to use, though. This answer is a reminder to me and others next time.
Choose the Generic iOS Device from the active scheme menu.
Then go to Product > Archive.
You may have to wait a little while for Xcode to finish archiving your project. After that you will be shown a dialog with your archived project. You can select Distribute app... and follow the prompts.
More Help
This answer is for those who are already all signed up with a developer account and just need to get the archive from Xcode to iTunes Connect. If you need more help signing up for a developer account and getting an app to the app store, read the following links.
How to Submit An App to Apple: From No Account to App Store – Part 1
How to Submit An App to Apple: From No Account to App Store – Part 2
App Distribution Guide (Apple Docs)
Submitting Your App to the Store (Apple Docs)
It is done over building an Archive version.
First connect a iOS device to your Mac. Then select that device as target in Xcode.
Now click on the tab "Product" and click on "Archive"
Leaving the original answer below, but this has not been the recommended method to create a "release" binary for distribution outside of Xcode in a long time — for that you want to Archive: see answers above.
If you are looking to debug/test a Release build in Xcode, this approach is still relevant.
To create a release build, you have to edit your current scheme (⌘<) and highlight "Run [name of application]. On the right, select "Build Configuration" and choose "Release". Build as usual.
If any one needs to go through how to make Adhoc build, here are quick steps
Product > Archive
then
Export > Save for Ad Hoc Deployment ....
See quick video https://jumpshare.com/v/rHLJII2npwyHCgGCabQA
Follow these steps:-
Go to product option
select Scheme option
Edit Scheme option
change Debug to Release
Make sure Through this you can run build in your physical device if you are disconnected to System..
but if you will run the same code o n simulator then you will face some error then that time you need to change the scheme option Release to Debug
Here is my 'more detailed' list of steps for creating a release build > (Working on a team and a project that has many schemes and environments)
checkout a new branch like releases/x.x.x that contains all changes. (x.x.x is the version) (Its more about your team conventions)
Check to make sure your app bundleIdentifier is correct (might differ for each environment)
Team/account/licence: log into correct account that has provisioning profiles. then under signing and capabilities make sure your Team is correctly selected and has all certificates needed
Upgrade the version in project settings to x.x.x
Make sure the scheme you selected is correct
Make sure the URLs of API calls are pointing to your release environment
Its better to select 'Any iOS device' instead of a simulator or actual device
Commit any changes locally if you have any (this step is very important)
Validate to make sure all is good
Create an archive
Distribute your app for AppStore Connect
I use an apple proxy named 'transporter' that is pretty easy for uploading iPA to Appstore
Happy releasing!

Resources