Validating error after archive in iOS - ios

I am trying to upload this ionic project for iOS devices using Xcode 7.3. I successfully created all the certificates and app ids and then archived. But after that, when I click on the validate option I get an error, which I do not understand!
The error says:
Failed to locate or generate matching signing assets:
Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues.
An App ID with identifier 'com.*****.******' is not available. Please enter a different string.
THankx in advance

I got the same issue with upload from Xcode7.3. Before xcode7.3 that we dont need to create an app on iTunesConnect and we can create an IPA file and all the things. But i did Fix this issue by following:
Open iTunesConnect and login with Apple-id password.
Create new iOS app and select the identifier that we used in our Xcode project.
After that you just need go in Xcode and select device and create an archive.
Do the same step that you did before and the error goes away.

I got the same issue. Check the following steps :
1) Check if the bundle ID of your project in Xcode is same as the bundle ID associated with your AppID in Member Center.
2) Make sure you are selecting the correct Distribution Certificate and provisioning profile.
3) Make sure you have created an app on iTunes connect. Crosscheck the bundle ID there as well.
Now try to archive and validate again. Hope this solves your problem.

Related

Failed to register bundle identifier

I need to put the latest version of the app on AppStoreConnect to test it on TestFlight.
I encounter a problem when archiving the project in order to upload it on AppStoreConnect and be able to add a new version of the app and test it on TestFlight.
I have been added as a developer in AppStoreConnect in the project.
So I added my profile in Xcode with the right email address. During archiving, these two errors appear:
Failed to register bundle identifier: The app identifier "com.xxxxx.app" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.`
No profiles for 'com.xxxxx.app' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.xxxxx.app'.`
I confirmed with the project manager the bundleID which is good: "com.xxxxx.app".
Despite several tries and research, I haven't found the solution to this problem, so I can't archive the app so I can add AppStoreConnect.
Thanks for your help
Trying changing Team to just "Your Name" without (personal team) extension. This is what worked for me.
Hey :) when opening preferences for Xcode do you see your company user account?
also when opening the target app underder singing & capabilities, do you see that it is all clear there or is there an error? (you should see that under signing certificate field your account is configured)
I think the solution is to change the XXXX in "com.xxxxx.app" to unique value like your name and last name for example : "com.zizou.app".

An App ID with Identifier 'xxx.yyy.zzz' is not available. Please enter a different string when submitting new build

Here I already added a new version of my app on the iTunesConnect, and the status of the new version is at 'Prepare for Submission'. However, I have a problem with verifying my new build and submitting it to iTunesConnect.
The Error I got is An App ID with Identifier 'xxx.yyy.zzz' is not available. Please enter a different string
Here I left out the Bundle Identifier because I do not want to expose my app ID anyway, but I certainly sure that the bundle Identifier, Version, and Build version is exactly the same as what I added to the iTunesConnect (1.20).
I also already archived the app, but got stuck at the verifying process, and got this An App ID with Identifier 'xxx.yyy.zzz' is not available. Please enter a different string error.
Is this the proper way to submit a new build to the iTunesConnect? I think the system should match the App Bundle ID with the one registered at the iTunesConnect's database, and simply verify and upload a new build for me. I do not really know what is wrong here. It seems that the XCode is trying submit the new app, but cannot go through because the Bundle ID is already registered (with the previous version).
You should check the certificate and the AppId
Let XCode automatically manage the certificates and profiles to use:
on the Project Navigator click on the app
go to Build Settings
find the Code Signing section
change the Provisioning Profile to Automatic from the drop-down
change the Code Signing Identity to iOS Distribution
if the project builds without errors, you can Archive, Validate and Upload to App Store
the build will be available on iTunesConnect
If something is missing XCode will ask to fix it for you.
This is not related to the app version on iTunesConnect.
When submitting a version for review you can chose the build to use.
I also encountered the same problem. Xcode7.2.1.
Effective solution is:
You can try:
Closing Xcode.
Opening the keychain,deleting the certificate with the corresponding key string.
Opening Xcode, Preferences -> View Details -> Reset Certificate
Choosing the right certificate.

iOS Missing or Invalid Signature: The bundle is not signed using an Apple Submission Certificate

