Hello Expo forum!
I know my question is quite similar to “Get value from SecureStore on native application”, but please read on for details!
I have a ReactNative app (only published for iOS) which uses
getItemAsync to put and read values from iOS keychain.
Here is the link to the
.m file - EXSecureStore.m on GitHub.
I am transitioning to Flutter and I need to keep the users logged in, i.e. to get their auth tokens from the previously installed RN version of the app.
I am using the
FlutterSecureStoragePlugin (link to the
.m file) to access the Keychain values.
So, here is what I do
- I install the RN app from the App store,
- Log in (the token is saved with ExpoSecureStore),
- Install my Flutter app
- Try to access the Keychain - nothing found!
- Reinstall the RN app from the App store,
- User is logged in when I open the app
So, my Flutter installation doesn’t delete the tokens, but it can’t access them!
The Flutter app has the same bundle ID, so that should not be the problem.
I’ve changed it’s source code so that I use the same keychain service (
kSecAttrService), which defaults to
Also, I’ve copied and adapted the code for reading the Keychain values from
FlutterSecureStoragePlugin.mbut still no luck…
Could there be any difference in the way RN and Flutter libraries pass strings down to native iOS? I guess there must be something going on with the Keychain access that I don’t know, so any help is very welcome!
Thank You for reading!