Problems when trying to submit iphone app - iphone

I'm a fairly new developer.
When I try to submit my iphone app with xcode, I've got error as follows;
Code Sign error: The identity 'iPhone Distribution' doesn't match any valid, non-expired certificate/private key pair in the default keychain
After searching, I found out that I have to create a Distribution Provisioning Profile.
However, my distribution provisioning profile doesn't work, even though my Development Provisioning Profile works perfectly.
Could someone please help me with this problem?
I'm stuck all day...
and please forgive me that my English is not great.
Thank you in advance.

Have you installed you distribution certificate (not the distribution profile) into KeyChain Access?

this link should help you, it explains how to build for distribution.
If not then you should consider going into iOS provisionning portal and recreate your certificate.

I hope your project run on device based on the developer profile.
before your prepare the submission.just follow these things,
create Distribution profile in developer.apple.com--> iOs provisioning portal.Download and install into your system and iosdevice.
2.Then go to your project --> info Press + button above the comment-line build use.select any one of the that duplicate. and then rename that as "Distribution"
then select your project-->build settings and target--> build settings set the code sing as your distribution profile.
this is possible only to build.
then select your products section. right click on it select show in finder option and zip your .app file.
this file has to be use after your finish into the itunesconnect.apple.com ---> mange your applications selection.
go to the application loader--> select your .app zip file
this for submission of app store.

Related

Error When Uploading IPA to TestFlight Using New Target

I recently created a new target in my project for the Lite version of my app. Now when I go to upload the .ipa to TestFlight so I can distribute it to my designer, I'm getting:
Invalid IPA: The keychain-access-group in the embedded.mobileprovision
and your binary don't match.
Seems clear to me the reason this is happening is because of the new target. Does anyone know what exactly do I need to change to get this to work?
I had this same problem. It was caused by having the wrong release code signing identity in the target's build settings. You won't need an entitlements file.
Check you are code signing with the correct Distribution profile.
Under Xcode project select > Build Settings > Code Signing
Code Signing Identity:
- Debug > iPhone Developer
- Release > iPhone Distribution
Provisioning Profile:
- Be sure to select a Distribution profile here!
When you created a new bundle you probably didn't change the entitlements and access groups. Make sure you change these in the entitlements file. Have a look at http://www.karlmonaghan.com/2012/08/09/invalid-ipa-the-keychain-access-group-in-the-embedded-mobileprovision-and-your-binary-dont-match/ on how to do this.
Should look like this
If you don't use an entitlements file...
Double check that your developer certificate and provisioning profile used are up-to-date (even if you have the confidence inspiring green tick in the organiser.) Refresh the profile by visiting the Apple Provisioning Portal and edit / modify the provisioning profile, you're using to sign the app.
Un-click and click the signing identity, so that you can submit the form, and the profile will be regenerated.
Wait a minute (really), Go back to XCode and remove the profile from the organiser, next refresh the profiles, and it should re-appear, as the regenerated version.
Once that's done, try archiving / signing the ipa, and upload to TestFlight.
(use the TestFlight app, to speed up this process.)
Here's what worked for me:
Using Automatic (Enterprise Distribution) Profile Selection for all Code Signing Identities I've Established.
Selecting "Refresh Certificates" when going through the Enterprise/Ad Hoc distribution workflow
I have such kind of problem, I am not sure you have the same one or not.
If I have a installed app with the same app id that I am going to install but with a different target, it creates problem. Seems apps are unique with app id and target. So I had to delete the app to install another app with the same app id but different target.
You have good other answers here, but just to stress something out.
If you worked for more than 1 client, and you actually used more than 1 developer account, then the automatic selection of Code Signing Identity on Archive wizard could be different than the one you need, and you might need to select it each time you create the AdHoc version.
Here is a picture, to show you where your error might be (thats where mine was):

Release an ios application?

