Xcode Bundle identifier issue - ios

I am trying to install 2 apps that i made in Xcode onto a device and have only been able to successfully build one.
on the one that successfully built the bundle identifier was 123456789A.com.company.appnameProject where "Project" is the project name in grey un-editable text.
for the one that failed the bundle identifier does not have any non-editable text in it and I don't understand why one has un-editable grey text and the other doesn't.
This is the error description The identity '...' does not match any valiad non-expired certificate/private key pair in your keychains
I tried the following bundle identifiers to no success.
123456789A.*
123456789A.com.company.appname
123456789A.com.company.appnameProject (project is in editable text)
Note: I tried deleting and reinstall provisioning profiles and key-chains. I would be surprised if anything is wrong with my keychain or provisioning profiles since one app built successfully.

the gray text is uneditable because it uses a rfc1034identifier version of your bundle's project name
if you look at the target info you will see bundle identifier looks like this.
com.company.${PRODUCT_NAME:rfc1034identifier}
project name is the value next to the icon in the "Targets" section of your Project Property editor.
you can change the name of the target by clicking on the name once while it is already selected. or selecting it and pressing enter.
Changing the name of the target will change the grayed out value in your Bundle identifier.
Sometimes your provision file does not include all of the UDID's that it is supposed to.
You may try making sure they are selected in the itunes connect portal. then downloading a new copy.
You may also try connecting the ios device to xcode and setting it up for development in the "Organizer"
if that does not work. you may want to remove all the provision files from your xcode and from the hard disk where they are stored and re download them from xcode.
Occasionally it is temperamental

Try completing this way your Bundle identifier:
In your organizer/Provisioning profiles you can find the App identifier
12344545.com.name.*
In your Bundle identifier use only after the numbers(dot) and instead (*) your app name, should be this way:
com.name.AppName
This way the The identity '...' does not match any valiad non-expired certificate/private key pair in your keychains error should be gone, at least it was for me. Good luck.

I found out what was wrong. My Code signing identity for the debug phase was for the wrong certificate. It was a pretty simple and embarrassing mistake.
Also thanks to those who answered!

Related

How to Ensure the apps info.plist contains a value for CFBundleIdentifier?

The app will not run on the simulator or the device but the trouble started when i went to get it on device. Running the latest and greatest Xcode and macOS. Any suggestions are most welcome.
I suspect this issue is related to the unit testing targets but there is also odd behaviour in the "Signing and Capabilities", when i type in the bundle identifier "com.sw.fw" and hit enter the text in the the textfield vanishes and the "Signing (Release)" duplication appears below with that bundle id. I also created a fresh mobile provisioning profile with the appropriate bundle id com.sw.fw
I also know that Xcode is doing something with the bundle id that i'm giving it because it appears on the Certificates, Identifiers & Profiles page of developer.apple.com as can be seen here.
Here's the target signing after hitting enter.
Here's the "Build Settings" for the target
Here's my info.plist it is the same as an app i have running on device.
Here's a unit test signing
Here's the "Build Settings" for a unit test target
App Targets "General" pane doesn't let me type anything in the Bundle Identifier Field. You can see it reads <Multiple Values>.
check your Product Bundle Identifier from Build Settings, they might have different values for different builds. Changing the bundle identifier to be the same should solve this issue. In your case removing the 'Any SDK' under debug.
Target > Build Settings > Info plist file
Check Info.plist file path
I have faced the same error and I figured out that I have missed to add or somehow removed GoogleService-Info.plist file from my project while I am using firebase in my application. You might be doing the same thing.
It looks as if your .xcodeproj container was messed up.
Some options:
Make sure all targets (including tests and extensions) have the product bundle identifier set in their Info.plist files.
Try to set the product bundle identifier only in the target's Signing and Capabilities field instead of manually editing it in different places. Otherwise you risk introducing inconsistencies.
If you want to dig into project.pbxpro you could search for the PRODUCT_BUNDLE_IDENTIFIER key and manually check the entries. Compare with a fresh Xcode project on where/how you expect to find the key.
You can go by elimination and remove targets / custom configurations from the original project until it installs successfully.
Create a fresh Xcode project and move your code over.
Target > Build Settings > Packaging
In "Info.plist File" add "Target_Name/Info.plist"
In my case, the message was not corresponding precisely to the problem.
First, my Launch Screen in the General settings of the target was not good.
In second, I checked my Splashscreen.png that was missing, and I removed it. Then it worked perfectly.
I advice to check if there is an element missing in the ressource etc...

Xcode error: no provisioning profiles with a valid signing identity matching the bundle identifier

