Unable to submit to App Store - Application failed codesign verification

Apologies if this is in the wrong forum, wasn’t sure if it went here or ‘Build Questions’.

Basically, I am trying to build the app for distribution on the App Store, but every time I do I get the following error:

[code]warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
failed to extract requirements data: 1
/Users/mike/Apps/Compiled/PirateIsland.app: code or signature modified
failed to extract entitlements: 1

  • (null)[/code]

This is the 6th app I have submitted to the App Store, so it’s not something new to me. I have done all of the usual troubleshooting processes when something goes wrong here - deleting all of the certificates and keys on the machine, and then making new certificates and provisioning profiles on the iOS Dev Center. I always get the same issue though.

I have a valid Apple Worldwide Dev certificate. I also have valid key pairs for distribution. Here is a screenshot of my Keychain Access. http://img836.imageshack.us/img836/6970/screenshot20111210at161.png

It is also worth noting that this is an update to an existing app, and not a new app submission. As such, the setup on Apple’s side of things should be tried and tested. My App ID is a wildcard, NOT fully-qualified. I can’t create a new App ID as this is an update. I hope this isn’t an issue.

I get the same error from Corona as I do from the Application Loader when I try uploading the zip directly.

All of this is extremely frustrating, and I’m in a rush to get it submitted before Christmas (annoyingly the change itself took 30 seconds to make, but I’ve been stuck on this for days). Any help is hugely appreciated, as always. [import]uid: 62042 topic_id: 18931 reply_id: 318931[/import]

Just had the same issue recently. Follow the tutorial in this link a few comments down:

http://stackoverflow.com/questions/2714517/a-valid-signing-identity-matching-this-profile-could-not-be-found-in-your-ke

[import]uid: 10903 topic_id: 18931 reply_id: 72939[/import]

Have you installed the latest Xcode (Xcode 4.2)? We had one report that upgrading to 4.2 solved some signing problems. (Apple may have changed things when iOS 5.0 was released.)
[import]uid: 7563 topic_id: 18931 reply_id: 72967[/import]

I’ve just updated to XCode 4.2 and I’m getting an even more strange error.

I have CFBundleIdentifier = “com.bamify.pirateisland” in my build.settings. If I compile in Corona with this then Corona gives me the error:

This bundle is invalid. The application-identifier entitlement is not formatted correctly; it should contain your 10-character App ID Seed, followed by a dot, followed by your bundle identifier: YZAB7SKS75.PirateIsland

If I then submit manually through Application Loader then I get the same error.

If I remove the CFBundleIdentifier line from my build.settings then Corona returns no errors and allows me to upload using the Application Loader. However, it then fails and gives me an error saying my Bundle ID does not match the one in iTunes Connect (com.bamify.pirateisland).

Any ideas? This is frustrating to say the least. I have done the usual of deleting everything (certs, profiles, etc) and re-adding. [import]uid: 62042 topic_id: 18931 reply_id: 73068[/import]

Ok, I’ve managed to sort it (after 5 days of faffing).

For the benefit of anyone else who finds this, it was down to the fact that the App ID wasn’t fully qualified.

The original App ID in the provisioning portal was: YZAB7SKS75.*

You cannot change the App ID. I can, however, add new App IDs. I didn’t think this would work because this was an UPDATE to an app rather than a new app submission. Considering I was 5 days in and smashing my head against brick wall after brick wall I thought it was worth a go. After adding the new app it had the same Bundle Seed ID (YZAB7SKS75), so the new App ID was: YZAB7SKS75.com.bamify.pirateisland

After removing everything, rebooting at every stage, and readding it all, the app went through first time.

I think Apple really need to sort all of this stuff out. It’s a process that doesn’t need to be so complicated. I understand what each part of the process does, but I don’t agree that it’s needed. I would settle for improved debugging. Considering I could submit fine with the old App ID, I have no idea why I couldn’t submit it this time without making new App IDs - it’s just unacceptable. Other stores are far easier to submit to and have the same, if not more features. With regards to debugging, the error I received was far from helpful. It was essentially saying that my bundle ID was X, but it needs to be Y. When I changed it to Y I got a new error saying it needs to be X. Frustration and days of hair pulling follows.

Sorry for the rant. I could have written a new game in the time I’ve spent trying to submit this tiny update. [import]uid: 62042 topic_id: 18931 reply_id: 73266[/import]