I've an iOS project developed by someone else, now I have to update it and build a release for client so that they test it.
I've updated it and while archive it in release mode, get error-
The identity 'iPhone Developer: XYZ' doesn't match any valid, non-expired certificate/private key pair in the default keychain
I am new to iOS. I have some idea that I have to change developer id or something similar in certificate. But do not know how. Can anyone help me to fix this issue?
Thanks.
You need to have Apple development certificate and .p12 file of that account of which that provisioning profile exists.
If you don't have, you need to create it from keychain, by requesting a certificate from authorised authority->generate csr and submit in you developer account.
hope it helps you........
You need to do an "Ad Hoc" distribution.
Build your App for "Release".
Go to the "Organizer" and select the Archive.
Select your build in the Archive.
Use the "Distribute" button and select the middle radio button. "Save for Enterprise or Ad Hoc Distribution".
That will produce a .ipa and ask you where you want to save it. You can put that on your desktop and distribute it.
In order to build an Ad Hoc Build, you have to get yourself an "Ad Hoc Distribution" certificate. You do that in the Apple iPhone Developer site in the provisioning portal area, located here:
iOS Provisioning Portal
You will also need to authorize the devices you want run test versions on in the same way you authorized your own devices for development.
If you have to run the App on many test devices and the testers are not technical. I suggest you take a look at a pretty good service online called "TestFlightApp".
You don't have a valid keychain item for the developer certificate, is what the error is telling you. It's a case of creating one and installing it.
But for delivering a test build - you need to create an adhoc distribution, using a distribution certificate that has the test device's udid included.
In either case - and for further troubleshooting - Apple have a handy Technical Note for dealing with these kinds of issues and how to solve them.
If you go to your project in Build Settings -> Code Signing -> Code Signing Identity, you can change the signing certificate to your own.

Xcode says: "Identity ___ is not trusted." and won't allow me to submit my app

I've been living the nightmare of trying to submit an app to the iTunes store... The newest massive waste of time is an error message that I get when I try to validate or distribute my archive from the "organizer".
The exact message is:
My Xcode is version 4.3.2. I'm pretty sure my WWDR is installed, because this has never been an issue before. I also tried to re-install it just to be safe.
The most frustrating/confusing part is that I JUST submitted my app successfully two weeks ago and nothing was changed. My app was rejected for meta-data reasons. I fixed those issues, re-installed one of my plugins, and now this.
Any suggestions? Even a link to some helpful documentation would be great. I've found the Apple developer docs extremely confusing and UN-helpful.
EDIT1:
I think I may have gotten closer to the problem. I changed some of the build settings and now my build fails with this error:
Code Sign error: Certificate identity 'iPhone Distribution: [my name]' appears more than once in the keychain. The codesign tool requires there only be one. I want to fix this but I'm not clear on which code signing profile should be set where. There are different settings depending on whether I click the "project" icon or the "target" icon and each of those has four different choices. Do all of these require code signing? Can anyone give me an example of a working configuration?
EDIT2:
I think I maybe found the problem. There is a small note that says my Distribution profile has no provisioning portal. I've been downloading and installing new .mobileprovision files but they all say "Developer". I think just need to figure out to download a new distribution profile.
SOLUTION:
Thanks to some pointers from Saad (see below), I figured out what was wrong. I was using the auto-select option for code signing, and the only distribution profile had an invalid provisioning profile. This happened very quietly, and I'm not sure why. I only noticed it when I went back into the provisioning portal to create a new distribution profile. After installing this, everything works.
your provisioning profile is not properly set
Code Sign error: Certificate identity 'iPhone Distribution: [my
name]' appears more than once in the keychain. The codesign tool
requires there only be one.
Open Applications > Utilities > Keychain Access and search for your Distribution certificate. Sometimes the Xcode Organizer decides to generate a new certificate for you and invalidates your old one, but does not remove it from your keychain. Remove the expired/older certificate and quit/re-launch Xcode (make a backup first, in case, by dragging to Desktop or Exporting). That should at least clear up part of your problem.
As for the provisioning profile, if that still is a problem, I'd manually go into the iOS development center and download the App Store Distribution Provision Profile for your app, removing all other provisioning profiles, until you figure this out. Quitting and relaunching Xcode when dealing with certs/provisioning profiles is something I've always had to do.
project identifier and your profile identifier must match

