Comments (9)
Error codes or something?
from swiftkeychainwrapper.
None so far. I spent 2 days trying to figure out why it was happening, only things I know for sure is that setting a string using: KeychainWrapper.setString("Some String", forKey: "myKey") //or any variation\ - and then trying to grab that set string - will result in nil only on *some devices. Very odd indeed.
from swiftkeychainwrapper.
in
setData(value: NSData, forKey keyName: String) -> Bool
we are adding item into keychain with
SecItemAdd(keychainQueryDictionary, nil)
and it returns OSStatus, which says how operation went. Which OSStatus number are you getting back with error?
from swiftkeychainwrapper.
Any updates on whether or not this is still occurring? I would like to start cleaning up some of these old issues and don't really have anything to go on for this one.
from swiftkeychainwrapper.
@jrendel I am experiencing this issue after upgrading my project from swift 2.1 to 3.0. I have not seen this issue related to different device simulator, it happens on any simulator for me but works great on my iPhone 6s. I have upgraded to the swift 3 version of your code. Example of how I'm current using your library to store and get values:
/* Set the username user default */
class func setUsername(_ username:String){
KeychainWrapper.standard.set(username, forKey: usernameKey)
}
/* Get the user defaults username. If not found return an empty string. */
class func getUsername() -> String {
var username = ""
if let val = KeychainWrapper.standard.string(forKey: usernameKey) {
username = val
} else {
setUsername("")
}
return username
}
from swiftkeychainwrapper.
Matt are you using iOS 10 simulators? Does the issue occur on iOS 9 simulators as well?
from swiftkeychainwrapper.
@jrendel I was previously running everything on iOS 9 with success. I recently switched to iOS 10 and had some issues only with the iOS 10 simulators. Dug through some more of your issues on here this morning and saw the recommendation to turn on Push Notifications and now it works fine in iOS 10 simulators.
from swiftkeychainwrapper.
@jrendel there is a known issue in Xcode 8.1
Keychain APIs may fail to work in the Simulator if your entitlements file doesnโt contain a value for the application-identifier entitlement. To workaround this issue, add a user-defined build setting to your target named ENTITLEMENTS_REQUIRED and set the value to YES. This will cause Xcode to automatically insert an application-identifier entitlement when building. (28338972)
The returning status of SecItemAdd(keychainQueryDictionary, nil)
is -34018
which correspond to this description:
Internal error when a required entitlement isn't present.
And all this is fixed in Xcode 8.2
Keychain APIs work correctly in Simulator. (28338972)
from swiftkeychainwrapper.
This issue with iOS 10 simulators should be fixed now in Xcode 8.2.
from swiftkeychainwrapper.
Related Issues (20)
- Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2 compiler HOT 1
- Error trying to install application
- Clear Data HOT 1
- Deprecation warnings for iOS12 HOT 4
- Accessibility is not working HOT 2
- Problem with set(...) in template
- Access Groups clarification HOT 4
- Support for multi platform framework target(tvOS, iOS, macOS) HOT 1
- Can this pod work with Mac Project Catalyst
- SecItemCopyMatching Crash HOT 1
- iOS15 beta clearing keychain HOT 1
- 'NSKeyedUnarchiveFromData' should not be used
- Callback on keychain value change for given key
- I've noticed, that if i store something and immediately retrieve from other function, it not manage to return appropriate value.
- KeyChain access between app and share extension HOT 1
- XCTestCase: set NewValue return False HOT 2
- Incrementing and saving do not work properly HOT 1
- Apple SignIn email is not retrieving
- removeAllKeys does not delete any items that were saved with synchronizable as true
- Receiving "warning: linking against a dylib which is not safe for use in application extensions"
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 swiftkeychainwrapper.