flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Mac OS write read doesn't work

Open jaumard opened this issue 3 years ago • 7 comments

Not sure why but on mac OS nothing is saved (or read) from secure prefs :(

final securePrefs = const FlutterSecureStorage();
await securePrefs.write(key: 'keyToken', value: 'token');
final token = await securePrefs.read(key: 'keyToken');

token is always null, no errors or anything. No problems on iOS and Android

Using flutter_secure_storage: ^5.0.2 and flutter 2.5.3

jaumard avatar Dec 28 '21 15:12 jaumard

I'm having the same issue :/. No errors given, just doesn't work on mac.

JWambaugh avatar Dec 31 '21 03:12 JWambaugh

I have the exact same problem on latest ArchLinux, always null, no error :face_with_spiral_eyes:

Andrflor avatar Jan 11 '22 19:01 Andrflor

I am Using flutter_secure_storage: ^5.0.2 and flutter 2.9.0-1.0.pre.471

I have same issue on Mac OS.

Is there any required permission to set/change while the app is in development?

zebamba avatar Jan 25 '22 18:01 zebamba

I have the same issue. Is there any configuration which needs to be done in the MacOS runner? thx for help!

mikexkllr avatar Mar 29 '22 11:03 mikexkllr

I opened the project on XCode, then added Keychain Sharing. Added group value as * (asterisk symbol)

I am Using flutter_secure_storage: ^5.0.2, flutter 2.10.4, Dart 2.16.2

The same error still happening returning null value from the storage.

Screen Shot 2022-04-08 at 12 41 00 PM Screen Shot 2022-04-08 at 12 42 19 PM Screen Shot 2022-04-08 at 12 42 43 PM

What am I missing still?

zebamba avatar Apr 08 '22 16:04 zebamba

same thing here and brought me here.

ataknakbulut avatar Apr 10 '22 12:04 ataknakbulut

@fluttertests @mikexkllr @jaumard @Andrflor

I got it working, but I have few other issues with the build for mac after changes on the project.

Try this.

Open the macos project folder on Xcode Add Key Chain sharing capability

You have to signin Xcode with a developer account, a generated certificate, set the bundle name kind of unique.

Ps: I have done the steps in the images from my previous message on the ios project folder. lol

zebamba avatar Apr 12 '22 19:04 zebamba