Read from keychain results in errSecItemNotFound 25300 - ios

I store username & password using keychain, sometimes when I tried to get the password of the username, it told me errSecItemNotFound.
I keep that the password is always existed in keychain, so why it is not found?
Thanks.

Tony: that error is simply OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements.
This could be happening as a result from using a nonstandard app signing method or some other problem with your entitlements. Make sure you're building simply out of Xcode and not using alternate signing methods unless you completely understand them.

When reading the keychain, make sure you always build with a provisioning profile linked with the appId that used to create the keychain record.

#graver
http://opensource.apple.com/source/Security/Security-55471/sec/Security/SecBasePriv.h
errSecMissingEntitlement = -34018, /* Internal error when a required entitlement isn't present. */

Related

Missing IOS distribution signing identity for

I'm trying to Validate my app on xcode and I'm having this error pop up when I try to do so. I've read that I should delete and re-add my login certificates in keychain access as well as the system ones. But this doesn't seem to do anything in my case.
The error I get on the certificate is as follow:
"This certificate has an invalid issuer"
I would like to point out that when I click the drop down on the certificate it says a IOS developer but its kind is a private key.
does anyone have a similar problem?
Many thanks
I just wanted to add this image to give people a better understanding of my keychain access.. All the ones that aren't highlighted are giving me the above mentioned error.
**** Update ****

ERROR ITMS-90034: Missing or invalid signature

Every time trying to submit but some result. Like this
ERROR ITMS-90034: "Missing or invalid signature. The bundle '****.******.****' at bundle path 'Payload/APP_NAME.app' is not signed using an Apple submission certificate."
Everything looks fine, we click submit, it goes to validate, and starts to upload to the app store. Then at the very last second ,the error pops up no matter what we've done to try to fix it.
Tried following steps to.
1) Tried to make just new app and upload ( With this excluded depending from any framework or source and any settings) - some result
2) Tried to remove account from Xcode->Preferences->Account (Remove account) and then add again.
3) Tried revoke certificate make again and then refresh provisioning profile
4) Tried to make app zip and upload from Application Loader
5) Tried to make IPA
6) Make change in Keychain Access for related Certification Authority certificate from "Always Trust" to "Use the system default".
7) remove all certificates and provisioning profiles and add again.
The build is valid
Some Error for every time, when trying to upload for submission.
Error from Application loader.
Error from Organizer.
Has anyone been able to work through this or a similar issue, and can you help?
I have just got the same issue. I have restarted XCode and it works like a charm!
I have not changed anything and it was working an hour ago; therefore, I did not spent any time on keychain. I have simply restarted XCode and it has worked.
If the problem still persists, then I recommend you to Go to Keychain Access, delete all the expired certificates, and add the corresponding valid certificate.
you can try... Make change in Keychain Access for related Certification Authority certificate from "Always Trust" to "Use the system default".
This do the trick for me!
I got the same issue today. My app was sent successfully, but after 10 mins I got an email. with this Error ITMS-90034. As result, I started to check If my profiles are expired and etc. Everything was fine. So maybe after few hours I just sent a new archive, and it was successfully uploaded. I guess it was related to the apple side.
I have resolved this many times:
check AppleWWDRCA certificate if expired or not.
check fields for always trust by double click the distribution certificate in keychain.
I was using another distribution certificate from same name with another expiry date.
update/delete previous distribution installed certificate
It works for me in few days ago. But, Today 2016/2/22, I use the same step to do all of setting not change after one day work still can't upload to App store. I don't know whats going on. Does anyone has solved this problem.
Finally, I find a good solution to solve this issues first download and install the new WWDR intermediate certificate (by double-clicking on the file). deleting the expired certificate from keychain . Then all of problem is solved. Here for reference Xcode 7 error: “Missing iOS Distribution signing identity for …”
I have two certificates with same bundle identifier. One was revoked and one was valid.
I deleted the revoked one and it worked for me.
Reason of Error: Compiler could not figure the correct certificate (unknown).
This issue can be raised because of distribution certificate with private key not present in the keychain or revoked from apple developer account.
We can fix this issue by two ways :
Create distribution certificate on apple developer account. download it and add it in keychain. Make sure this certificate is added in login section with private key.
If distribution certificate is already created on any other machine that time you can take distribution certificate with private key by selecting distribution certificate and private key, export both items to specific destination path. After take that certificate and add it in keychain.
Happy Coding ...
For me the problem was the Signing Certificate at the MyProject -> Signing & Capabilities -> Release page differed from the common name of the Distribution certificate at the Organizer page.
The common name could be found in Keychain Access by a right click at a certificate name and then get info.
Go to Keychain Access, delete all the expired certificates, and add the corresponding valid ones.
i was facing same issue, i was selecting Automatically Signing on xCode and manually distribution certificate at uploading time.
then i tried manually certificate on both places.(Xcode and TF.) Now it's working fine.
the solution is to generate a provision profile again, from the apple developer page.
Make sure you're using the same profile in Signing and Capabilities either the one you're in Product -> Archive.
Checking that worked for me! I use manual signing and didn't realize I had different profiles.
https://developer.apple.com/forums/thread/133781?answerId=423098022#423098022
I recommend to revoke all certificates you have duplicated in developer.apple.com account under certificates, I kept my distribution certificate.
Make sure to revoke all other distribution or development certificates associated to your name.
Go to Xcode and submit it again, with letting Xcode automatically sign it.