I’ve spent a good bulk of my day banging my head against the wall on this as well. For now reason -WHAT-SO-EVER I can no longer build for iPhone and I really needed to post an update to an app this morning. I went to build, just as I have for all year and get the This bundle is invalid. The application-identifier entitlement error.

I’m clueless at this point. I’ve updated Xcode, got the latest daily build from Ansca but I’m still dead in the water…

[import]uid: 9046 topic_id: 18931 reply_id: 73317[/import]

What is your app id in the provisioning portal? Is it fully qualified (num.com.company.appname) or a wildcard? [import]uid: 62042 topic_id: 18931 reply_id: 73341[/import]

Fully qualified. co.moonbeam.blabberboxchristmas

Just strange that I signed and submitted this exact app last week using the same method.
Actually practiced this method for over a year on Corona with 10 apps… [import]uid: 9046 topic_id: 18931 reply_id: 73349[/import]

Similar situation as me. Apple need to sort it all out.

Have you checked the bundle identifier in the info.plist in the generated package corona makes? (extract the zip, rightclick, explore contents).

Sorry I can’t be of more help. [import]uid: 62042 topic_id: 18931 reply_id: 73356[/import]

Yes, I’ve checked -it’s returning the wrong one. I strongly think it’s something to do with their remote build procedure.
[import]uid: 9046 topic_id: 18931 reply_id: 73371[/import]

@bamify,

We are trying to understand the signing issues. Could you email me with the details of your original CFIdentifier and the one you tried to upload and got rejected? Were you able to update the existing app?

Thanks,
Tom @ anscamobile dot com [import]uid: 7559 topic_id: 18931 reply_id: 73414[/import]

Also, please remove the CFBundleIdentifier line in your build.settings. It sometimes causes the build process to throw weird errors like “no bundle id set” or things like that.

Corona will automatically use the bundle id of the provisioning profile you use to build. [import]uid: 52430 topic_id: 18931 reply_id: 73428[/import]

I responded to this on another thread, but I’ll repeat it here with some more information.

We did some testing today and determined that the error saying the Bundle ID should contain the “10-character App ID Seed” is bogus and a bug in the Apple Validator code. What it’s telling you is the build ID specified in the distribution provisioning file does not match the CFBundleIdentifier in the APP package. This generally happens when you add your own Bundle Identifier to the Plist section in the build.settings file and you either have a wild-card bundle ID or a mis-match in the provisioning file.

If you don’t include a CFBundleIdentifier in the Plist section of the build.settings file, you shouldn’t run into this problem. Corona will create a CFBundleIdentifier field based on the bundle ID in the provision file used to sign the app. When you add a CFBundleIdentifier field in the build.settings file, you override the Corona generated field.

What seems to have changed in the lastest version of Xcode, is it now compares the bundle ID found in the provision file with the CFBundleIdentifier in the App package. If it finds any difference, it displays the “10-character App ID Seed” error.

If the bundle in your Provisioning file is fully qualified as in “com.company.appName”, that is what your CFBundleIdentifier will be in your app if you DON’T add the field to build.settings. If you add the field to build.settings, it must be exactly the same as in the provisioning file (including case sensitive).

If you use a wild-card bundle ID, as in “*”, your CFBundleIdentifier must be your app name. So if your app name is “Storyboard”, and you override the field in the build.settings file, it should be CFBundleIdentifier = “Storyboard”, or you will receive the error.

As an example, if your app name is “Storyboard”, here are some examples of how you need to set the CFBundleIdentifer field in the build.settings file to pass Apple’s Validator:

Provisioning Bundle ID / CFBundleIdentifier
[lua]com.company.Storyboard = com.company.Storyboard[/lua]
[lua]com.company.* = com.company.Storyboard[/lua]
[lua]com.* = com.Storyboard[/lua]
[lua]* = Storyboard[/lua]

The following is how Corona fills in CFBundleIdentifer if you DON’T add the field to build.settings;

[lua]com.company Storyboard = com.company.Storyboard[/lua]
[lua]com.company.* = com.company.Storyboard[/lua]
com.* = com.Storyboard[/lua]
[lua]* = Storyboard[/lua]

The bottom line is it’s best to leave the CFBundleIdentifier field out of the build.setting file and let Corona fill in the field for you.