iPhone -- renew team provisioning profile

In the provisioning portal, the "renew" button for my team provisioning profile is grayed out. And said profile is expired.
How can I renew it?
EDIT: I found the "automatic device provisioning" checkbox and "refresh" button in the organizer in Xcode. But when I select the team profile, check the checkbox, and push the refresh button, I get this message:
An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Support (http://developer.apple.com/support).
I suppose I can go to support, but it would still be better to figure out what the problem is without involving them.
I had the same "unexpected error" issue with the Team Provisioning Profile when it expired. I fixed it by deleting it in the Xcode Organizer AND in the ADC Provisioning Portal, then hitting renew in Organizer.
Posting this again here..
OK, I had the same problem with the disabled 'Renew' button against my Team Provisioning Profile.
This worked for me.
1) Deleted the expired Team Provisioning Profile from the Xcode Organizer.
2) Deleted the same thing from the developer provisioning portal.
3) Again from Xcode organizer check marked the auto provision and clicked 'Refresh'. it asked for the credentials and in a few seconds added the renewed Team Provisioning Profile.
4) It also added the new profile in the developer provisioning portal.
Refresh and removing the iOS devices did not help on my installation.
But I found that the error messages was misleading. I am also member of the Mac developer program and after choosing "My Mac" under DEVICES and pressing the (+) Add to Portal button, the error message "Your team has no devices for which to generate a provisioning profile." did no longer appear.
So it looks like the error message covers the Mac and not iOS devices even that the URL at the end of the error message links to the iOS development center.
I had the issue that Xcode didn't refresh or renew it's managed Team Provisioning Profile and tried a very long time. I always hit refresh in the Library->Provisioning Profiles - section. Then I tried out the Teams section and after hitting the refrsh button there my Team Provisioning Profile which was managed by Xcode was renewed successfully. Hope this helps some of you.
One more thing: I used the same Apple-ID in three teams. So maybe Xcode failed to separate them while refreshing.
Do these things if you want to really solve the problem:
(1) Are you using the certificate for which you made provisional profile from your mac? Or you are using the certificate from other mac machine. If that is the thing then please get .p12 file from there and install in your keychain.
(2) If your certificate in the keychain is the same for which you made the provisional profile then it's fine. Otherwise you have to create new provisional profile for the certificate.
(3) Please make sure that you have set the app id in the target > properties > identifier. If no then please set and choose the provisional profile from the target > build > code signing identity.
(4) Then clean and build your project.
If you find any problem then please let me know. I would like to solve this problem.
I fixed it by signing into my Apple ID in XCode->Preferences->Accounts tab
Is the certificate it is based on expired? Did you delete the device it was for?
Try deleting the profile and click Refresh so Xcode re-adds it. Just a guess. I don't know why this would work, but it's worth a try.
Are you pressing the renew button from within Organizer in the latest Xcode version, 3.2.5 beta 3?
Here's the answer to compiling question, however, if anyone else has the answer to the team provisioning profile please post.
You can still compile apps for your device/simulator by creating a developer profile and downloading it to your device.
The key to getting it to work is to make sure the profile is selected in both the Edit Project and Edit Target Settings from the Project Menu. The Target Setting is more specific and usually screws people up. Making sure they are both in sync will help you get things up and running.
From these two menus, check the Build tab and make sure the developer profile is displayed. The default is iPhone Developer and should point to your downloaded profile.
Is there a problem using a different mobileprovision file? I believe you are getting the error on using a different provision file because your Target might be using the older one.
Try this
Get the new mobileprovision file and
in Project's Build properties, set
the mobileprovision to this one
Select the active target and in the
target's Build properties, ensure
that the same mobileprovision is
being used
Compile the app.
See if that helps.
As far as the Team Provisioning profile goes:
Does your console say anything? Are you using Xcode 3.2.5? I'd file a radar at http://bugreport.apple.com. Do you see the Team Provisioning file in the iOS Provisioning Portal? Does it have a green light?
You might try revoking it and letting Xcode create a new one.
As far as getting your app to work
You can always create an app-specific development profile. Choose your certificate and the app you are working on. Also make sure to select your device in the checkbox list.
Then download the profile (once it is ready) and double click on it to import it into Xcode.
If you look at the Xcode organizer, you should see your development profile in the list.
If it's red, that means your certificate has expired
If it's yellow, that means you don't have the private key present to sign using the selected certificate
In the project's Get Info window, under code signing, choose iPhone Developer for both pickers. Take a look at see which one is automatically selected (sometimes you have to manually choose the right one).
Then do a Clean & Build and you should be good to go.
I made the mistake of looking in Wrong place in Organizer.
On the left is LIBRARY then below that DEVICES
I had clicked on my Iphone under DEVICES > Prov profile.
No refresh button there.
Correct place is
On the left in ORGANIZER is Library > Provisioning Profiles
then Team provision Profile is here
Click on it and hit refresh if expired
As always.... "grep -ir profile ." and the cmd line are always your best friend when you want to fix an Apple frustrating, inconvenience and pain in the ass.... Spent almost an hour poking around xcode trying to find that option to enter the new provisioning profile number, and none to be found... Only when I grep'd for it, was I able to fix, yet another apple pain in the ass.... I can't tell you how many times I've spend hours going through xcode, stuck, because it won't compile because of some stupid invalid setting, profile or argument, only to fix it when I fell back on grep & ssed...
This worked for me:
start xcode.
Window->Organizer from menu
Choose "Provisioning Profiles" from DEVELOPMENT menu.
click refresh button
exit organizer
return to xcode main window.
Build->Clean from menu
build and run.
I fixed this by going to the portal and clicking "modify" on all expired profiles. Then click "select all" for devices and submit.

