I'm developing a game for Mac App Store from Unity in which I have a plugin created in Xcode as .bundle file. I am able to codesign and package my game via terminal but problem appears when I try to submit package via Application Loader. I will try to explain everything thoroughly:
Package gets uploaded on iTunes Connect but at the end I get following warning:
WARNING ITMS-90239: "Invalid
Signature. A sealed resource is
missing or invalid. The binary at path
[Panda Commander Air
Combat.app/Contents/Plugins/InAppPurchase.bundle/Contents/MacOS/InAppPurchase]
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). 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 can click on "Next" and finish my submit, but this warning must be resolved because I get mail from iTunes Connect with issues that must be corrected:
UNABLE TO SIGN - This package doesn't
meet the current code signing
requirements. For more information,
see the Code Signing and Application
Sandboxing Guide [1] and Technical
Note 2206 [2].
Specifically, codesign generated the
following error:
webelinx.appstore.panda.pkg/Payload/Panda
Commander Air
Combat.app/Contents/Plugins/InAppPurchase.bundle:
unsealed contents present in the
bundle root
Once these issues have been
corrected, you can then redeliver the
corrected binary.
[1]
http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html
[2]
https://developer.apple.com/library/mac/technotes/tn2206/_index.html
My plugin actually IS signed in Xcode, I've created new bundle ID and distribution provisioning profile for Mac App Store specifically for this plugin and setup everything in Code Signing tab. Code signing identity is 3rd Party Mac Developer Application and appropriate provisioning profile is selected. When I build this bundle it asks me to allow codesigning, and afterwards when I check it with "codesign -dvvv" command in terminal I can see codesign details. If I don't codesign it, I get another warning when I upload my package which says that bundle is not signed at all. I even tried to do a "Clean all", delete "build" directory and rebuild bundle as suggested in warning, but it has no effect, warning appears again.
How can resolve this warning? Am I missing something important or trying to fix things in wrong way?
Any help will be appreciated because I am out of options at the moment.
Thanks in advance!
OK, I solved my problem. I was missing few things and I found solution here: http://forum.unity3d.com/threads/signing-mac-app-on-os-x-mavericks.206762/.
The thing I still had to do was to manually codesign every file in Contents/Frameworks and Contents/Plugins directories inside .app file and to delete all .meta files inside my plugin. After I did these steps, I codesigned once more whole .app file and created a package which I uploaded on iTunes Connect without warning mentioned above.
I tried to follow this video to make an ipa
http://www.youtube.com/watch?v=gRhtsnFB0bM
but I have an error when I want to make Product > Archive
[BEROR]Code Sign error: The identity 'iPhone Distribution' doesn't
match any valid certificate/private key pair in the default keychain
It's the first time that I do that so I don't really know how it works, but I think it's a certificate problem. I made the app for someone. I downloaded his certificate from his account in developer.apple.com, what shall I do with it? Shall I make something in xcode to add it?
you need to revoke the previous provisioning profiles in his
account..(if you can get the previous person keychain files ..that
get that and install in your keychain..compiling will be successful)
make a new distribution certificate using keychain in your mac
and then make a new distribution profile using that distribution
certificate..then you will be able to compile using that profile.
I get this error all the time since I use the same scheme for testing as I do for distro. You will have to go into your build settings for the project and the target and set the code signing back to iPhone Developer. Clean your settings and rebuild. That should do the trick.
A have a iOS-project that I send to my iPad. But when I'm trying to run&debug it on the device, I take error
"The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile."
In my Entitlements.plist key "Can be Debugged" in state 'YES'. When I change it to 'NO' - I can send application to iPad, but I take error
Error Starting Executable '$APPLICATION_NAME'
Error launching remote program: failed to get the task for process $PROCESS_NUMBER.
How can I resolve this problem?
P.S. I read similar question, but answers don't help me … (In most of question answer say to create Entitlements.plist file)
P.P.S. XCode 4.0, iOS 4.3
UPD: Problem was solved.I created new provision file in certificate-development tab, revoke previous certificate and request one new. As result I have taken new certificate in what is written all provision files and two provision files - one for distribution and one for development.
Problem was solved.
I created new provision file in certificate-development tab, revoke previous certificate and request one new. As result I have taken new certificate in what is written all provision files and two provision files - one for distribution and one for development.
I have restarted this process about 4 times over the past 3 weeks. I have not succeeded in submitting my app to the store. Please help me! I just started over again tonight, I did it in this order:
Deleted everything referring to the IPhone in my Keychain,
Redownloaded the Distribution Certificate
Created a new app id called: com.myapp
Downloaded the Provision Profile and installed it into XCode.
Please note: I did not install an Entitlements.plist because I was told I didn't need one. Everything is looking good at this point.
Duplicated my "Release" Configuration and renamed "Distribution"
Under the Configuration of "Distribution", Code Signing Identity, I can see my Provision Profile it actually says: IPhone Distribution: My Name (for Application Identifiers: com.myapp)
So at this point at the bottom of the Project Info Window I see this:
The name (“common name”) of a valid code-signing certificate in a keychain within your keychain path. A missing or invalid certificate will cause a build error. [CODE_SIGN_IDENTITY]
So I realize I haven't altered my bundle name for my app, I change it to com.myapp, warning still doesn't go away. I tried adding in my prefix into the Bundle Identifier like this:
5JSF8843kJJ.com.myapp (for example)
But the error still doesn't go away!
After all this I try to Build and Run on my device anyway thinking it may go away. But I get this error:
The iPod “myIpod” doesn’t have the provisioning profile with which the application was signed.
Click “Install and Run” to install the provisioning profile “myprofile” on “myIpod” and continue running “myappname.app”.
Please Help! I need to get this to work!
Thank you for your time.
UPDATE: I have fully tested the app and I am ready to distribute, I am trying to get a successful Build so that I can zip up my .app file and submit it using Application Loader.
You can't run an app using the Distribution certificate or Distribution Build.
You shouldn't duplicate your Release Build until after you get it running and configured exactly as needed, except for the choice of code signing certificate.
I'm trying to do ad hoc distribution. When I use XCode, the application installs fine on my phone.
In preparation for ad hoc distribution, I created the default entitlements file, unchecked the get-task-allow box, added the entitlements file name to the code signing entitlements line, and tried to install on my phone.
If I have the file in the entitlements in build settings, I get the (dreaded) error
The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016).
This ONLY happens if I have the entitlements file listed in the code signing section.
I created a brand new application to test this, to see what could have gone wrong and this happens with a completely new test application (so it doesn't seem like clean builds, opening and closing XCode, etc will help).
What am I missing? I've read all of the other times this has occurred and nothing seems to apply.
You need to follow these steps
Have you changed the bundle identifier in your project's info.plist???
Please make sure that this also matches with your provisioning profile's identifier.
go to your projects info. select the configuration you want your build to be deployed then check in build settings that you have added the dist.plist file and the provisioning profile is the same thta you need to run with.
If you are making the build for distribution then set the get-task-allow mark as unchecked
Hope this helps.
I've made it! The reason is you got wrong Certificates! If you're using development Certificates, you can't use the distribution Certificates.
Do the following steps:
Remove the provisiong file from the Xcode -> Organizer
Download again from your developer account. Make sure that you have downloaded profile from distribution tab.
Drag and drop that profile to Xcode
Change the bundle identifier of your plist that match with your provisioning profile App ID.
Go to application setting target and active target and choose your profit from there.
Now rebuild and run the app.
It's also worth noting that this problem may be rooted in trying to install properly authored programs on Jailbroken devices. At least in my case, all my development units and I kept getting this error. By adding the get-task-allow BOOL type to a Entitlements.plist file, I still got the error but the files were installed on the devices (live debugging doesn't work though).
Have you checked that the Code Signing Identity values under Project > Build Settings and Targets > Build Settings are correct?
I found I had to add the new device I was testing on to my Provisioning Profile, on the IOS Provisioning Profile Site.
I had not agreed to the new updated licensed agreement from apple.
Briefly :
Please log in to your developer's account -> profile's -> review -> read the agreement or get your lawyer read it for you -> agree (at your own will) -> and again click profile's to check the status of your profile.
In my scenario the valid code signing entity was not showing up. When i followed the above procedure it was visible and i was able to run the app on the device and/or create the iPA file without much difficulty.
For what its worth, I had this issue with one app but not another. Seems the "Provisioning Profile" in Target->BuildSettings->Code Signing had to be set to "Automatic". If you selected one of the ones in the list it failed with this error.
me too got this type of error, i resolved this by deleting current Entitlement.plist and adding new Entitlement.plist.
Because the project i was trying to run was build on 3.2 sdk and current i am using 4.2.
That was the only reason i was getting error
It seems this error code is used for many situations. In my case, the problem started to happen after we set our DataProtectionClass to NSFileProtectionComplete. I'm not sure of the fix yet.
Removing the entitlement wasn't and option for me as I wanted to use "iCloud", so after digging a little I found that the problem was that "iCloud" not being enabled on the app configuration on the "iOS Provisioning portal".
Enabling it and regenerating the provisioning did the trick for me.
My issue was that the Distribution Profile was created as Ad hoc rather than In House making the device I was running the app on not accept it.
Make sure that the device is added to the Provisioning Profile or create an Enterprise Profile.
Another pitfall while trying to correct this error: you'll also need to replace provisioning profiles from embedded extensions.
In my case, the provisioning profile of my iOS app was just fine. It took me hours to figure out that the provisioning profile of my widget (or Today Extension) needed an update, due to a new device to test on.
Make sure you check all relevant and related targets, not only the target you're trying to execute.
Go to Target -> Capabilities - > Associated Domains
Press Fixed issue Button
Run Project