As for what you should use as your Bundle Identifier in the provisioning file, use a fully qualified bundle name: e.g., com.company.AppName

If you want to use the same provisioning file for multiple apps, you can use a wild-card bundle name: e.g., com.company.*
Corona will substitute your app name for the “*” and the Apple Validator will be happy.

If you have an app already in the app store that was built with a CFBundleIdentifier in the build.settings file and now you can’t validate a updated version of the file, check your provisioning file Bundle ID. Your updated app must have a Bundle ID that matches the version in the App store and your only recourse may be to create a new provisioning file that matches the existing Bundle ID. In this case you should remove the CFBundleIdentifier field in build.settings file and let Corona create the Bundle ID for you.

Note: The above information was determined by creating a number of provision files and verifying the results when building Xcode projects and Corona projects. Let me know if you are seeing something different than what is described above. [import]uid: 7559 topic_id: 18931 reply_id: 73453[/import]

Hi Tom,

What you are saying does match what was happening to me.

However, I did try what you suggested, without luck.

My original app had the Bundle ID of com.bamify.pirateisland in iTunes Connect. I built it originally with the CFBundleIdentifier in the build.settings. The App ID in the provisioning portal was a wildcard.

You’re right in saying that if I removed the CFBundleIdentifier line it would pass the validation tests, but it still wouldn’t upload as Apple was expecting a ‘com.bamify.pirateisland’ Bundle ID - instead it got seed.PirateIsland.

I literally tried everything. The only way I got this to work and update the app was to create a new App ID with a fully-qualified ID. The Bundle Seed was the same as the original app when I created it - I’m not sure how Apple new it was to be the same app as for all they knew I was creating a new app from scratch - I can only guess it was because the app had the same name ‘Pirate Island’.

As soon as I tried with a fully-qualified ID it went through without a single hiccup.

I guess in future I’ll always use a fully-qualified ID, as the wildcards seem to cause nothing but hassle.

Thanks [import]uid: 62042 topic_id: 18931 reply_id: 73498[/import]

Btw, I did remove the CFBundleIdentifier tag in my build settings, but it made no difference. [import]uid: 9046 topic_id: 18931 reply_id: 73500[/import]

I second what BAMify is saying. Even when I “could” get the app to build on the Corona side it wouldn’t upload to apple because the bundle id was wrong. For whatever reason the Corona builder was stripping off part of the name after the first octet in the fully qualified id.
So when I would submit co.moonbeam.blabberboxchristmas - it would return from apple as "invalid bundle identifier 5G6H7J8J5H.co.

It never finished adding the rest of the FQ id…
[import]uid: 9046 topic_id: 18931 reply_id: 73502[/import]

But your App ID is fully-qualified in the provisioning portal? [import]uid: 62042 topic_id: 18931 reply_id: 73515[/import]

Of course. We don’t use wildcards for multiple reasons.
[import]uid: 9046 topic_id: 18931 reply_id: 73516[/import]

@bamify,

It sounds like you did what I suggested; created a new provisioning file with the Bundle ID that matches what was already in the App store. The provisioning file is used to sign the app and I don’t think it’s used to identify the app. The bundle ID, and team ID are used for that.

As I mentioned, I think you can use wild-cards in the provisioning file as long as it’s in the form of: com.company.*
You should not add a CFBundleIdentifier field to build.settings, but let Corona create the bundle ID. It will substitute the App name for the “*”

The wild-card bundle ID allows you to use one provisioning file for multiple apps but it won’t allow push notifications, iCloud, etc. (which we hope to offer these features in a future version of Corona).

You can verify the Bundle ID by looking into the App package and displaying the info.plist file after the App is built. [import]uid: 7559 topic_id: 18931 reply_id: 73528[/import]

@MBD,

Did you look at the info.plist file of the app you were submitting to see what the CFBundleIdentifier was? That would tell you if Corona was stripping off the ID.

If Corona was stripping anything off, the Apple Validator (run after Corona signs the app) would have caught that and not allow the upload.

So you had co.moonbeam.blabberboxchristmas in your provisioning file and did you have the same bundle ID in build.settings?

I wonder if Apple expects the first octel to be three charactes (e.g. “com”).
[import]uid: 7559 topic_id: 18931 reply_id: 73532[/import]