I'm trying to run an iOS app on my iPhone in xCode. The app is essentially a third party keyboard for iOS, and it was made by a group of friends. They have added me as 'developer' in iTunes connect. When I try to run the app on my iPhone I get the following error:
No provisioning profiles with a valid signing identity (i.e.
certificate and private key pair) matching the bundle identifier
“com.nameofteam.nameofapp.nameofapp-keyboard” were found. Xcode can
attempt to fix this issue. This will reset your code signing and
provisioning settings to recommended values and resolve issues with
signing identities and provisioning profiles.
When I click on 'Fix Issue', it says:
An App ID with Identifier "com.nameofteam.nameofapp.nameofapp-keyboard" is not available. Please enter a different string.
TL;DR Xcode is very particular about the name you give your App ID in the member center. Having the correct bundle identifier is not enough. You must use the specific format shown below for Xcode to "see" your App ID.
#romrom's solution of deleting the App ID and having Xcode create a new one was a clue. Unfortunately it was a nonstarter for me since my App ID was used by a Store app and therefore could not be deleted.
However, I discovered through some experimentation that I could solve the problem by manually editing the exiting App ID. It turns out that Xcode is really picky about the name of the ID, and not just the bundle ID.
For a typical bundle ID such as com.mycompany.appname, the App ID name must be in this format:
XC com mycompany appname
a name in any other format won't be seen by Xcode.
How to check if you're affected / How to Fix
Log in to the Member Center.
Click on "Certificates, Identifiers & Profiles".
One the left-hand navigation bar, click on "App IDs".
Locate the App ID with your bundle identifier.
If that App ID doesn't have the correct name format (as shown above), click on it then click the Edit button.
Change the name and click Done.
Enjoy the reduction in stress and anger.
P.S. There are some related problems if you're using Xcode 7.3 in which it won't automatically create proper distribution profiles for you, even if you fix the name as I mentioned above. The solution is to downgrade to 7.2.1 or 7.3 Beta or use a tool like fastlane/sigh.
Try this,
Add your Apple ID to Accounts preferences in Xcode.
Go to General tab in Project and choose your team name from the Team pop-up menu.
Below the Team pop-up menu, click Fix Issue.
For starters you want to make sure your bundle identifier is exactly the same as the one on iTunes connect otherwise,
since you seem to have the source code it appears the bundle id you are trying to use is already in use, try a different unique identifier.
Also make sure you have your Apple ID connected to Xcode, it can be added in the accounts section of Xcode preferences. You may also need to create a self signing certificate in keychain access.
as stupid as it sounds - make sure your Provisioning Profile is set correctly in the "Build Settings" tab, under "Code Signing" section, and that it matches the Code Signing Identity certificates.
In my case, I had the Ad-Hoc dist & Release provisioning profiles set correctly, but the the DEBUG was set to Automatic.

Submitting iOS app to app store application identifier invalid

I'm using xcode 5 and I guess I'm missing where to change the bundle identifier.
When I try to validate my app for submission to the app store, I get two errors....
Invalid code signing entitlements. Your application bundle's signature
contains code signing entitlements that are not supported on iOS.
Speicifically value 'K8TE8KDZ95.com.iclinical.child' for key
'application-identifier' in 'Payload/iResus.app/iResus' is not
supported. This value should be a string starting with your TEAMID,
followed by a dot '.' followed by the bundle identifier
and
The executable at Payload/iResus.app/iResus in Payload/iResus.app has
been signed with identifier 'com.iclinical.child' which does not match
the bundle identifier 'com.iclinical.childresus
I'm not sure where I should be changing this. The bundle identifier in the target is com.iclinical.child but clearly I need to change it somewhere else too....
Hope you can help.
I just had both these error messages and here is how I fixed it:
Went into iTunes Connect > viewed my app (under manage apps) and copied the 'Bundle ID'
Went into xcode and pasted the 'Bundle ID' into the info.plist 'Bundle identifier' field
Restarted xcode
Xcode > Window > Organizer > Projects > 'Delete' derived data file for project
Xcode > Product > Alt + Clean (to Clean Build folder)
I then tried resubmitting and it all went through correctly. I am 95% sure my Bundle ID was correct to begin with so it might have been something in steps 2 to 5 that fixed this.
Anyways hope this helps someone else.
In XCode 9, Open the Project Navigator, Select your target, check the following two places:
General ---> Identity ---> Bundle Identifier
Build Settings -> Packaging -> Product bundle identifier
Sometimes this issue happens when you have changed the Bundle Identifier in place 1, but place 2 did not change accordingly.
I had the same errors trying to validate an app that was originally developed with a different bundle identifier than what I had entered into itunesconnect.
There were two issues that I came across:
If you change the bundle-identifier in XCode (General tab, Info tab or Info.plist), XCode won't archive the app with the new bundle identifier (in some cases) until you restart XCode.
If XCode is managing your provisioning profiles dynamically (normally using a wildcard bundle-identifier) and you are trying to use a fixed bundle identifier, you have to choose the static provisioning profile in your build settings.
I was surprised by the second issue because I never used XCode with a fixed provisioning profile and never had to download a profile in the past.
Since I wanted my app to use a wildcard bundle identifier, I changed it in itunesconnect and updated my settings, restarted XCode and my app validated.
Hope this helps.
I got the same error, although I already submitted the app with this BundleID multiple times.
What solved the problem: performed Product->Clean and restarted Xcode.
I'm using xcode 5 and I guess I'm missing where to change the bundle identifier.
In Xcode 5:
Open the Project Navigator
Select your project name at the top of the tree on the left
Single Click directly onto the project name (it should become
highlighted)
Change the project name (the bundle id will be updated)
Once you highlight the blue project icon at the top of your project
navigator you will have several tabs on the right hand side appear.
Your bundle identifier should have the default value as noted below:
com.company.${PRODUCT_NAME:rfc1034identifier}
You might also want to create a sample empty project and note the project info defaults compared to your current settings.
Hope this helps.
The appID in the Apple developer portal (and the assigned to it distribution provisioning profile) is not the same as the bundle id in your project. You should change one of them. They should match in order to upload the app in the app store.
How I resolved this:
Cleaned the build folder. Menu -> Product -> Alt key: Clean build folder.
Closed the XCode.
Deleted derived data.
Restarted my system. (Had to try this because steps 1 to 3 did not work for me as suggested in other posts).
After this created an app archive and it worked.
Ok this is incredibly dumb, but I had the exact same issue when working on two open projects at once in Xcode 11. The apparent solution was to quit and restart Xcode. I suspect there is some sort of Xcode bug or failure to context switch.

