Unable to Upload to App Store from Xcode 7.2 - ios

I am attempting to upload an app to the app store, but the upload button is greyed out. It says distribution requires enrollment in the Apple developer program. I am indeed enrolled and have set up everything for the application on iTunes Connect other than the build. I have tried quitting Xcode, signing out and back in, etc, but nothing seems to work. Any ideas? Please keep in mind that I am relatively new to iOS development so I am not very familiar with the highly technical side of things like code signing and certificates.
Here's an image of what I'm talking about for clarity:

First of all, you need to register your account: Apple Developer Program. It costs $ 99 a year.
You also need to generate a iOS Certificate for Production (App Store and Ad Hoc) in Apple Member Center
A tip is use Application Loader instead of Xcode.
To download the Application Loader
Go to Itunes Connect > My Apps > App > Prepare for Submission > Build
This Application handle better the submission of your App.

I had this same issue. I resolved it by switching my Code Signing away from iOS Developer (to iOS Distribution or iPhone Developer), attempting to archive (Build > Archive) then back to iOS Developer (then archive again). Not sure why, but the button was enabled after this.
See Ray Wenderlich's tutorial on testflight.

Related

iOS code sign error

Apologies if this has been asked before. I am new to iOS mobile app development. I am further developing an iOS app that has been developed by another person. They sent me the source code and told me that all the signing keys/certificates/provisioning profiles are stored against the Apple Developer's Account (which I have access to). When I try to build/run the app through XCode it complains about Code Sign error (not having a matching certificate in my keychain) . How can I fix this error please? is the a way to download the.p12 file from the app's Apple Developer Account? Since the app provisioning profile and signing identity is only needed for running the app on actual devices (at least in my understanding), is there away of getting xcode to ignore about it just for the purpose of running the app on the simulator?
If you have a developer account add it to Xcode Preferences -> Accounts , then click Automatically manage signing
If you want to distribute the app, make sure you have a distribution private key in your keychain, from the old mac or create the new one

Xcode 8 asks for a device to be registered to create provisioning profile