Invalid Code Signing Entitlements-in-app-payments related

I am getting the following error while validating the app before submitting to App store(using Xcode 6):
invalid Code Signing Entitlements. Your application bundle's signature
contains code signing entitlements that are not supported on iOS.
Specifically, key 'com.apple.developer.in-app-payments’ in
'Payload/Appname.app/Appname' is not supported
I got the similar answer for iCloud and associated domains.
Now i have resolved it. Please
Create new App-Id with required permissions
Create new pem file as pem file bounds with App-Id.
Finally create new mobile provision.
Change bundle identifier & mobile provision & validate it. It should work now.
Same here need fix and Fk Up Apple, why you have to kill Xcode and Developers lives always?

Keychain shows valid profile but in xcode - it says profile is not valid

After creating certificate in Apple developer account able to extract in keychain access and shows, valid certificate in private key pair but in xcode -> organiser it says profile is not valid so I am not able to create build.
Create a new provisioning profile (Distribution or Development depends on your need) and map that newly created certificate to that profile while creating. Then, Download and install it.
Please make sure that you are looking for the developer or distribution certificate in the "Login keychain". Look into "my certificates" for the certificate and check if the private and public key is associated with this certificate?
If above is fine, then please delete your old provisioning profile from organizer and create a new provisioning profile using the same certificate which is in Keychain from developer.apple.com
Please follow above steps and let me know if that works or not. If not then please write the further issue as a comment.
Quit and relaunch the Xcode. It may resolve that issue.
You seem confused between profiles and certificates. Profiles(Provisioning profiles) link up a developer/distribution certificate, device list, and a bundle id.
Case1:
It seems that you had a provisoning profile1 pointing to certificate1. Then you created profile2 which points to certificate2. Then you downloaded the profile2 and started using it for code signing missing out on downloading the certificate2 and adding it to key-chain access. So what is happening is xcode uses profile2 and from profile2 it tries to fetch certificate2 which you havent added yet, hence it shows a code signing error. Try downloading the certificate2 and add it to key chain.
Case2:
it may be the other way around you downloaded the certificate2 but did'nt edit the profile1 to point to certificate2 and the certificate1 might have expired.
Hope this solves the problem

ios - error while archiving a new app. Code Sign error: No unexpired

I got this error while archiving:
Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates
I do have a certificate which I have used before. And I am trying to reuse it, but not sure how. And I am not sure if that is the issue. I made sure that the AppId is the same in xCode and the ios Developer portal.
But I did not create provisioning or distribution certificates for the new app since I wanted to use my existing ones from the previous apps. Did I confuse some of the concepts? Possibly I am mixing up the roles of the Keychain access key, and the provisioning+distribution files.
If anyone could point out a fix, that would be great.
Thank you.

Resources