I have been trying to sign my iOS app for about a week now and when I attempt to submit to the app store through Xcode and through Application Loader I keep running into this error:
Application Loader
Xcode:
I am building the app with the Apache Cordova tools for Visual Studio and i have tried both building the .ipa file through visual studio under the 'release' setting and also using on the project files built by the 'remotebuild' tool on a mac to create a new Xcode project and then trying to archive and submit it to the app store that way.
In the Xcode situation, i have tried the solutions given in this question Failed to submit app to iTunes Store and i have made sure that the bundle ID of the app matches the bundle ID of the provisioning profile. When I run the validation and export tasks in the archive organizer they both work fine but i cannot get past this error despite that.
When i try to publish through visual studio, I am building the app with the 'release' setting so there is a .ipa file within the app's directories and then i'm transferring the files of my PC to my Mac with a flash drive, taking the newly created .ipa file, and submitting it through Application loader and it is giving me the same exact error. Does anyone have any idea how to verify or manually sign an app with a provisioning profile or can they recommend a fix to this bug?
EDIT:
I believe I have the correct keys in my keychain
I Resolved like this
open KeyChain Access application
Click Login in left-top Keychains section and then select Certificates from bottom-left Category section
Select "Apple Worldwide Developer Certification Authority", right click Get info
Change Trust value to "Use System Defaults"
Repeat this for "Developer ID Certification Authority" too.
I have got this issue. I have restarted xcode and tried again, then it works like a charm!
If this problem still persists, then I can Go to Keychain Access, delete all the expired certificates, and add the corresponding valid ones.
It's because the private key that is used for creating the provisioning profile is not installed to your KeyChain. I think you just download the provisioning profile directly and archive? You should ask for the private key from the person who create that certificate. And then import to your KeyChain. This error will go away.
For me, I actually had a distribution certificate that was set to "Always Trust" on Keychain Access which resulted "iOS Missing or Invalid Signature: The bundle is not signed using an Apple Submission Certificate" issue.
Once I changed back to "System Default" the problem went away.
Thanks kampai for pointing me to right way.
If you are using old Xcode (like me with xcode 11.3.1 on virtual machine), downloading intermediate apple certificate will help (you can do it at developer.apple.com when adding new cert.), then add it to your keychain by clicking on it.
I got this issue too. And resolve it by updating Dev Key and Distribution Key on KeyChain Access ( Developer give me wrong key). Then I Export Archive and Upload to Itune
Per #Kanak
For Cordova/Ionic,
Go to xCode
Workspace/Project setting
In the dropdown, select Legacy Build System
I got this issue resolved by resetting the provisioning file that is by first setting it to automatic and then manually set to appropriate settings. Then cleaned the build and rebuilt and submitted without any issue.
This can also happen if you are trying to upload and submit a build created with xcodebuild after an Xcode or OS X version update if you haven't installed the latest Xcode components on the your machine or build server (and didn't use the -runFirstLaunch parameter).

iOS app submission : invalid signature

