Why does one .o file in my project has no Provisioning Profile? - ios

Im trying to submit a version of my app and after building im seeing the following screen
My app has a valid provisioning profile except one .o file that is for some reason not included in it..
That has been the case for a while now, and i have managed to submit the app without it being a problem.
A couple of day ago, after submiting a new version, i recived an email from apple saying :
We have discovered one or more issues with your recent delivery for "xxx". To process your delivery, the following issues must be corrected:
Invalid Signature - Code object is not signed at all. The binary at path [xxx.app/FooterCoverflowCollectionViewLayout.o] contains an 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. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
Once these issues have been corrected, you can then redeliver the >corrected binary.
Regards,
The App Store team
I've tried the steps they recommended with no luck. Can anyone have any idea how to solve the issue ?

Removing the mentioned file, building, re-adding it to the project and building again solved the problem.

I experienced this exact problem, and would like to share what happened.
The .m file for one of the classes we had written (ie: not a third party library) had been erroneously added to the project in the "Copy Bundle Resources" section in "Build Phases". There is no reason for the file to have been there, and had been there for quite a long time.
The error described in the original post just started showing up in our latest submission to the app store last week, and from what I gather from other posts around the internet, Apple has recently changed something about their code signing and submission process. The .m was absolutely in the Copy Bundle Resources section in our last several submissions.
Simply removing this file, rebuilding, and resubmitting solved the problem. Since the file didn't need to be there in the first place, there was no need to add it back again.
There may be other causes for this error, but if you get this error, check your "Copy Bundle Resources" section the files that are being listed with zero entitlements.

Related

Invalid Signature - Itunes Connect

I always get an email from apple about an Invalid Signature when I try to upload my archive. I tried using automatic signing first, changed it to manual then. Deleted all old certificates, cleaned the project, recreated certificates + profiles from developer portal. Still no success.
I did the code signing settings on the target level as well as the project level. I also have no special character in the Product Name.
I also checked the output of the codesign/security commands like it's described in this answer
Does anyone have an idea what else to try? I also contacted the apple support yesterday and I am waiting for an answer.
The email content:
Dear developer,
We have discovered one or more issues with your recent delivery for "Bier brauen Bier Rezepte". To process your delivery, the following issues must be corrected:
Invalid Signature - A sealed resource is missing or invalid. The file at path [Bier brauen Bier Rezepte.app/Bier brauen Bier Rezepte] is not properly signed. 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. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
Once these issues have been corrected, you can then redeliver the corrected binary.
I will add my 2 cents here, I had the same problem a few days ago, and the reason was that I had in my assets a file with an accentuated character "é" in one of my assets files causing the binary check to fail.
Once removed the invalid signature error was gone, and the binary was validated by apple.
More info: Avoid special characters in Executable names
After a lot of debugging I just created a new ionic project via cli and copied my src folder into it. So some configuration was messed up. Can't tell which one.
Try to verify your app and display names again (it should be same) and make "Signing" again.
I found this info in this blogpost.

Error while submitting app to itunes connect: "Invalid Signature - Code object is not signed at all"

Well, all was good with submitting to itunes connect, but out of the blue, I just got this email right after uploading my app:
Invalid Signature - Code object is not signed at all. The binary at
path [churningseas.app/churningseas.codea] contains an 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.
I've seen that this a commun, infamous error message, and that there is no clear answer to how to fix this.
Has anyone an idea on what could be wrong with my settings? Thanks you so much in advance, I'm suppose to release the app this month and I'm freaking out a little bit here...
The email is asking you to check the churningseas.codea file. I had a similar issue except they were referencing a docset file in my project. After hours of debugging this issue, it has come to my attention that Apple is now frowning upon docset files. After removing the docset file it fixed my issue. You may want to check the churningseas.codea file and see if removing it doesn't fix your issue.
If that doesn't work check this answer Error itms-90035. There could be many causes for this error.

App Submission: Invalid Binary - Invalid Signature

