which certificate and provisioning profile are used to sign my application? - ios

I'm try to develop an iOS app and the current Build Settings are:
Code Signing Identity
Debug: Don't code sign
Any SDK: iOS Developer
Release: Don't code sign
Any SDK: iOS Developer
Provisioning Profile: None
How come that I'm still able to run the app on my iPad even though I've not selected any Provisioning Profile and selected "Don't code sign" for the Debug setting?
Is there a way to see which profile was selected for this app (even though I didn't select any)?

You can see what code signing identity and profile are being used by looking at the build logs in Xcode. Go to View > Navigators > Show Log Navigator. Find your latest build and select "All Messages" at the top of the log. Scroll down towards the bottom of the log and you should see a "CodeSign app_name.app" entry. click on that and expand it by clicking the 3 little lines on the right side. The log will then say "Using code signing identity "foo" and provisioning profile "bar"

Related

How do I code sign ios app using xcode ? (For clients)

How can I code sign Ios app using xCode for a client. He already sent me a certificate and a provisioning profile but how to use them to code sign the app.
Notes:
1- I don't have an apple developer account.
2- the app is developed by Unity.
3- I used cocapods for google play services to work on Ios this is how I used it (Check out FaHu answer).
Please help I've never used xCode before so am new to Ios in general if you can provide a step by step that will be so appreciated as am stuck to do this for a month and a half.
First of all, import the Development Certificate into Keychain Access by clicking on it. Then, go ahead and add the provisioning profile to Xcode by clicking on it as well.
In Xcode, go through the following steps:
In the upper left corner, click on the Xcode project icon
Go ahead and click on PROJECT, then Build Settings at the top.
In the next view, scroll down until you find the "Code Signing" area. For "Code Signing Identity", go ahead with the name of your Certificate (click on the current value for a dropdown). You do that for both, "Debug" and "Release" as well as for "Any iOS SDK". Then, you click on the provisioning profile and choose your clients profile.
Repeat steps 2 & 3, but this time not for PROJECT, but for your TARGET on the left side. Also, For the target go to the "General" tab and choose the Team your Certificate is bundled to from the dropdown window.
Be sure to login with the Apple ID the certificate is bundled to. You can do that in the Xcode settings (cmd + ,).

How to test Cordova/ionic app on iOS device?

I'm building an app which now runs fine in the iOS emulator, so I now want to test the app on an iOS device. I registered with the Apple Developer Program and ran ionic run ios, which ended with the following message:
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.2'
So I opened XCode and went to Preferences > Accounts and added my Apple ID. I then clicked View Details... and then the refresh icon so it fetched two Signing Identities. The box below which should display the Provisioning Profiles is empty though:
I then read this article on the Apple Developer site which explains that I need to:
Set a bundle ID
Assign my app to a team
Create the Team Provisioning Profile
The bundle ID should supposedly be set in XCode. Because I am under the assumption that the bundle ID is set in my ionic config.xml file I'm unsure of how to proceed though.
Does anybody know how I can (preferably very easily) test my app on iOS devices? All tips are welcome!
What I did was to create a new project into Xcode, as soon it is created is showing the General tab, under Identity is showing a message saying that can not find the proper certified, something like that, and there is a button "Fix..."
just click it, the passport is requested and you are done.
I just try again and works. Xcode fixed my provisioning profiles sync for me.
Try this
Select Preferences from Xcode
Go to accounts and select agent name
Select view details to check status of your profiles
Select any profile and click refresh on corner below to update profiles.
This should update your profile with expiration dates
Go to project General and downgrade to 8.1.

XCode doesn't honor the "iOS Distribution" Code Signing Entity setting

I want correctly understand the Code Signing Identity setting: I want to use the automatic setting in Xcode and not specify a specific identity. The automatic setting has 2 choices: iOS Developer and iOS Distribution. Based on which one you use, it's supposed to switch to choose a developer or a distribution signing identity from your keychain.
I have my build settings configured as follow, in order to use an "iOS Distribution" identity on build:
When I Archive my app (the Archive scheme is correctly set to use the Release build configuration), I see that Xcode is not using the correct code signing identity:
Anyone would know why this is the case? I'm looking for an explanation and not a workaround solution (I know I can work around the problem by directly setting the Code Signing Identity to my iPhone Distribution: Company Name identity from the keychain)
Thanks!
So interestingly this doesn't actually matter in the latest Xcode as long as the profile you are eventually going to sign with is for the same bundle identifier as the one its signing with now...
As long as the team setting is set Xcode is capable of generating the profile you need automatically. Don't try to fight it.
Here is the Team setting from the Target's General settings screen:
Then when you archive Xcode puts the archive in the organiser. When you click distribute on the archive in the organiser window it prompts you to select a new signing identity and actually re-signs the app.
It actually works to sign apps with the team provisioning profiles generated by Xcode. You also don't need to make an ad-hoc specific provisioning profile as your testers can now install apps signed using the development provisioning profiles with no issues. The only time you will need to make your own provisioning profile is if you are using any of the concrete bundle id features like push notifications, game centre, data protection, iCloud, inter-app audio, passbook, keychain access groups or in-app purchase.
If you make your own provisioning profiles for specific bundle ids then Xcode will either automatically select, or have available for selection, the relevant provisioning profile at the point of choosing the identity in the organiser window.
You can refresh Xcode's cache of provisioning profiles from the Accounts pane of Xcode's settings. Click on your team, Click "View Details" and then click the tiny refresh button in the bottom left corner

Can't install Distribution provisioning profile

I'd like to submit an app to the AppStore (my first app !).
I've already tested the application in my device (so I already have a development provisioning profile) but I'm not able to install a Distribution provisioning profile in Xcode.
I've followed the procedure (I don't know how many times) but when I try to add the provisioning profile through the Organizer I have following problems:
if I double click on the file nothing happens
if I click Add, the file is not selectable (grey)
if I drag and drop from Finder I see the following message: 1 profile
cannot be installed on "iPhone of Corrado". "iPhone of Corrado" is not included in this profile.
What does it means ?
If I go in the Development Center\Certificates, Identifiers & Profiles\Provisioning Profiles\Distribution and edit the profile, there is no devices and there is no way to add any (while in the Development provisioning profile I see all my devices).
What I'm doing wrong ?
Thanks, Corrado
I don't know which Xcode you are using, but supposing you are using Xcode-5, i suggest you use the automatic provisioning profile sync feature.
Just go to Xcode>Preferences and select the Accounts tab.
If you don't have any Apple IDs account signed just click on the '+' button on the bottom left and select 'Add Apple ID...', put the id and password that you use to log on the apple developer.
After that just click on the 'View Details...' button on the bottom right, and your signing identities and provisioning profiles should appear there. If they don't, just click on the bottom left refresh button.
I've just spent the last 12 hours trying to figure out why my OSX App wasn't code signing and the error was related to the provisioning profile containing 0 devices for my Mac. After following the advice above, much head scratching, deleting and re-creating certificates, the following link provides the correct approach for Distribution provisioning
https://developer.apple.com/library/ios/qa/qa1814/_index.html
Moving forward it seems that for Mac App Store Submission on OSX the correct code signing identity to use is Mac Developer and set the Provisioning Profile to Automatic.
You do need to restart Xcode during the Code Signing and Provisioning reset, but it does work.

