Code signing issue: Is any difference between this two screenshots? - ios

What is the difference between these two screenshots?
and
update: When I uploaded my app on the appstore I got invalid binary. I am trying to find a solution.

Well, in the first one you're telling it that the default behavior is to not code sign, but the behavior on "Any iOS SDK" is to go ahead and code sign after all. In the second you're telling it to always code sign. However, since "Any iOS SDK" covers every compilation you're ever going to do on an iOS project, the former is effectively equivalent to the latter in practice.

You are asking the wrong question.
The Debug and Release Targets are not meant for App store submission. You want to create a Distribution Target, which is usually a clone of your Release Target, except with the Code Signing Identity changed to being your Distribution certificate and Distribution provision file instead of your Developer certificate and provision. You might also want to make sure to Validate your Distribution build before trying to upload it.

For submission to the App Store via iTunes Connect, you need to sign your app with a Distribution Certificate, not a Developer Certificate.
Follow Apple's step by step guide. It walks you through the whole process even with screenshots.

Related

Detailed Explaination of IPA file and embedded.provisionprofile

Its very confusing and found lots of question answers on stack-overflow. But still there is not 100% perfect solution for developer. So I want to ask question about .ipa file and embedded.provisionprofile for detailed answer of provisioning profile + Certificates + Signing Identities.
(1) How to find out .ipa file is for development or distribution??
I have extracted ipa file and found embedded.provisionprofile with UDIDs and lots more detail. But There seems very minor difference between Development and Distribution app.
(2) How many types of Certificates/Profile available?
Here I am very confuse with ad hoc method. There are 3 options when I archive project and click on distribute button Bellow is image
1st option I know. It tells to upload app to app store simple enough. Second options is confusing, there are again two type (Please correct me if I am wrong) of development, like send it to your client/friend to test on his/her device and add to TestFlight(I am not aware of this) So what is difference here??. Also third one is simple says make archive file of xcode project but what is use of that archive file??
(3) How to make easyier to understand provision profile and certificates and signing identities and keychain access exporint and all that its very confusing and sometimes it gives misleading error. Like this question.
first option is for uploading your app to AppStore
Second option:if you want to test your app in device so you have to go with this option, using this option you can generate IPA file. and this IPA will run only those device which devices UDID assigned to this IPA provisioning Profile
And i don't know about 3rd one.

How to submit to iTunes Connect in XCode 6

This must be the worst question ever asked.
I'm almost ashamed to ask it but I can't wrap my head around this.
We are trying to push my app to itunes connect for beta testing.
Now there is no way to do this because XCode 6 gives all signing errors available.
We are able to run the app on the development device just as usual. We have the profiles.
But when we set the release sign identity to iOS Distribution, the hell breaks loose.
No matching identity was the first error. Fix issue releases another error:
No provisioning profiles with a valid signing identity were found.
It's useful to note that XCode knows this better than I do so it changes the code signing identity back to developer.
That's not me, I want to distribute.
Ok so at this time we're stuck at this error. We don't know where it came from, but we do know there was another error.
While pressing the submit button in the organizer the error was:
"You already have a valid provisioning profile"
According to the apple documentation I should press the revoke & request button but that isn't there.
So here we are, totally stuck and have no idea where to go now. The apple docs are incomplete, the signing gives errors but no logs. Errors messages change, but are consistent.
What the hell should we do now?
Reinstall OSX and remove all existing profiles? What will happen with current clients running apps on those profiles?
Have a look in yoru account and check that the provisioning profiles are active and not invalid. You might need to regenerate it.
You might also want to download them manually and install them yourself.
Sometimes I've had to archive the app then submit 'manually' using application loader.
I would recommend going back to basics:
check your development and distribution profiles on the developer site. if you have recently renewed your annual subscription, you might need to recreate them.
when you are archiving make sure you chose the real testing device, not a simulator.
if both doesn't work, create a new empty project and sign it with the profiles and archive. if that works, then check if you altered the bundle settings. if it doesn't work, delete your profiles and recreate them.
I hope that helps.
Hmm. I understand the plight of having to deal with the overly complex process of app submission which should have been rather simple.
Two things:
Make sure you delete all the provisioning profiles. Revoke and request a new one. Create a new certificate with distribution licence (you can make upto 3).
Once you've done that go to tour XCode > Preferences > Accounts and open up the apple id you find there. Refresh and that should download and fix redundancies.
For more I think you should also give this a read.
How do you beta test an iphone app?
About you second issue. What would happen to apps packed with previous profiles?
Well, your app is not bundled with a particular profile and so you can create a new one and use that without pain

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!

XCode 4.3 code signing errors

