Comments (6)
This is a debug-only entitlement issue, not a threading issue. Sometimes Xcode fails to sign the debug build properly, which can cause this error. We saw this a whole lot on Xcode 6.2 IIRC, but we haven't seen it since upgrading to 6.3. [valet canAccessKeychain]
will return NO in this state. We worked around this issue by asserting canAccessKeychain
in application:didFinishLaunchingWithOptions:
under #if DEBUG
. That way we knew right off the bat if Xcode/entitlements had screwed up. This issue never affected our signed enterprise builds or our signed app store builds.
Any chance you aren't running the latest version of Xcode?
EDIT: Never mind, you're running on iOS 8.3, which means you must be using Xcode 6.3+. Maybe it was Xcode 6.3 that caused the issue and upgrading to Xcode 6.3.2 fixed it? I don't recall the exact scheme that fixed it, but a couple months ago we were seeing this error daily, and now we aren't βΒ and we haven't made any changes to Valet or how we use Valet that could affect this issue since then. The only other change we've made regarding entitlements since then is to regenerate our then about-to-expire provisioning profile. If I remember correctly we encountered this issue in the week or two leading up to our internal (not App Store) provisioning profile expiring.
from valet.
Valet is built with the intent to allow allow using the same instance across multiple threads, so this should indeed work. Is it possible you've got a timing issue? Try adding a break point on the return line of objectForKey: and setObject:forKey: to see what your timing is. If the order of operations is what you're expecting, I'm curious what the status code is on the failed objectForKey:
from valet.
And just to help with diagnosis, mind providing us with which platform and which Valet subclass you're using?
from valet.
This is as much as we know.
We added some breakpoints and they execute in the correct order, we tried this using FXKeychain
and it logs out an error code -34018 (Something I think Valet should do when there is an error).
This error seems to mean that either our bundle ID doesn't match the one used to write/read to the keychain or we don't have the correct entitlements if it's a shared one.
We used the normal Valet subclass for accessing the keychain, the weird thing is when we run the exact same app not from Xcode it works perfectly. And sometimes running it from Xcode it will be perfectly okay especially if you've ran the app untethered beforehand but then suddenly we will just get that error.
It primarily happens on a iPhone 6 / 6 Plus under iOS 8.3, we don't get it on a iPod Touch.
We've tried to research this online, it seems some people have this issue but so far no solutions.
from valet.
So we did some more research and we found out that one of our developers is using OS X 10.11. And it seems the combination of Xcode 6.3.2, OS X 10.11 and iOS 8.3 causes this issue.
We have filed a radar with Apple to help shed some light on the issue, but that information is very interesting.
from valet.
Something to look forward to when we upgrade our machines I guess π. Thanks for filing the radar!
I'm closing this issue since it seems resolved. If you get any updates to the radar, please do share them.
from valet.
Related Issues (20)
- Add convenience access methods for `Codable` types HOT 6
- .whenUnlocked vs .afterFirstUnlock HOT 3
- Create new KeyChain Option HOT 5
- SecKeychainAddCallback(_:_:_:) along with Valet HOT 4
- Enable customization of biometrics prompt with application-specific fallback HOT 26
- Unit tests fail on tvOS 14 HOT 4
- Tips on building and running the sample app? HOT 1
- Keychain Sharing between iOS App and Apple Watch Extension HOT 6
- Documentation for `afterFirstUnlockThisDeviceOnly` wrong? HOT 1
- iOS 15 crash on `specialized static SecItem.copy<A>(matching:)` HOT 18
- [Feature Request] Unlock with Apple Watch with no passcode fallback HOT 7
- iOS 16 build error HOT 6
- tvOS target doesn't compile with Xcode 14.0 beta HOT 8
- Deprecation warnings when targeting iOS 14+ HOT 4
- (Some folks) await async support HOT 5
- error: non-void function does not return a value [-Werror,-Wreturn-type] HOT 2
- No way to invalidate() HOT 1
- Support for cryptographic key item (kSecClassKey) HOT 2
- Could not find module 'Valet' for target 'x86_64-apple-ios-simulator' HOT 7
- Migration from Valet 3 format HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valet.