How to set the Project and Target Build Settings for release? - xcode

So, i finished my application and i'm stuck on the uploading part. I've tried to upload it with Application Loader and with Organizer (with the app archived) in XCode (i'm using XCode 4.0.2 SDK 4.3), but this warning \ error shows up in both the programs:
Application failed codesign
verification. The signature was
invalid, or it was not signed with an
Apple submission certificate. (-19011)
Now, all my provisioning profiles are ok, i did even make some new fresh certificates \ app id \ profiles. But the thing i don't understand it's how to set the Project Build Settings and the Target Build Settings. I'm really going crazy. I've googled a lot but i didn't find any solution to my problem. I've really tried ANYTHING.
Thanks to anyone who will help me!

I solved, thanks to the help of an Apple Technic Engineer, that way:
In targets, on Build Settings - Product name, i had the name of the app with spaces and special characters ( ? char). After changing that,and changing the Bundle Name too, i solved all the problems i got with that.
Hope this will help someone, one day.

Related

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.

Packaging error when switching to arm64 (arm5 was OK)

I just plugged in a new iPhone 6, created a provisioning profile and then I launched the app I'm developing on the device. It compiled fine, but at linking stage it errored out with:
ProcessProductPackaging
...
error: class '(null)' of input object does not respond to either selector writeToFile:options:error: or writeToFile:atomically
I cannot find any information of what that is. I do not get any specific code reference to relate it to. Did anyone experience this?
Personally I was able to solve this issue by rebuilding the project a second time. I think I was only experiencing it after revoking and requesting a certificate.
Odd for it to jump at me and disappear though.
I just restarted Xcode then the error was disappeared
I've tried turning the "Automatically managed signing" off and on again, then the issue disappeared. Note: rebuilding didn't help for me, cleaning either.
I removed an external library and related code I had and it's now working.
I just changed some provisioning setting and then restarted the xcode afterwards the error was disappeared and archived and then uploaded successfully
Rebuilding the project does the job for me. Actually I was making changes in capabilities while Xcode was building that makes build failed.
The error occurred after I made manual changes to the Xcode .entitlements and Info.plist files: I removed some entries. None of the above mentioned solution attempts worked for me. Every try to create an archive failed.
The solution was to go to Xcode's Capabilities section and switched everything on and off again.
I had the same problem specifically on an App Extension we used for Push Notifications, and I was using Automatically manage signing but it seems the App Groups in capabilities were failing, so I just had to make sure the App Groups were retrieved correctly and this fix it.
Also if you have .entitlements files, and you have App Groups there, make sure they are the same you are using in the capabilities configuration.
Restarted XCode and enabled and disabled to Automatically manage signing

Failed to submit app to iTunes Store

I am having some problems when trying to submit my iPhone app to store using Xcode 5 that my app is always failed validation with below errors:
Apple's web service operation was not successful
Unable to authenticate the package: [My app id, ex: 123456789].itmsp
ERROR ITEMS-9000: "The bundle [Bundle ID, ex: com.myapp.mobile] at bundle path 'Payload/[My App Name].app' is not signed using an Apple submission certificate." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
I am quite sure about settings (bundle id, certificate, profile, entitlement) because this is not first time I submit app to store, jut don't know why these issues come up, I have tried to search and found some related article but they don't help.
I have this issue for 1 week.
I just selected Standard Architectures in both Project and Target, and it worked for me.
I had the exact the same error, after hours of trying, adjusting all the parameters like the bundle ID or display name, etc. None of them worked.
Finally I got it work. Here is what I did.
I started all over by deleting all the records in keychain, certificates and provision profiles. And just added one certificate and profile for app distribution. There was only one record to make no confusion. And then boom, it uploaded successfully.
I guess my mistake was to submit multiple times of certificates or provision profiles earlier (although I deleted multiple entries but I did see something strange) because I thought the creation process was stuck so I refreshed the browser. Being patient in each steps will eventually saves more time! :) Good luck!
I got the same error today with xCode 7. I resubmitted with no changes and it went through. Probably Apple bug. I am letting you know that sometimes it is not an issue with our project/target settings.
As far as I can tell, this specific error is intermittent and not caused by anything in the app package. I think many of the answers here are people that saw this error, changed something, and saw the error go away, and assumed that their change made it go away.
I would suggest, if you get this error, just try again (worked for me). If it fails in this exact way a second time, and you have some theory about what will fix it, do that and try again. If that works, undo your fix and see if the failure comes back. In this way you will have proven that there was an identified root cause and a fix.
I don't know the cause, but I had the same exact issue crop up this week and just got things to work. I had checked the build, distribution certificate, provisioning profile. I went through all of the troubleshooting steps in Technical Note TN2250 -- no luck! However, I just got it to upload successfully. I happened to have an old Mac Mini that had Application Loader 2.5.1 on it. I created a zip file from the .app within the Payload folder of the .ipa, put this on a USB drive, and watched as it finally uploaded after trying about 50 times with both Xcode organizer and Application Loader v2.9.
Other people have reccomended reverting to a previous Application Loader version. Perhaps the web service endpoint uses a different (and properly working) certificate validation method for older AL versions.
I too have had the same problem and after many hours I managed to solve.
I finally fixed the problem. You needed to download the "Apple Root Certificate Authority" (http://www.apple.com/certificateauthority/) and put it in your login keychain & system, I also put your iPhone disitrbution certified in your system and set all keychian trust values ​​for all certificates to "system default". Finally went through!
For me the problem was in selecting the wrong iOS distribution code signing identity, where I was using a different team as the provisioning profile.
Probably make sure your Code Signing Identity is set to automatic, which will probably fix this issue.
In XCode 6.3, You have connect actual device and selected in the XCode.
I didn't see this listed on here, but I received this issue and realized that I already had a build for this specific Version # waiting for review on iTunes Connect. I rejected the build in ITC and then tried uploading the build again and it uploaded correctly after that. Just in case this could possibly help anyone else out there with this issue!

Code signing is required for product type 'Application' in SDK 'iOS5.1'

I am using xCode 4.3.1. After i created a project, i build it and tried to Archive. Then i got an error saying; (This is my first project in xCode 4.3.1)
CodeSign error: code signing is required for product type
'Application' in SDK 'iOS5.1'
What does this mean ? and how to solve it ?
It means you haven't assigned a provisioning profile to the configuration.
Usually it's because "Any iOS SDK" must have a profile and cannot be set to "Don't sign".
All this and more is answered in the TN2250 Tech Note about Code Signing and Troubleshooting.
One possible solution which works for me:
Search "code sign" in Build settings
Change everything in code signing identity to "iOS developer", which are "Don't code sign" originally.
Bravo!
This error was caused, for me, by different circumstances. A downloaded project tutorial had a default setting of [Project]>Targets>Build Settings>Architectures>Build Active Architecture Only>Release = "Yes." I wasn't intending to build a release, so the solution was to set Release (which presumably requires not just a developer profile but distribution profile) to "No."
You can get around this by using the simulator if you don't actually need to be deploying to a device. That solved it for me.
I had this problem even though I had a valid provisioning profile for the device. It turned out that I had changed my developer account password and needed to update the password in xcode. This is done by going to preferences-Accounts-Apple ID and entering the new password.
Restarting Xcode did the trick for me. :)
The other issue here lies under Code Signing Identity under the Build Settings. Be sure that it contains the Code Signing Identity: "iOS Developer" as opposed to "Don't Code Sign." This will allow you to deploy it to your iOS device. Especially, if you have downloaded a GitHub example or something to this effect.
I had same problem with an Apple Sample Code. In project "PhotoPicker", in Architectures, the base SDK was:
This parametrization provokes the message:
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
It assumes you have a developer user, so... use it and change:
And the error disappears.
TN2250 Tech document was retired,To resolve this add IOs5.1 or 8.1 sdk field under Anyios SDK field
in code sign problem will solved
I have same problem because option In-App Purchase was ON in project's Capabilities. If your app is not need in-app purchases - turn it off, or you need to set a correct provision profile to Debug scheme.

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