I'm struggling with this issue for more than a week now, I've tried all I could find on Google with no luck. This is my first time trying to submit an app to the App Store, but I keep getting this email after each try:
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.
so here is what I'm doing:
I have my distribution certificate in login keychain , with the
private and public key .
I have the distribution provisioning profile with the same certificate i've created earlier .
The bundle ID on my provisioning profile is the same on my iTunes connect app and the
same in Xcode general settings .
The same version (0.8.2) in iTunes connect app and Xcode .
I'm building with device selected not a simulator (but i don't have a device connected to the mac).
the code signing part under build settings (for both target and project).
I have "iPhone Distribution : ... " for everything and also i'm selecting the distribution provisioning profile .
What I am missing? I've looked all over and all I find is people with incorrect versions or incorrect bundle id.
I am using Cordova and Ionic to build my app, I don't know if that has something to do with it.
I've seen the troubleshoot guide of Apple on this issue and ran this command:
codesign --verify -vvvv -R='anchor apple generic and certificate
1[field.1.2.840.113635.100.6.2.1] exists and (certificate
leaf[field.1.2.840.113635.100.6.1.2] exists or certificate
leaf[field.1.2.840.113635.100.6.1.4] exists)' /path/to/the.app
I get : a sealed resource is missing or invalid file modified: /path/to/MyApp.app/MyApp
they suggest to run this to resolve the issue: dot_clean path/to/xcodeproject
But that didn't help, I keep getting the same error.
Please help, I'm out of clues
EDIT ( Solution )
Apple is just a big stupid company, none of the suggested solutions under any of the posts helped me ! it was just the stupid process of apple , I had an invalid character "?" that should have been removed from the App Name. I wish Xcode coulde validate the name first before going into any of the submitting and testing process.
I think you are not using the proper distribution profile.Create a new distribution profile in itunes connect for app store submission not the ad hoc one. see the below image.
1)Then, check your bundle identifier that should exactly match with the newly created appstore certificate.
2)Just Delete your certificates in Provisioning Portal and update the new certificate in Xcode.
3)Goto Organizer / Provisioning Profiles / Refresh and allow Xcode to fetch the latest ones.
4)then go to project target->build settings->build options->validate product and change your release mode to yes. see the image below.
then,clean your project and generate the archive.
I had the same issue because the application archive contained files with non-ASCII characters. I renamed all of them and then it worked.
You can find all files with non-ASCII characters by executing the following command in the terminal from the archive folder path:
LC_ALL=C find . -name '*[! -~]*'
Build Settings-> Build Options: Enable Bitcode = Yes helped for me. I could see the error still, but waiting a little Xcode passed it, and continued to upload the application.
I had the same issue a couple of days ago and in the end I had to clean my distribution certificates from Keychain Access, remove and regenerate them from the developer portal. After reinstalling the certificates I was able to build and run the app on the physical device, then archiving it and sending over to the App Store.
All the steps you listed here are fine. If you can connect to a physical device and make sure your certificate is listed between brackets for the code signing settings.
I had to go through the same
frustration in order to learn that the best resource to learn how
Provisioning works is the App Distribution Guide.
Additionally, there are quite few threads on StackOverflow dealing with the same or similar issues like this one: App Submission: Invalid Binary - Invalid Signature
Good luck!
Make sure your bundle id should match with App ID and Change project edit scheme to release .
If not try this link http://stackoverflow.com/questions/5196309/ios-code-signing-fails-a-sealed-resource-is-missing-or-invalid
I have a same problem with xCode 13+, in my case i just replace the target name with not special caracter.
That fix solved my problem 99% because i have multiple targets on my project and some targets presented this problem because contained special carcters in the target name.
I did run into the same problem as this today, turned out to be a .DS_Store file in the Resource directory. Removed that file before building and then everything worked out.
I have a same problem. Then, I found the best solution to fix it.
Replace your Product Name of your App by the new name in which without Unicode Characters.
Go to [App] > Target [App] > Build Settings > Packaging > Product Name.
Fix Invalid Signature

Xcode 7.3. Your account already has has a valid destribution certificate and than an App Id is not available

After update to Xcode 7.3 I am getting errors while trying to submit my app on beta testing via TestFlight. It is very strange because I have managed to submit more than ten build with the same App Id.
I am making an archive and tap on Upload to App Store
As the result I am getting and error:
"You account already has a valid iOS Distribution certificate. You have a valid iOS Distribution certificate in the Member Center, but it is not installed locally. If your signing identity is installed on another Mac, you can export a developer profile on that Mac and import it on this Mac. You can also reset your current certificate."
If I tap cancel on this warning message, I get the new one:
"Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues. An App ID with identifier 'com.abc.Defg' is not available. Please enter a different string".
I have the same thing.
Where are different ways to solve your problem :
1.To install certificate again from member center to your mac.
2.To install one new certificate and news parameters(app_id, and others) to your application.
I didn't find why it's happening now, but if I can help you-great!
Sorry for my english, GoodLuck!
Ruslan, follow the steps below:
Go to your Xcode > Preferences
Make sure you're on 'Accounts' tab
Click your apple id
Click 'View Details' and inside 'Provisioning Profiles',
if you already have profiles, select all and delete them. Restart your Xcode and come back to this state (following above steps) and click 'Download all'.
**If you don't have any profiles in step 4, just click 'Download all'
After this, try again!!
I believe this one issue is only for Xcode 7.3. If you install later version, for now only beta GM is available, you will cope with such an task.

Resources