I am trying to submit an update to the iOS app store. I am going from a Buzztouch app to a Sprite Kit app. I am able to archive the Xcode project and submit it. The app gets to the status of Upload Received but than about a minute later, it changes to Invalid Binary and I get an email saying:
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.
Once these issues have been corrected, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.
I have cleaned out the build directory, rebuilt my release target, and made new provisioning profiles multiple times. All of the Code Signing Identities are set to iOS Developer. Code signing and the provisioning profiles have always been a little bit confusing to me, I could have made some obvious mistakes.
I have tried submitting over 50 times! I find this very frustrating because I have emailed Apple and they got back to me but it was just a link to the dev center with code signing information. I have also spent lots of time searching the Internet to find a solution to this and there hasn’t been a good solution that actually works for this problem.
The only thing I can think of is either because I am changing from a Buzztouch app or it is Sprite Kit.
Here is a screenshot of my code signing:
In Apple developer support there are two additional common causes of the Invalid Signature binary rejection reason,
executable files containing special characters (i.e. non-numeric, and non-alpha). To resolve this issue, change the Xcode target’s Product Name build setting from “${TARGET_NAME} to a string containing only alpha/numeric characters. Let me know if this was the cause of the issue (and the problematic characters) because I file bug reports to fix each instance I find here.
Apple Double Files ("double files") that result from copying the Xcode project uncompressed to/from a non HFS+ formatted hard drive. To check if this caused your rejection: 
A. Run the app diagnostic here: How do I check if my application's signature has been corrupted?
B. Then check the command line output with: List of Signature Verification Failure Root Causes. Double files are diagnosed with a message like:  
resource missing: my.app/._.*
C. From the docs:
The file prefixed with "._" is considered an AppleDouble file and it
can result from copying the uncompressed Xcode project folder onto a
non-HFS+ formatted disk. The AppleDouble files must be removed using
the 'dot_clean' command. The Xcode project folder is the argument to
dot_clean as illustrated below. Note: You can drag your Xcode project
folder from Finder into the Terminal window to automatically fill its
path into the command.
dot_clean /path/to/My_Xcode_Project
(If Terminal can't find the dot_clean utility, download the optional Command Line Tools through Xcode > Preferences > Downloads)
D. After running dot_clean on your Xcode project, create a new app archive (via Xcode > Product > Archive), reattempt submission.
To prevent double files be sure to compress the Xcode project folder to .zip using Finder before transferring it to/from a non HFS+ formatted hard drive. 
This is what I did when I encountered a similar problem with the Mac App Store:
Re-generate the app's Distribution and Development certificates (from the Apple Developer's Certificates site).
Download both certificates and drag them to Xcode's icon (not sure whether it had any impact, but after so many submission failures, I was pretty superstitious).
Re-fresh the certificates and identities from Xcode.
Open Xcode's Preferences.
Go to Accounts tab.
Clicked my account
Clicked the refresh button.
Generate the archive.
Submit the app and clicked on "refresh signing identities" somewhere mid-way in wizard prompts.
As a reference, here is my built settings related to signing. That one worked the last time I submitted the app (which has been in the "waiting for review" state for the past two days now, so I guess it passed all of their automated tests).
Your issue relate with signing failed because of your app didn't sign with recent distribution certificate. Check the following steps:
1) Check your bundle identifier to list out provisioning profile as like below picture. Because It also lead to this problem.
2)You may not using the correct certificates when building your app. Just Delete your certificates in Provisioning Portal and create new ones and update them in Xcode.
3) From your picture, you didn't selected correct provisioning profile. Goto Organizer / Provisioning Profiles / Refresh and allow Xcode to fetch the latest ones. see screen shot to how to do that.
Select correct Provisioning profile.
Select correct code sign.
4) Cleaned up your project.
5) Just clean all your targets . You can even go to /Users/%USERNAME%/Library/Developer/Xcode/DerivedData and delete all of the directories in there.
see this ref
Under "Code Signing Identity" Make sure you have selected your Distribution Cert for the "Release" scheme
Under "Provisioning Profile" make sure you select a Distribution provisioning profile (not an Ad Hoc one)
Archive and distribute, make sure the same cert is selected when submitting (after entering your iTunesConnect info)
After doing all of the above
Menu Bar
try Product->Archive
Then from the organise try resigning and submitting.
Window->Organiser
Select archive and then press distribute (but i'm pretty sure you'll know how that works)
Obviously if you can't do this then chances are you have indeed got something wrong with your signing certificates, more specifically your bundle identifier is likely to be the culprit.
One other option is your app uses services that you haven't set up on developer.apple.com/ios for the app id such as game centre, push notification etc. Good luck
check your launch images . Are they conflicting like 2 images have got same name. Because i have got the similar issue which i solved like this within 10 minutes.
To figure out this problem I just created a new Xcode project and copied and pasted everything into the new project.
In my case the problem was to not ASCII chars in filename (someone did sent us to embed), solution was to do a global search in project:
ls -1 -R -i | grep -a "[^A-Za-z0-9_.':# /-]"
And delete those chars from filenames.