No identities were available - administrator request

I had problems while "archiving" my app. I think there are invalid profiles because of iPhone Update to 5.1 and XCode update to 4.2.2.
I've taken now more than 4 hours to get rid of certification issues while using this thread step by step 3 times (which costs a lot of time):
Getting "A valid signing identity matching this profile could not be found in your keychain" warning
I still have the following fault:
No identities were available
An administrator must request identities before they can be downloaded.
The "Download identities" button went back to this window after processing some seconds.
Do you know how to get out of this wood of certification documentations and solve that fault?
Visit Member Center
Go to "iOS Provisioning Portal" -> "Certificates" (Left sidebar) >> "Distribution" tab
Check field "Provisioning Profiles". If empty, next (4)
Go to "Provisioning" (Left sidebar) -> "Distribution" tab. Press "New Profile" and complete it.
Go back to (3) check the field again.
Download and "run" (double click) the new provisioning profile.
In your project's build settings select the NEW provisioning profile (it might have the same name as the old one)
In your project's build settings update your code signing identities (all of them) to the new one if there is one. (The old one was probably expired which is one of the biggest causes for the error message you saw)
Verify that your bundle ID is correct (CaSe SeNsEtIvE)
Back to XCode Organizer - Devices. Click TEAM (Left sidebar) and click "Refresh" (right-bottom). You will find XCode fetch the new profile. If new content loaded, repeat steps 6 and 7 (they will have been changed!) *If you can't find team because you are running a newer version of xCode, go to Xcode preferences (clicking "Xcode" on the mac toolbar on the top left corner of your screen) and go to account, select your team and click refresh. If new content loaded, repeat steps 6 and 7 (they will have been changed!)If you are in Preferences -> Accounts and you still can't refresh, then:
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Validate or distribute your app again. It should work.
If this didn't work then go to "TEAM" under project settings > targets and select "none"... Now that you have selected None you will need to repeat step 7 and change the code signing identities (all of them) and try archiving again.
Lastly, if none of the above worked. Simply create a new production certificate AND create a new provisioning profile with the same bundle ID. (Yes, this will work if you are updating an app that is already live). Download the cert and prov. profile and run both (double click). Now repeat step 6 and archive. This should work.
#Takoi's answer is correct. However, with my latest version of Xcode, there is no TEAM option in the Devices section of the Organizer. I had to do the following instead to refresh the credentials:
Go to Xcode->Preferences
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Hope this helps!
Make sure the bundle id in your .plist file in XCode is the same as the bundle id in itunesconnect, if it's off, it won't be able to match the archive to the profile on itunesconnect when validating/distributing.
This is a little easier now.
You go to the app itunesconnect and login
click "certificates"
Provisioning Profiles / Distribution
generate a profile,
download the profile
double click it
I am a member of 2 teams and had the same problem while uploading one of the projects.
Changing General -> Identity -> Team to None in project settings (XCode 5) allowed me to upload the application to iTunesConnect.
Screenshot is here
My certificate had expired which resulted in my provisioning profile being expired.
Once I -
Updated my certificate on the iOS web portal
Clicked Edited on the provision profile
Selected the new certificate and clicked generate
In Xcode I refreshed my provisioning profiles
Error went away
I guess it is written somewhere in the stream, I did not read all in detail. I just want to emphasise on this point:
Due to an annoying xCode behavior, once you've set up everything, you HAVE TO clean the project and Quit xCode.
Then relaunch and build. Now you know if it works or not.
It looks like you're going to have to request another developer cert. Go to the iOS dev center website and go to the provisioning portal. Click the certificates tab and follow the directions. https://developer.apple.com/ios/manage/certificates/team/howto.action
To be clear, you're problem doesnt seem to be provisioning related, it's specifically the developer cert. if you do get another cert, you'll have to create all new profiles to sign your apps with.
My bundle identifier was named differently. I had to change it from Nyquist.GasBro to com.Nyquist.GasBro which is what I had in the provisioning profile.
None of previous answers helped me, so I post my issue.
Dev Center: Certificates, Identifiers & Profiles > Provisioning Profile > Distribution
Make sure that there is a distribution provisioning profile, and App ID in it is exactly the same as Bundle ID of your app in Xcode (Project Settings > General > Identity > Bundle Identifier).
Xcode: Project Settings > Build Settings > Code Signing:
Provisioning profile - choose that Distribution provisioning profile name (not Development!)
Code Signing Identity - I choosed Automatic since I have only one.
P.S. Before doing this, I deleted all unused and expired provisioning profiles and signing identities from Dev Center and from Xcode. Then, refreshed as mentioned in other answers: Xcode: Preferences > Accounts > (my Apple ID) > View Details > Refresh.
The answer that you are looking for is that when you generate the certificate request for COMMON NAME you need to put your HUMAN NAME as in John Smith, not your app name. Apple uses this term Common Name in 2 different ways and doesn't tell you that the certificate is supposed to have your name on it whereas in another area they ask for common name and want the APP name.
I had the same problem.
Nothing mentioned on this page did not work for me until i was deleted everything from archive.
After that problem disappear.
For those who says that the Ad Hoc Distribution profile wont work this year 2014, I have to agree.
In Build Settings locate the Code Signing setting: for Release choose your Store Distribution and then select Menu>Product>Archive.
Later, in the Organizer Window, select your archive and clic in Validate. It will let you select the Ad Hoc profile and validate... then select Distribute, it will let you save as .ipa file.

Resources