33

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:

  1. Removed developer account from Xcode -> added developer account back into Xcode -> Still hit the error.
  2. I tried Xcode -> Preferences -> Apple ID -> Download All to get my latest provisioning profiles up to date. Still get the error.
  3. Deleted all old archives, cleaned project, archive again. Still get the error.
  4. Increased build number and version number in both the project and in itunes connect. Still get the error.
  5. Deleted derived data in the Library -> Developer folder and I still get the error.
  6. 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!

zic10
  • 2,310
  • 5
  • 30
  • 55
  • Possible duplicate of [Xcode 7.1 (7B91b) You are not authorised to upload to the App Store](http://stackoverflow.com/questions/33294733/xcode-7-1-7b91b-you-are-not-authorised-to-upload-to-the-app-store) – l'L'l Oct 24 '15 at 03:37
  • Check to see if something is being copied in the "build phases" into your bundle (eg. `_WatchKitStub/WK`). – l'L'l Oct 24 '15 at 03:53
  • Checked both ios target build phases and watchkitextension target build phases and did not see the _WatchKitStub/WK – zic10 Oct 24 '15 at 03:59
  • It seems like a bug most likely; another thing you could try is submitting an `.xcarchive` package instead of an `.ipa`. Which build of Xcode are you using? – l'L'l Oct 24 '15 at 04:02
  • Xcode Version 7.1 (7B91B) – zic10 Oct 24 '15 at 04:02
  • You're not alone... https://forums.developer.apple.com/thread/17552 – l'L'l Oct 24 '15 at 04:03
  • Interesting, I was able to get a successful submission using Xcode 7.0 for iOS 9 but 7.1 and iOS 9.1 respectively submission fails. Looks like a bug nonetheless. – zic10 Oct 24 '15 at 04:06
  • I'm having the exact same issue here... – mogile_oli Oct 28 '15 at 02:03
  • This seems to be resolved my end. – mogile_oli Oct 29 '15 at 13:53

12 Answers12

60

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:

  1. Archive
  2. Export
  3. Xcode menu --> Xcode --> Open Developer Tool --> Application Loader
  4. Double click "Deliver Your App" and choose the file exported in step #2
  5. click next and follow the instructions until the end
Tyler Liu
  • 19,552
  • 11
  • 100
  • 84
  • Initially it worked for me, but iTunes Connect got stuck on processing and build is not ready to test or distribute. Now even the Application Loader is showing the same error. "You are not authorised to use this service" – Suhail Bhat Nov 26 '15 at 08:29
  • Works for me after having problem uploading fro Xcode. Thanks! – George Mylonas Mar 03 '16 at 12:52
  • Work well for me too. Thanks a lot Tyler Long. Not sure why but it work – Phuc Jun 05 '16 at 15:21
11

I found the solution by unchecking the Include bitcode option.

Uncheck include Bitcode

Nishant
  • 12,529
  • 9
  • 59
  • 94
  • 1
    this is not a solution but you are excluding great support of bitcode nu un-ticking... though this is kind of bug, restart xcode or remove/ add account is the only option to get out of this issue... – Fahim Parkar Dec 05 '15 at 10:02
  • 1
    Is this checkbox not available if I have set ENABLE_BITCODE to NO in project settings? I could not find this checkbox during submission. – chubao Jan 07 '16 at 06:57
4

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.

Oscar J. Irun
  • 455
  • 5
  • 17
3

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

jcdnas1
  • 31
  • 1
2
  1. Set team in target-> General-> Team
  2. Check and set appropriate provisioning profile in targets/project build settings.
  3. Try with Xcode to upload build if find same issue. Or
  4. Try with application loader it will work.
Vijay Sharma
  • 1,046
  • 9
  • 19
1

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!

Qiulang
  • 10,295
  • 11
  • 80
  • 129
1

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.

For Guru
  • 1,197
  • 13
  • 23
1

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.

itzo
  • 1,220
  • 14
  • 18
1

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.

dyson returns
  • 3,376
  • 4
  • 16
  • 20
  • Be wary of doing this if you work in a team. Resetting the profile here is the same as revoking the certificate and generating a new one. You will then need to share the new profile with the other developers in your team in order for them to also distribute apps to the store. – Dover8 Mar 09 '16 at 17:20
0

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

  • 1
    I checked my provisioning profiles and both my distribution and development provisioning profiles for this project are showing up as "Active" – zic10 Oct 29 '15 at 15:10
0

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...

EFE
  • 3,732
  • 4
  • 22
  • 30
0

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).

kalmiya
  • 2,988
  • 30
  • 38