Profile doesn't match Application Identifier com.domainname.helloworld

I try to run a HelloWorld project into my client device, the application identifier in Xcode is: com.domainname.HelloWorld, and when i created the provisioning profile, in the AppID, i have putted: com.domainname.helloworld (lower case).
Now, in Xcode, i try to assign the code signing identity to the provisioning profile i have created, however, in the drop list, i can see the provisioning profile but i can't select it.
I am following this tutorial and i have doubt i didn't knew how to Don’t forget to add the new provisioning profile to XCode as well.
Can you please help me there? thanx in advance.
BundleIds are case-sensitive.
Make sure you call it com.domainname.HelloWorld in your Info.plist.
From Apple Documentation:
Typically, the bundle ID in your Xcode project is a string formatted
as a reverse-domain name such as com.MyCompany.MyProductName, where
you replace MyCompanyName and MyProductName with your domain and
product name. However, unlike domain names, app IDs and bundle IDs are
case sensitive.
I had the same problem with my application Extinct Birds, Xcode adds disabled suffix with project name in Application Target->Bundle Identifier
Way to find this in your project Info.plist is by searching for CFBundleIdentifier
You may get the following text entry form the file
CFBundleIdentifier
com.softwebsys.ExtinctBirds${PRODUCT_NAME:rfc1034identifier}
For me removing ${PRODUCT_NAME:rfc1034identifier} from the string worked well. Here is my final entry
CFBundleIdentifier
com.softwebsys.ExtinctBirds

contains entitlement values that are not supported

Have created an app-id as normal.
Then created an app-store distribution profile...as normal.
Set up the game in itunes connect
Installed the profile
Built the game with GS...all goes fine.
But when I upload my binary is rejected with that error : Invalid Code Signing Entitlements
Invalid Code Signing Entitlements :
The signature for your app bundle contains entitlement values that are not supported. For the com.apple.developer.ubiquity-container-identifiers entitlement, the first value in the array must consist of the prefix provided by Apple in the provisioning profile followed by a bundle identifier suffix.
The bundle identifier must match the bundle identifier for one of your apps or another app that you are permitted to use as the iCloud container identifier.
Specifically, value "(my team bundle seed id is here).*" for key "com.apple.developer.ubiquity-container-identifiers" in basejumpxl is not supported.
Really not sure what I have done wrong...as I have done this loads of times, and never had this issue
Anyone point me in the direction of what my obvious mistake might be??
I finally successfully submitted the app, and it's now "Waiting for Review" status.
The problem is with the new "Enable for iCloud" configuration in App ID's.
Here's what I did to fix it. Hopefully this will help anyone who's having this issue.
In iOS dev portal:
Save yourself some time and just go ahead and delete the provisioning file you previously made for the new app you're trying to submit. (you may have luck by simply renewing it, but probably not.)
Go to your App ID, and click on configure. Once in configure, UNCHECK "Enable for iCloud" and click "DONE". iCloud configuration is what's causing the error. (This option had disappeared earlier, but is back again.)
Make a brand new provisioning file for Appstore distribution, and select the proper app id.
Download this new provisioning file.
Add this newly downloaded provisioning file into Xcode's organizer. Easiest way is to just drag and drop the file overtop Xcode's app icon.
Re-publish your game in Gamesalad, making sure to choose the NEW provisioning file you just created. (I went ahead and deleted the problematic provisioning file so I didn't get confused and accidentally choose the wrong one when publishing.)
Re-submit through Application Loader.
Hope this helps. :)

Resources