Is it possible to Test iPhone Application on Actual Device rather than Simulator?

I wants to test my own application to my actual iPhone Device rather then simulator.
So, is there any chance to do so with ?
I have an apple developer account.. But don't know the procedure, Please help me if u have any solutions..
Thanks in advance...
Log in to http://developer.apple.com/iphone/ with your developer id and password.
Then:
http://developer.apple.com/iphone/manage/team/index.action and set up your team.
http://developer.apple.com/iphone/manage/certificates/team/index.action to create your certificate
Download the certificate you just created and double click on it to run Keychain Access and install it.
http://developer.apple.com/iphone/manage/devices/index.action to enter your iPhone's id
http://developer.apple.com/iphone/manage/bundles/index.action create an appID
http://developer.apple.com/iphone/manage/provisioningprofiles/index.action to download a provisioning profile
Drop that provisioning profile onto Xcode
Go into your project's info.plist and change your Bundle identifier to be the same as you used for the provisioning profile, minus everything up to the first "."
Go into your project's Build Info, and select the appropriate Code Signing Profile
I think now you're ready to go. Select an iPhone Device from the pop-up menu in your main project browser window, plug your iPhone in and let Xcode see it, and then Build and Run.
You can, but as iPhone applications need to be signed - you need to be a paid developer. It is then a case of logging into the portal, assigning a test device, application settings and then downloading a provisioning certificate.
The procedure is cumbersome, however it is very well documented.
You need to create your Developer Certificate and a Certificate for your software projects.
Go to http://developer.apple.com/iphone/, log in and click iPhone Developer Program Portal on the right side. You will find a "launch Assistant" there that will guide you through the next steps. It's pretty easy.
You have to join the iPhone Developer Program, which is $99 for the Standard Program, $299 for the Enterprise Program.