Xcode8 automatic code signing fails with DVTSecErrorDomain Code=-25295 - xcode

Im trying to use automatic code signing with Xcode8. However this fails with error DVTSecErrorDomain Code=-25295 "The specified keychain is not a valid keychain file."
A similar issue existed with Xcode7, where I finally managed the certificates myself in the . Since Xcode8 gives a more specific error code, I am now wondering if anyone knows how to fix this problem?

I managed to fix this by creating a new "loginn" keychain and making this the new default keychain. (following this)
This fixes the issue but rises new problems with the whole system e.g random apps asking for passwords again, git push not working etc. This is not a good solution

Related

XCODE: The request was denied... (SBMainWorkspace) for reason: Unspecified

I updated xcode to 10.1 this morning and since then none of my code runs. I am getting the message above (question) which I have researched exhaustively. I have read all the other posts concerning this issue and nothing I have tried seems to work in my situation. The one difference in my message is the reference to "unspecified". I have done the following:
New Provisioning Profile
Automatically managing sign-in
Deleting certain keychain certificates
Project Settings to Legacy
Rebooting/Cleaning
Rebooting Simulator
Mach-O Types to Bundle
Managing/Editing Schemes
Creating new user account on Mac.
New teams/No teams
etc.
(you get the picture!)
I am at my wits end. I have been working on this code for a while and short of wiping my machine and re-installing is there anything else that I can do! I am about to explode!!!
I rebooted the machine and I went back to the Build Settings and changed to Mach-O Type back to Executable and it working ow. Based on all of the previous solutions I have read/tried, this seems about right (unpredictable).

How do I archive/validate a Swift App that uses a framework in Xcode

I have an App that uses Admod and Firebase from Google. Since I am using Swift they want me to use frameworks when loading them from CocoaPods. When I try to archive/validate the App I get the error:
No suitable application records were found. Verify your bundle identifier 'org.cocoapods.GoogleToolboxForMac'
What is the correct way to provision an app that uses someone else's frameworks so it can be uploaded to iTunes Connect? I tried to find something in Apple's documentation but I haven't found anything.
UPDate:
I previously had answered my own question, since I had thought I had found a solution. My reply was:
Problem Solved. Turns out I was using an App-ID that I am having Apple look into as being corrupt. I had already created a new App-ID to prove the one I want to use is not working and retried with that and it Validates. This required a lot of help from the Google Ads Mobile SDK team. Thanks.
So the correct answer is: Now Incorrect
You should not get this error unless you are using a Bundle-ID that is not already registered on iTunes Connect, but, you should never be able to create an archive that does not have a Bundle-ID that is not already registered on iTunes Connect. So this is caused by an abnormal situation.
This is no longer true
I used my new working project and got 4 whole builds out of it and into iTunes Connect. In the process I was trying to clean up the mess caused by trying to solve this problem, like loosing my git history. I tried to modify my old App to get it to work and without modifying my new working project, But my new project started failing with the above error. I even used my time machine and went back to the directory as it was when I made the last build, but no help. So, any answers?
Further Update:
I pulled all the code related to Google Firebase and Admob out of the code and removed the cocoaPods and Archived/Validated and now I get the error:
You must supply a CFBundleIdentifer for this request.
Which is the error message I was getting with my other App-ID that tracked that App-ID in iTunesConnect. This time it does not track the App-ID so it must be something in my project. Will report what I find.
UpDate:
I think Apple has been modifying their code for validation at the same time I was trying different things. At one point it told me I was using CFBundleSignature instead of CFBundlePackageType set to APP and I fixed this and got the code to validate. Understand I am copying complete projects and renaming everything to debug this problem, so this must have come from the original program. I ended up with a project that was renamed from my original but archived/validated but when I went to compile for Test I got errors that I debugged until I got lots of Mach-O link errors. I decided to complete the loop and go back to my original code and try using the new Bundle-ID which points to the new App-ID, the one that works, and add all the knowledge I have learned. But when I get it done I have an project that can test but does not validate. The only difference is this project has the old identifier which has the same name as the suffix of the App-ID that has a bug.
Am I missing something?
Final UpDate?
On a whim I renamed the Scheme file to be the same as my Suffix to the Bundle-ID and I got my original Project to Validate! I have worked on this for over a month and you might not believe the astonishment I feel in this.
Back to Unit Test!
I have come to the conclusion that the Identity of the App, the name at the far top of the right side Utilities window, has something to do with the way iTunes Connect validates the App. This is the name in the left hand column of the Organizer window. It is like it overrides the suffix of the Bundle-ID and since I can't use that Identifier because the associated App-ID is corrupt. Or the name of the Scheme.

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.

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!

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