osx - Invalid binary when upload mac app on Appstore - macos

I have error when uploading mac app on app store. This error in below:
Invalid Executable or Signature - Your app could not be re-signed by
the App Store for distribution, because of an issue with the app's
executable (MyApp.app/Contents/Resources/file.o) or its
signature. The app may have been built or signed with non-compliant or
pre-release tools.
Though you are not required to fix the following issues, we wanted to
make you aware of them:
Invalid Signature - the executable at path MyApp.app/Contents/Resources/file.o is not
signed. Refer to the Code Signing and Application Sandboxing Guide for
more information.
I use xcode tool validate this package and it's successful. But when uploading this package on appstore, it notices "Invalid binary".
Do you know what the error is? I checked the provisioning profile and bundle id are valid.

The file mentioned in the error message (Contente/Resources/file.o) probably doesn't belong in your application bundle. Unless it's something important, you should remove it, as it's unlikely to be doing anything useful for you. (It's probably only in your project by mistake.)

Related

Upload Xamarin.Forms project to AppStore - Error: Invalid Signature (Code object is not signed at all)

We are actually trying to upload our Xamarin mobile application to AppStore. Application is built using Xamarin.Forms and uses Pspdfkit for pdf viewing on Ipad. This is the only external library we are using. Project builds correctly but when we try to upload to AppStore, we are getting the following error:
Heading
Invalid Signature - Code object is not signed at all. 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
Can someone gives me the details steps to sign an external library on Xamarin Studio?
The problem you see is most certainly not caused by the PSPDFKit library but by your app itself. iOS apps must be signed using different certificates:
There's one for development
one for Enterprise distribution
one for App Store distribution
You will have to create a proper distribution certificate in order to upload to the store. This involves setting up an App ID, the certificate itself and a provisioning profile which holds everything together.
Your entry point to those certificates is Apple's developer site.
You can read more about the publishing process with regards to Xamarin specific things (it really isn't that different from using an app built with Xcode, other than the different IDE) in Xamarin's documentation.
To automate the process and make it easier to manage you might also want to have a look at a collection of tools called Fastlane.

Error ITMS-90046 when using xcodebuild instead of Xcode IDE

I'm unable to get rid of "ERROR ITMS-90046" when building my app with xcodebuild and uploading using Application Loader. But it works fine if I archive and upload completely within Xcode.
The ITMS-90046 error message specifically complains about the "application-identifier" in my framework:
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application
bundle's signature contains code signing entitlements that are not
supported on iOS. Specifically, value 'TEAMID.com.domain.Product'
for key 'application-identifier' in
'Payload/Product.app/Frameworks/MyFW.framework/MyFW' is not supported.
This value should be a string starting with your TEAMID, followed by a
dot '.', followed by the bundle identifier.
I tried all the solutions mentioned in This thread, but none of them worked for me. Luckily I am at least able to upload via Xcode, but this needs to happen frequently enough to become burdensome.
Any ideas what to try next? Anyone know if Apple is even aware of this issue?
Thanks!
The solution was to re define and download all apple developer certificates and import them all again to Xcode.

Cocoa osx itunes code signing error dropbox bundle format is ambiguous (could be app or framework)

I submmited my app for Mac to iTunes and after that I received an email from iTunes.
Basically it says this:
"Unable to Sign - This package doesn't meet the current code signing requirements. For more information, see the Code Signing and Application Sandboxing Guide and Technical Note 2206.
Specifically, codesign generated the following error:
.../Payload/myApp.app/Contents/Frameworks/Dropbox.framework/Dropbox: bundle format is ambiguous (could be app or framework)
Malformed Framework - The framework bundle Dropbox (myApp.app/Contents/Frameworks/Dropbox.framework) must contain a symbolic link 'Dropbox' -> 'Versions/Current/Dropbox'. Refer to the Anatomy of Framework Bundles for more information."
This is my framework structure:
My app uses the Dropbox framework. I installed it following the Dropbox instructions. How can I solve this?
Need help please. Thanks in advance.
I tried doing this https://stackoverflow.com/a/24418689/3065901 but I get the following error:

Sparkle Error: The update is improperly signed

I am using sparkle for software update. I signed my app with Apple developer certificate and uploaded the build. Then I tried to update by calling 'checkForUpdates:' method. But I am getting an error saying "Update is not properly signed". What might be the reason? Did I miss anything?
You likely need to review the tips about how to codesign properly for Sparkle here:
https://github.com/sparkle-project/Sparkle/issues/216
Specifically, sign all binaries and frameworks, and do so with the proper codesign arguments.

Codesign check fails Xcode 4

I just created all new dev and deployment certs and I'm getting this weird error when I try to validate the application in the archive manager:
error: Codesign check fails : /var/folders/w_/dvqfkh916k12c5hn639qvvqw0000gn/T/oqhxIfU87c/Payload/TestUpload.app: valid on disk
/var/folders/w_/dvqfkh916k12c5hn639qvvqw0000gn/T/oqhxIfU87c/Payload/TestUpload.app: satisfies its Designated Requirement
test-requirement: code failed to satisfy specified code requirement(s)
I've looked all over to see how to fix this error but nothing seems to help for Xcode 4. I've followed the setup on the provisioning profile, however it doesn't seem to be updated for the newest Xcode 4 software (I've gotten this to work with previous versions of Xcode before archive manager was set in place)
Any help would be appreciated
I was testing using an old certificate cerated while ago and it did worked fine, but creating a new certificate using a new apple dev account wont work.
It seems like new certificates are created with issues from apple provisioning portal.
So, I guess there is not a problem on your app, and we just have to wait until they fix the bug.
If you're building dependent projects or libraries as part of the archive process, make sure that those targets are also being built with the App Store distribution certificate.
scoured this GUI looking for a "comment" but finding nothing - apologies if this gets posted as an answer.
I have spent the last 5 hours with that exact same error. Googling everything. Recreating certificates. Everything works when archiving, but then at the end I get the yellow triangle indicating the error. Using both wildcard and app specific distribution profiles that are recognized in Organizer as valid - I always get the error. You're not alone on this one and it is driving me insane - today was supposed to be the day we submit our app we've spent the last year on...
Will be watching this thread closely, can offer any further information from my end also if it will help any. If you find a solution Paradox, please post here as I am at my wits end and would be extremely grateful.
Are you sure you signed this with your Distribution profile and not your Developer profile? I think XCode 4.2 will give an error if you're trying to share an archive code signed with the wrong type of profile.
Some (old) information in this thread:
http://forums.macrumors.com/showthread.php?t=659607
I am having the same problem. Spent hours redoing certs, changing machines, changing versions of Xcode, making random changes that people have suggested, rebooting, changing icons you name it.
In Console there is a big dump of data related to the validation, if you're lucky it says something meaningful in there, it doesn't for me. Or at least nothing that I can understand :/
EDIT: The console outputs the command it runs but slightly butchered. It has a parameter R= but the output neglects the quotation marks around the argument. Running this command only outputs the just as helpful:
/var/folders/_x/XXXXXXXX/T/XXXXXXXX/Payload/XXXXXXXX.app: valid on disk
/var/folders/_x/XXXXXXXX/T/XXXXXXXX/Payload/XXXXXXXX.app: satisfies its Designated Requirement
test-requirement: code failed to satisfy specified code requirement(s)
Valid But Mismatched Certificates
This error can occur when submitting an application to the Mac App Store. The error occurs because one or more code signatures are valid but not signed by Mac App Store appropriate certificates:
Invalid Signature - The nested app bundle FRAMEWORK at path APPNAME.app/Contents/Frameworks/FRAMEWORK.framework has following signing error(s): valid on disk /Volumes/data01/app_data/dstr/mz_4939925606610311185dir/mz_6704668226144376567dir/eu.miln.beyond.mas.pkg/Payload/APPNAME.app/Contents/Frameworks/FRAMEWORK.framework/Versions/A: satisfies its Designated Requirement test-requirement: code failed to satisfy specified code requirement(s) . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html and Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.
The solution is to re-codesign the application bundle making sure to use a Mac App Store application certificate.
Codesign
Use the codesign -d -vvvv <app.path> to check the signing certificate is correct.
If you have a complex signed application with mixed certificates or non-Mac App Store certificates, you can use the codesign flag deep to recursively resign the entire bundle:
codesign --force -o library -s '3rd Party Mac Developer Application: Your Organisation (000AAA000A)' --keychain '/absolute/path/to/mac-app-store.keychain' --preserve-metadata=identifier,entitlements,flags --deep '/absolute/path/to/APPLICATION.app'
Note the --preserve-metadata=identifier,entitlements,flags options. These are important to avoid overwriting or changing the associated entitlements and bundle identifiers.
Ideally, the deep flag should not be used but it can be useful to fix problems.

Resources