I am trying to publish an app for testing, without having to connect a device in my mac.
I have created a developer account, created an app in itunes, generated bundle id, signed into xcode with the developer account, generated a distributor certificate.
When I tried to archive the app, I got the error "conflict provisioning setting. app is automatically signed for development ..."
I read in this post and followed the tip of unchecking and rechecking the option "Automatically manage signing". After re-choosing my team, I get the error "There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it".
The goal all along was that I wouldn't need an ios device, because I intended to immediately publish the application and invite people to test it via testflight. Is it not possible to do it like this? Am I missing something.
I have read lots of documentation, but being a first timer in this, everything seems confusing.
Edit: I created a provisioning profile as distributor. Even after creating and installing the distributor profile (it now appears also in xcode at Account -> provisioning profiles), I still get that same error. I also noticed that in signing, The signing certificate is iOS Developer. I am sure
I fixed it by plugging in my iPhone and going to the Product menu > Destination > iPhone (my device).
Then after clicking Try Again on this properties page the warnings went away.
Source
The solution (though I would welcome more elaborate, insightful explanations):
#General -> Signing, disable the option "Automatically manage signing"
#General -> Signing and certificates choose your team
Though in my case that was not the issue, I would recommend making sure that in the device list, you choose Generic iOS device in your target devices.
This really sucked to figure out.
What you do is add a distribution profile in https://developer.apple.com/account/resources/profiles/add. Don't choose development! Don't let the Xcode Automatically manage signing!!
Then, you download the provision.
Then, in the Signing & Capabilities -> Signing Section of the project.xcodeproj file, turn off Automatcially manage signing, choose import and import the file you just downloaded.
Then, in the top, you choose Any iOS Device (arm64, armv7) and then you go Product -> Archive.
What happened to me was that I was about to run my app on a physical device for the first time and I didn't have a Team. So I created it in the process before connecting my phone with the USB cable. After I created the team a message like the listed above appeared. I did some research on internet but nothing found.
So here's what I did: I connected my phone, did all the trusted process, then restarted Xcode, and it worked. I am not sure what happened, but it was some of my first experiences using Xcode. It could sounds silly but it helped me. Hope to you too.
If you do not wish to register a device follow this advice:
https://stackoverflow.com/a/44157307/499581
* In short use "Generic" as the device while archiving.
If you do wish to register a device then the solution to:
"There are no devices registered in your account on the developer
website. Plug in and select a device to have Xcode register it".
Is to physically plug-in your device (an actual iPhone, or iPad) so that Xcode can register it for development use (note: this will not affect the normal everyday use of the device). After the device is registered it can then be used for development testing, load provisioning profiles onto it, etc.
↳ Disabling and Enabling Devices Using Your Developer Account
For those who are trying to develop without a mac computer using MacInCloud don't follow the standard advice out there. Its will lead you down a hole. I have wasted hours of my time.
The reason it say something about "a device to be registered to create provisioning profile" is that you need to provision an iOS device that you can test on before you can get it signed. If you are using MacInCloud you probably can't physically connect an iPhone or iPad to the MacInCloud and therefore it can't automatically provision devices for you.
Before you get to far into this you will need to get your iPhone/iPad UDID. Which I was able to do with https://get.udid.io/ on my iPhone, but it didn't work on my iPad. Instead, with the iPad I had to download iTunes from the Windows store and connect my iPad. Then click on the little gray square in the menu that's inline with Library tab.
image of itunes
Then when it pops up with your device info (mine didn't come up with my info at first, I had to sync my device). You will see your SN. Click on your SN and it will change to your UDID. Once you have your UDID you are ready to create a provisioning profile. What is confusing is this isn't done in the appstoreconnect section of your account online. Its done in your developer account: https://developer.apple.com/account
developer.apple.com account screen shot
When you go there you will want to click: Certificates, Ids & Profiles
Here you will need to add your devices and then with auto signing checked in Xcode that made the problem go away. NOTE: I originally tried to create a profile, download it, and import into Xcode under the Provisioning Profile dropdown in Signing & Capabilities. As described in another answer here, but that proved more problematic and wasn't necessary.
Then you can chose Any iOS Device from emulator device drop down then go to Product > Archive > Distribute App and create a certificate to place it on the app store (TestFlight).
you can also plug an iphone, run the app the app on your iphone as the target, it will ask you to register the device and then the certificates will be generated
Have you paid the $99/year developer fee? TestFlight is only available for paid developers. I would highly recommend plugging in an iOS device, though. It's more fun and rewarding testing that way.

iOS 9 new feature Free Provisioning (Run your app on a device, just with your Apple ID, without Apple developer membership)

Would like to know about the new feature Free Provisioning introduced in iOS9 & Xcode 7.
How Apple is now achieving that, as before we knew our device ids were enrolled in the profiles and hence it was possible to deploy the app on devices.
Now only with Apple ID how the things in the background are achieved, also is there any restrictions on how many number of devices I can add my build with Free Provisioning.
Any help is greatly appreciated thanks...
1. How it works?
Apple Ref : How to use free provisioning
As stated in above link under Launch Your App on Devices Using Free Provisioning point 6. "Xcode creates a free provisioning profile for you"
Update: Above point 6 is removed from link, but there is no change in the way it works and steps in above link still work!
Profile created in this way is tied to your apple id, when you try to run app on new device that device's UDID gets added in this profile.
2. How to use free provisioning?
Requirements: Apple ID, XCode 7 or above
Steps:
Go to XCode Preference
Go to Accounts tab and hit plus "+" button on bottom left to add your Apple ID.
After successfully adding Apple ID click on view details on bottom right
Click the Create button next to "iOS Development"
Connect your device and select your device as build destination.
In target's general setting,
a. Set app identifier you want to give to your free profile
b. set team id as your apple id
c. If using XCode 7, hit Fix Issue button below provisioning profile warning.
If using XCode 8, there is no Fix Issue button XCode will automatically do this.
In both cases of XCode versions, Xcode will either create new profile if not found for your apple id or add new device to your existing profile.
Run the app, this will install app.
Click app icon to start app manually, you will get "Untrusted Developer" dialog. To trust your apple id, Go to iPhone setting > General > Device Management > Select your apple id and click trust.
After step 8 you can run and debug app using free provisioning.
3. What are the Limitations?
I tried to install app with free provisioning and could run/debug app. But there are few catches. Profile created by XCode is bit different than our usual developer profiles
From profile raw file
There is new key LocalProvision with value true
<key>LocalProvision</key>
<true/>
Many services like following are not available, See full list of services
Apple Pay, Game Center, iCloud, In-App Purchasing, Push Notifications, Wallet (Was Passbook)
Expires in 7 days (this was changed sometime in May, previously it was 90 days).
<key>TimeToLive</key>
<integer>7</integer>
Old: 90 days
New: 7 days
Under <key>ProvisionedDevices</key> there is list of devices on which I tried to install app, still unknown maximum number of devices possible, I tried to install on 3 devices which worked successfully.
This is not alternative to publishing app for free on app store, you still need to enroll to developer program to publish apps.
Testflight based internal / External testing is not possible.
Apple haven't disclosed the thing like, how they are managing on their developer portal. But I think they just removed the restriction of Paid Developer program & rest of the thing kept as it is.
For standard developer Program Apple support 100 device so I think same will apply here.
Refer this link for more info..
Copied from: https://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/free-provisioning/
Limitations
Apple has imposed a number of limitations on when and how you can use free provisioning to run your application on an iOS device, ensuring that you can only deploy to your device. These are listed in this section.
Access to iTunes Connect is also limited and therefore services such as publishing to the App Store and TestFlight are unavailable to developers provisioning their applications freely. An Apple Developer Account (Enterprise or Personal) is required to distribute via Ad Hoc and In-House means.
Provisioning Profiles created in this way will expire after three months, Signing Identities after one year. Furthermore, provisioning profiles will only be created with explicit App IDs and so you will need to follow the instructions above for every app that you wish to install.
Provisioning for most application services is also not possible with free provisioning. This includes:
Apple Pay
Game Center
iCloud
In-App Purchasing
Push Notifications
Wallet (Was Passbook)
Some more informations.
You can archive app with free provisioning profile. But You can't export ipa in "XCode 7"
But you can use XCode 5 or Command line "xcodebuild" to export ipa file.
I tried using OTA to install this ipa file. And it's work!
So... If there has a way to add UUID to your account without XCode (REST api calls). You can distribute your app to anyone you want.

iOS & XCode5 App publishing fails - Error ITMS-9000: "The binary you tried to upload was invalid"

I was already looking through some other threads here with the ITMS-Error 9000, but they didn't help me to get my App passing the submission to the App Store.
I have NO errors or warnings inside XCode.
The App is perfectly working on iOS Devices & Simulators.
EDIT: What I have already tried:
Changed Deployment Target from iOS 7.1 to 7.0
Checked the Bundle ID in iTunesConnect and inside Xcode
Checked for any errors and warnings --- removed / fixed them
Do you have any additional ideas what it could be? Without any errors or further information it is hard to find out what the reason is.
UPDATE2::
If I try "just" to "Validate" instead of "Distribute" in the organizer after Archiviing it i get the following Error
Its an Issue with Apple's Server I tried validating the app it said "Unable to process app at this time due to general error" a quick search about it on SO said its got nothing to do with our code or project but some process running at Apples server
Assuming that your binary icons does not meet as per apple's human interface guidelines.
It most probably seems to be the issue with the profile you are signing your app with. You got to make sure that your are signing the app rightly with proper distribution profile. Also check out for the bundle identifier and make sure that it is same as the one you have given in itunes connect.
Check this link!
You should be creating the binary with the simulator or some device connected.
Try it:
Unconnect iOS device from your Mac,
Dont select any simulator, just leave it as it is, iOS device option
Archive it
Publish it
Make sure you're using a provisioning profile for the App Store (not for Ad Hoc distribution)
Then select this profile when building your app.
I would guess this all has something to do with Apple making system changes to prepare for iOS 8 and in doing so somethings got broken.
The issues look to have just been resolved by Apple. I just successfully submitted an app that was previous showing the same problem you had. If you look at your Provisioning Profiles, you should notice that Apple has removed your app's previous Distribution Profiles.
To get your submission working again, all you have to do is recreate your App Store and Ad Hoc provisioning profile, but make sure to use a new name and you should be good to go. You were not alone on this one. A bunch of people experienced the same problem and there were a lot of posts about it on the official Apple Dev forums.
Please check the Distribution Profile that you are signing your app with at iTunes Connects. make sure that it is still valid. I had same issue couple days back and after a struggle , i found out that somehow my provisioning profile was not valid anymore. Creating a new profile and submitting app with it solved my issue.
Apple have deleted corrupted provisionning, you just have to regenerate it and make submission works again !
Connect to your iOS Developer
Certificates, Identifiers & Profiles
Provisioning Profiles / Distribution
Here you can see some certificates missing. You have to re-create (Distribution / AdHoc). Note, you have to change certificates name !
In Xcode, refresh your certificates, set the right one in Build Settings, and submit...
I called today the Apple Developer Support and i get one very very simple answear to this issue.
You have to create all your certificates, provisioning profiles etc with Apples SAFARI browser.
It is not working "always" proper with Mozilla Firefox or other Browsers. So if you get such an error, try to recreate it with Safari! It worked like a charm!

iOS app Certificaction and ad hoc testing

I work for a company developing their iPad app. None in the company is a technological geek to handle Xcode app deployment themselves. So for now, we do this:
I develop the app.
Create an ad hoc testing version and share the .ipa file with them.
They test and then I make a distribution version for further release.
What I want to establish as a permanent solution is
I develop and share the Xcode archive
They make all different versions for testing and release.
However I have been largely unsuccessful in doing so: for creating the archive, I have to sign/certify with my development profile. They could deploy it further from Xcode archive to an .ipa file, using their distribution certificate. However, they can not install it on their devices. I believe mainly because the development version requires my certificate/profile to be enabled on their devices :(.
Is there a way out? I need to provide them an archive which they could further sign and do whatever they want to do (either test on whatever devices they want to or release).
Thanks,
Nikhil
If you don't want to manage the device identifiers where you are deploying the device, you could use:
1) TestFlightApp.com (although I don't know what the current status of their offerings are -- since they've been acquired by Apple -- but they still have a "Sign Up" link on the top of their home page).
or
2) Apple's Enterprise Developer Program, which allows you to "Distribute In-house Apps".
You can sign application using their distribution certificate.
To do so c'est have to send you a p12 export of the certificate, the p12 contains the private key of the one creating the certificate and the certificate.
To export a certificate :
Go to the keychain access
Right click on the certificate
click export

Resources