OSStatus error -67028 When Building Ad Hoc iOS App

I'm getting an error when trying to do an archive build for ad hoc distribution on iOS for an iPhone-only app. The app is signed with the proper certificates and has the proper provisioning profile (checked with a friend who was able to sign properly as well, so it's not a code signing issue).
Whenever I try to distribute with the Xcode archive panel, I get the following error message in an alert sheet:
OSStatus error -67028
I've never encountered this error before. I'm able to build and have the app run fine in both the simulator and device, but for whatever reason, I'm completely unable to get the distribution feature of Xcode to work to create an ad hoc build.
Has anyone ran into this issue before?
Things I've checked are:
Code signing (generated all new certs and profiles to start from scratch)
Files and frameworks
The only thing that I could find with the files and frameworks that might be off is that the main Storyboard file (Main_iPhone.storyboard) couldn't be found in the Copy Bundle Resources, although the storyboard loads properly in Xcode and allows editing, and can be found in the Finder under the Base.lproj folder.
I had the same issue with the HockeyApp SDK. What I actually did was
Remove HockeyApp SDK by selecting "Remove reference" from the Frameworks folder.
Drag&Drop the Folder HockeySDK.embeddedframework to the XCode Frameworks folder
Deselect the "Copy items into destination group's folder (if needed)"
Select "Create groups for any added folders"
Select your target
According to the docs, 67028 means "The bundle format is unrecognized, invalid, or unsuitable". That is pretty vague, so I would investigate the current lead you have, that is, ensure that the Main_iPhone.storyboard file is indeed in the compiled bundle. If not, check your "copy files" build phase to ensure it is there.

Validation/Submission error: Application failed codesign verification

I have a number of apps that are almost identical (with the exception of a few constants, images, and a sqllite database file). I've never had any issues submitting them before, however today one of the updates gave the following error when validating/submitting (note: I have updated this app in the past with no issues):
Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate.
I've spent all day trying everything to get this to work. I even diff'd the entire project folder against another app (which submitted successfully, today), and all build/signing settings are exactly the same (except bundle identifier, version number, etc.). I've even (as a last resort!) revoked the certificate and re-generated everything, including provisioning profiles.
I've been through all of the steps listed here:
https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933
However, if I "Share" the app from the Organizer and save to disk, running codesign -dvvv says it's not signed at all (however, this happens with the ones that worked!). Not sure how else to run this, as the file generated (and shown in Organizer) is not a .app file.
I'm at a total loss how to figure out what's wrong with this, or why it's any different to the others. I don't seem to be able to get any more information out of the Organizer. The app was built exactly the same way as the others, and the project files etc. are identical (except for expected differences like images/names).
Ok, fixed this... I wish I'd tried this sooner, as it would've saved me many hours today!
It seems that the App Store provisioning file for this app was somehow corrupt - not on my Mac, but on Apples servers.. I downloaded it many times today, with no luck. I just discovered that selecting the Ad-Hoc profile during Validation worked, which led me to believe it was specific to the App Store one. So I deleted the App Store provisioning file from the iOS dev dashboard, then recreated it, downloaded it, and it worked!
Before I deleted it, I edited it, and everything was set correctly, and the expiration date was 6 months from now, so I can only assume something was broken Apple's side (even though I'm sure this same file worked in the past!) :-(
I also have the same problem.
All my provisioning Profiles, Certificates, Bundle Identifier every thing was perfect.
Except My Apps Executable file Name in Info.Plist and Product Name in Target Build Settings was slightly different.
And just because of that codesign_wrapper was not able locate Provisioning.
I spend nearly one day to figure this out.
So Please do one check
App Product Name is have to be same with your Executable file in Info.Plist.
I have a very similar problem, but in my case my distribution profiles keep disappearing from my system. So when an application specific distribution profile disappear Xcode picks up another one (wildcard, iPhone developer, etc.) which is not correct. Everything looks fine except I get this error.
My solution was that I downloaded all of my code signing profiles from Apple. I saved them in a directory and whenever one "disappears" I just have to double click the correct profile to add it to Xcode and update "release" entry in Code Signing Identity in plist.

Resources