Before Xcode 4.3, I used this method to submit applications to the app store:
-- Compile the application with the appropriate signing certificate which was configured inside the application's build settings
-- Distribute the application into the app store or clients using Xcode's built in submission process. When I was asked to select the signing certificate with which to sign the app, I always selected "Don't Resign".
However, the "Don't Resign" option does not exist in Xcode 4.3. Therefore, my application is resigned, and I always end up with an error saying that the code sign verification failed.
Is there any way around this problem?
I have found out that the compilation errors about code signing are due to a bug in Xcode 4.3. As many other have pointed out in Apple's developer forums, and myself, there are many cases where Xcode will complain about code signing your application if your application contains an image bundle! So, I remove the bundle with the images, and re-imported the images as separate files. I was able to compile the application for Ad Hoc this way, whereas it wouldn't compile with the bundle.
Also, as far as "Don't Resign" is concerned, I noticed that even if the application is already code signed in another step, Xcode 4.3 became smart enough to not re-sign the application with the same certificate, even if it appears to not give you the chance to not to! That's what I have verified with Ad Hoc builds. I will soon try that with production builds.
So, Xcode 4.3 became smarter in one way, and dumber into the other. Apple needs to fix this problem with the bundles, SOON!
Yes, there is a way. Before it used to default to whatever code sign it could find and auto-embed it into your apps. Right now its bugged.
To solve it, you would have to go through the steps of obtaining a new certificate and its private/public key. 3 step process:
Make sure you completely delete your old certs and keys by going to Applications > Utilities > Keychain Access. Then Deleting the certificates and private keys associated with your Developer account.
After deleting all that info head Here to generate a new certificate for your app. Download and import to your login keychain
3.In Xcode open your project. Head to your root project folder > targets > build settings and attach the new correct certificates to code sign your app correctly.
If you are unsure about the code-signing process. Either go here or go to the dev provisioning profile under distribution you have some (REALLY OUTDATED) examples to point your way

Invalid Signature error !

I am trying to update my application , but after uploading the binary , Itunes connect sends me this email :
Dear Developer, Thank you for your
recent binary submission for "MY APP"
to the App Store. Unfortunately we
discovered an issue with your binary
that you will need to correct in order
for your application to proceed to the
review stage. The specific issue is
outlined below: Invalid Signature -
Make sure you have signed your
application with a distribution
certificate, not an ad hoc certificate
or a development certificate. Verify
that the code signing settings in
Xcode are correct at the target level
(which override any values at the
project level). Additionally, make
sure the bundle you are uploading was
built using a Release target in Xcode,
not a Simulator target. If you are
certain your code signing settings are
correct, choose "Clean All" in Xcode,
delete the "build" directory in the
Finder, and rebuild your release
target. Once you have corrected the
issue, please return to the
application's version details page in
the iTunes Connect Manage Your
Applications module and click on the
Ready to Submit Binary button. This
will take you through the binary
submission flow and return your
application version status to Waiting
for Upload. You can then use
Application Loader to upload your new
binary. If any other issues are found
with your submission you will be
contacted. Thanks, The iTunes
Connect Team
I am sure that my binary signed application with a distribution certificate NOT AD HOC !!!
what is your suggestion to solve this problem ! I NEVER HAD THIS PROBLEM !!!!!
I download the app distribution CER again but nothing change ! I have 6 apps on app store and never faced with this
Note that this QA is incredibly old. Apple have largely ameliorated this problem. Enjoy.
99 times out of 100, here is the problem:
Select "TARGETS", not "PROJECT"
Click on the name of your project at the Top Left of the main XCode6 window. (ie, just above where it probably says "Classes".)
Look at the large area which opens. Carefully look at the WHITE COLUMN ONTHE LEFT.
Choose "TARGETS" ... rather than "PROJECT"
Then, correctly set your certificate to the 3rd party Mac Developer cert.
I had the same message appear from Apple, and selecting "targets" not "projects" when setting code signing identity did NOT resolve my issue.
Turns out, as the last step of submitting the app to the store (via XCode4's Organizer panel - Archives tab), I was presented with a dialog sheet that showed the distribution certificate it was going to be submitted with, which was DEFAULTING TO A DIFFERENT DISTRIBUTION CERTIFICATE I had in my keychain - and NOT the valid certificate that I'd signed the app with!
Once I manually selected the correct distribution certificate in this last step of app submission, it went through fine. (I also opened up my Keychain Access app and deleted the offending distribution profile, that I didn't have any use for anymore).
A main point I'd like to offer is that Archive Validation (or submission thru App Loader) is supposed to identify the signature problem before sending the application to iTunes Connect. This is a first indication that the problem is related to a developer tools error.
Having witnessed this problem with multiple developers strengthens that hunch. In my experience the "Invalid Signature" diagnosis is not caught during client side validation as a result of a bug in older versions of Xcode. Devs simply update their OS X to 10.7.x, plus Xcode 4.2.1 and with no change to the project or code the app is ingested into iTunes Connect without issue.
Keep it in mind for others experiencing this problem...it's especially common on Snow Leopard with Xcode 4.0.2, 3.2.6 or less.
Apple's new publication touches on this point, see iTunes Connect Store - Binary Rejection emails - Invalid Signature.
I had exactly the same problem, checked everything but couldn't find any issues.
Problem ended up being because my project was stored on a FAT32 USB stick! Copied it to my Mac and everything worked perfectly after that.
Hope this helps!
I got the same problem and spent many evenings solving it!
For my app the problem was a question mark in the executable name. In the apple developer docs is noted you can't use special character in executable name but not which ones are allowed.
I changed the executable name in build settings and the upload works!
I have been battling this issue for almost a week! For me, it turned out that the Error email from Apple was completely wrong and misleading. (I knew that all of my certificates and code signing settings were in fact correct.) It turned out, that my app was getting rejected because there was an exclamation point (!) in the name. Apparently, only alphanumeric characters (A-Z, 0-9) and dashes are allowed for the product name. (Characters like ?#$% are not allowed.)
The Fix:
1.) Click on the blue project icon on the left panel in Xcode.
2.) Click on the build settings tab.
3.) Select the current target from the menu. (It's right next to the blue project icon.
4.) Scroll down until you see the "Packaging" Category.
5.) Find where it says "Product Name" and change it to a name that does not contain any special characters.
I hope this helps! Sorry I had to red-out my company info!

Resources