I have registered for Apple Developer Program. I have installed my provisioning profile and other certificates successfully. But still, I am getting error while installing the app for ad-hoc distribution.
I am not sure about this, but I am getting my company name as "CXXXXXXXXX.abc-xyz.com" in mobileProvision certificate. Although I have entered my company name as "abcxyz" in developer profile.
Now, in info.plist, I have tried many options like com.abc-xyz., com.com.abc-xyz., com.abc-xyz.com.* but none of them works.
Here's the error that I am getting while installing:
Provisioning profile specifies the Application Identifier 'abc-xyz.com' which doesn't match the current setting 'com.abc-xyz.ApplicationName'
As far as I know, I think the problem may be in my company name as it contains '-', '.' and 'com'. But I have never entered name like abc-xyz.com anywhere apart from my email address. i.e. xxx#abc-xyz.com
I don't know if I am missing something. Is there any solution for this? Plz help if you have any suggestions.
Thank you.
The bundle identifier in your info.plist should match the App ID of the provisioning profile. If your provisioning profile has an App ID of "CXXXXXXXXX.abc-xyz.com" then it will only sign apps with a bundle identifier of "abc-xyz.com", not "com.abc-xyz.ApplicationName".
You need to make the provisioning profile's App ID and the bundle identifier match. One way to do this is to set the App ID in the provisioning profile to "CXXXXXXXXX.com.abc-xyz.ApplicationName".
You can make the provisioning profile work for any app for your company by using a wildcard. "CXXXXXXXXX.com.abc-xyz.*" will match any bundle identifier that starts with "com.abc-xyz.".
For simplicity, I tend to wildcard the whole string ("CXXXXXXXXX.*") for Ad Hoc and Development profiles.
I lost 1 hour messing around with the Code Signing Identity in my Project configurations with no luck. After I made the same changes to the Target everything worked.
Related
I have recently taken over an iPhone project and I have never used objective-c before.
I have to get the application to use push notifications, but the first appId is already live and uses a wildcard (so no push notifications).
I created another appId with an identifier and got push notifications to work.
However my workplace would like me to get notifications to work for the wildcard app (since we already have lots of customers using that app).
So how can I make the wildcard app update and use a unique identifier without creating a new appId (even with the same bundleId).
I am very new to all of this, so a step by step process is greatly appreciated (ELI5).
For reference I used keychain to get the private .p12 file and I use that on a windows server that runs a console app that generates the push notifications (sent to Apples apns server).
EDIT: I have done the following steps, can someone tell me what im missing?
1) Create new bundleId (using the same AppId).
2) Configure that AppId to use push notifications.
3) Create the CSR in keychain.
4) upload that to the portal and create a production cert.
5) Download that cert and export the private key.
6) Create a provisioning profile using the same bundleId as 1 (e.g. au.com.website).
7) Download that provisioning profile, put it in x-code and on my iPhone device.
8) In the build settings of x-code use the bundle Id and use the provisioning profile I created in step 6.
9) Archive the app, deploy by ad hoc, save the file to the desktop.
10) put that file in TestFlight, download the app from testFlight on my iPhone.
11) put the private key on my windows server and send the push notifications (they send w.o errors).
I don't get push notifications (the iPhone is set to revive them).
Once again this is working with another appId someone else made, so I know the code works.
Do not confuse the app identifier and the bundle identifier. The bundle identifier is something like: com.company.appname and is defined by an app's info.plist
The app identifier has an additional prefix (usually the team prefix) and can be containing wild cards. The app identifier is used to match bundle identifiers to provisioning profiles. A profile is only valid for that app that matches (excluding the prefix)
Now what you want is to keep the bundle identifier the same, because if you change that it becomes a new app. But you can change the provisioning profile and app identifier with every update.
I was in a similar situation a while ago when I had published an app with wildcard app id and I added an IAP to it.
You just create a new (non-wildcard) app id that matches the bundle id.
You enable the Apple services (IAP, GC, APNS) you require on the app id.
You create new provisioning profiles to suit your needs (App Store, Ad Hoc, Development)
You can then submit an update for your app with the new profile but unchanged bundle id.
As far as I know, what you ask is not possible.
https://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/DevPortalGuide/CreatingandConfiguringAppIDs/CreatingandConfiguringAppIDs.html#//apple_ref/doc/uid/TP40011159-CH18-SW1
Here is an older question, that may have an answer...
Updating live App ID for Push notifications
For Push Notification an appId is must.
For a step by step process Use the two part tutorial of raywenderlich. Hope this will help you.
We're one step away from our first AppStore deployment. Unfortunately we have to deploy under our customer's account (to show the correct company name)
At the moment we do not have access to the account's provisioning portal. My question is:
I could ask my customer to generate a distribution provisioning profile and send the *.mobileprovision file to me. Then I would ask them to create an iTunes connect developer account for me. Would this be sufficient for me to build the App on my box and to deploy it in the AppStore?
Or do I need my customer's Distribution Cetrificate (especially the private key - which he might not want to give away)?
Thanks four your help
Yes you will need the certificate, private key as well as the mobileprovision file for deployment.
hmm.. i m pretty new to.. But i think to deploy ur app on appstore u need to have ur clients submission certificate and a distribution provisioning profile.
hope it helps somehow... regards.
I have been working with 2 developer ids for a certain project now. I had developed the app using the 1st Id and tested it even. I need to submit the app to the app store using the 2nd Id, now i have all the right certificates and provisioning profiles in the right place. And i have deleted all certificates and provisioning profiles of the 1st Id. But still i Get this error
[BEROR]Code Sign error: The identity 'iPhone Distribution: Sam Sim' doesn't match any valid certificate/private key pair in the default keychain
iPhone Distribution: Sam Sim is of the 1st Developer Id which I have removed from keychain. Why cant xcode find the 2nd identity even though its present in the keychain
EDIT: might I also add that the first id is an Individual developer id where as the second is a Corporate developer id
Please help,
Thanks
Did you change the build settings for the target or project
Target->Info->Build->Code Singing
See update below.
This is driving me mad. I have followed all the instructions and also deleted everything and restarted multiple times but I still keep getting the message above.
I am wondering whether part of the problem is that I have switched from my previous Individual Developer Programme to my new Company One. I have read that I should use the Company Name in the Common Name field but that has not helped. It still creates a certificate with my name, not the Company Name.
I can see that I have a private key against my certificate.
I have tried with the provisioning assistant and manually, but to no avail.
Any ideas warmly welcomed.
Chris.
Update:
#Bastian - thanks - this is just for Development on my new Company Developer Programme. Once this is working, I'll then need to do similar for Ad hoc distribution. I have had both Development and Ad Hoc Distribution working on my personal Developer Programme working for some time.
I have deleted the certs and profile and followed your steps, but I still get the same error.
Within Keychain Access, under My Certificates, it looks like this...
....\/ [] iPhone Developer: Chris XXXX (xxxxxxxxx)........certificate
........P Chris XXXX........................................................private key
and under Keys, it looks like this...
..........P Chris XXXX........public key
....\/....P Chris XXXX........private key
............[] iPhone Developer: Chris XXXX (xxxxxxxxx)........certificate
the name you enter when creating the key is completely irrelevant. It's just for you to identify the key in your keychain.
What type of provisioning profile is you problem? development or distribution?
You should do in the following order:
create a certificate request
upload the request
--- in a company account the team leader has now to confirm your request
download the signed key
after that you should have a public/private key pair in your keychain which matches the one in the developer account.
now the team leader has to add you to the provisioning profiles of the apps in the account
after you have beed added you have to download the provisioning profiles from the developer site
now you should have a working key with working profiles.
It turns out I was simply dragging the provisioning profile to the device within xCode organiser, not the library. Simple once I realised. Hopefully, this will help someone else.
I have downloaded a provisioning profile from my id, but when I drag into Xcode, and then in the provisioning profile section it says
a valid signing identity matching this profile could not found in key chain
I am trying to download the existing profile and drag into Xcode, but this gives me the problem that how could I deploy my application to the device?
Delete all your private and public keys. Create one new one by using the assistant to request a certificate...
Before you do anything else name the key by double clicking on it and typign a name that identifies it as the one key you will keep.
Delete all others.
See this question which you might have found with a quick search, from earlier today.
For the error:
Valid signing identity not found
see Apple's published steps to resolve this problem.
I had the same problem yesterday and solved it successfully. It took me almost a week to figure out the process.
I think your keychain does not possess a valid developer certificate or Apple WWDRCa certificate. To solve this download your developer certificate and drop it into your keychain. Then download the Apple WWDRCA certificate and again drop it into your keychain.
Remember that you must have your private key along with your developer certificate. By now, your keychain will have a matching profile. Now drop your provisioning profile in your Xcode and see. It should work.
I faced the same problem yesterday.For some reason i deleted my keys,because of that my provisioning profiles were with warning "valid signing identity not found".
As i worked on push notification previously i have saved "X.p12"file from private key .if u saved that then u have to double click on that and give that password that u given while saving it. that's it my provision profiles are valid now :).