Closed jrendel closed 7 years ago
The suggested fix to enable the Keychain Sharing entitlement doesn't work here since its not an option on a Framework target.
Installing the iOS 9.3 simulators and running tests against that works, so I'm going to move forward with that for now when running tests.
Similar issue/solution discussed here: https://github.com/jrendel/SwiftKeychainWrapper/issues/66#issuecomment-251249507
I have solved this in the latest changes by adding an entitlements file (for debug only) that allows the keychain to work under iOS 10 simulators. The entitlement simple adds a get-task-allow true flag to a test app and the unit test target uses that as its host app.
If you are running into similar issues in your project using the keychain wrapper, you can add a similar entitlements file to your main project. If you use an entitlements file with get-task-allow true in it, I would only add it as a debug entitlement.
Alternatively, if you enable any app capabilities that generates an entitlements file, that should be sufficient.
Xcode 8.2 beta fixed problems on simulator on iOS 10:
Keychain APIs work correctly in Simulator. (28338972)
http://adcdownload.apple.com/Developer_Tools/Xcode_8.2_beta/Release_Notes_for_Xcode_8.2_beta.pdf
Good to know!
This issue has been fixed in Xcode 8.2.
Getting OSStatus error -34018 on unit tests while trying to finalize the Swift 3.0 version of the library, so I'm opening this to track what I find.
So far some info here at the end: https://forums.developer.apple.com/thread/4743
Suggested workaround: https://forums.developer.apple.com/message/170381#170381