How to run an iOS app that causes runtime error for frameworks “code signature invalid”

This is an issue with iOS 13.3.1. All dynamic frameworks being compiled to the newest release of iOS 13.3.1 are experiencing this issue when run on a personal provisioning profile/developer account. The solution, copied from jmagman from Github, is below. You can: Use a non-Personal Team provisioning profile (paid developer account). Run on the 13.3.1 … Read more

“No unexpired provisioning profiles found that contain any of the keychain’s signing certificates” Horror

iOS distribution is such a pain in the ass! This worked for me (follow the steps in this order): 1) in the xcode organizer: delete all provisioning profiles 2) in the mac os x keychain: delete all iOS dev certificates 3) go to developer.apple.com log in to the member center revoke all certificates (edit: some … Read more

Enumerate all Keychain items in my iOS application

SecItemCopyMatching is the right call for that. First we build our query dictionary so that the items’ attributes are returned in dictionaries, and that all items are returned: NSMutableDictionary *query = [NSMutableDictionary dictionaryWithObjectsAndKeys: (__bridge id)kCFBooleanTrue, (__bridge id)kSecReturnAttributes, (__bridge id)kSecMatchLimitAll, (__bridge id)kSecMatchLimit, nil]; As SecItemCopyMatching requires at least the class of the returned SecItems, we create … Read more

How to install developer certificate/private key and provisioning profile for iOS development via command line?

The always allow GUI is being triggered because codesign hasn’t been given an acl to access your private key. try this: security unlock-keychain -p <my keychain password> security import Certificate.p12 -k ~/Library/Keychains/login.keychain -P password -T /usr/bin/codesign The -T flag tells security to allow codesign to have access to the keys you are importing in Certificate.p12.

Reset keychain on the device

Keychain items are in iOS sandbox, users don’t have access to remove unwanted keychain item. These are accessible via API’s only. KeychainItemWrapper *keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:[[NSBundle mainBundle] bundleIdentifier] accessGroup:nil]; //or how you access your keychain [keychainItem resetKeychainItem]; or you can reset your device >> from the device Settings, General, Reset, Reset All Settings. But, … Read more

OSStatus error code -34018

After some research, I found this: http://opensource.apple.com/source/Security/Security-55471/sec/Security/SecBasePriv.h So -34018 is errSecMissingEntitlement and the comment says Internal error when a required entitlement isn’t present. Do you experience this error while running your unit tests? If so, this might help: https://stackoverflow.com/a/22305193/171933 This issue on github says that it only seems to happen while debugging from Xcode: https://github.com/soffes/sskeychain/issues/97 … Read more

How to share keychain data between iOS applications

After some (a lot of) digging throughout the web, I found the answer. The access Group that you use when constructing your KeychainItemWrapper class must ALSO be specified in each of your application’s Entitlements.plist file in the “keychain-access-groups” section. It seems almost obvious now that I see “keychain-access-groups“. However, I had no idea to even … Read more

iOS Keychain Security

Fraunhofer’s study on iOS keychain security: http://sit.sit.fraunhofer.de/studies/en/sc-iphone-passwords.pdf http://sit.sit.fraunhofer.de/studies/en/sc-iphone-passwords-faq.pdf From what I can tell, there are two levels of encryption that the iOS keychain uses. The first level uses the lock screen passcode as the encryption key. The second level uses a key generated by and stored on the device. Fraunhofer’s researchers have figured out how … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)