Open jdk-21 opened 4 months ago
Hi @jdk-21,
Very interesting and good to know there are even more issues with macOS. I am curious though, how on earth did you get it this package to work at all on macOS?
Even just in debug mode with self signed dev builds? I cannot get it to read the data when app starts. If keep running same app, reset all reads and then try to read, the securely stored data is there and read nicely, but if I build it again or even just hot-restart the app, the data previously stored is not there. Like starting from an empty file every time.
Link with more info https://github.com/mogol/flutter_secure_storage/issues/532#issuecomment-1987279333
Any insights you might have on getting it to work at all with macOS would be welcome 😄
EDIT: Got it working now! (The link above has the details)
Ok, great. I basically followed the instructions in the Readme. Does it work for you with Hardened Runtime enabled after Notarization?
@jdk-21 did you manage to make it working?
I couldn't get it to work yet.
@jdk-21 it could be related to keychain accessibility.
What sort of restrictiveness have you set up in production?
You might want to check if it works with v9.2.2, now that #718 and #719 have been merged.
Hi I had the same issue after upgrading to flutter 3.19.6 the app would work fine in debug/release, but as soon as I signed it for notorization the app would stop working.
After upgrading to v9.2.2 and adding this to my Release.entitlements it seems to work again.
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)*</string>
</array>
After upgrading to v9.2.2 and adding this to my Release.entitlements it seems to work again.
Cool 😎
@techouse I updated to 9.2.2 and tried the example app. In debug everything works fine like before, but after signing and notarizing the app stops working again.
Maybe check what the output of codesign -d --entitlements - YourApp.app
is before and after signing the .app
I encountered an issue on Mac with this package. When I debug my app, I can read from secure storage just fine, even in flutter release mode. But after building, singing and notarizing the app secure storage stops working and only returns null, when you try to read from it. The app has hardened runtime enabled. I already tried adding the entitlements in debug and release:
Before I noticed this issue, I had the entitlement configured like this:
Is it possible that the keychain already exists on the development Mac but the notarized app hasn't access? Is there a way to delete all data added by the secure storage package, to check this hypothesis? Has someone encountered a similar issue?
I'm using version 9.0.0