mogol / flutter_secure_storage

A Flutter plugin to store data in secure storage
https://pub.dartlang.org/packages/flutter_secure_storage
BSD 3-Clause "New" or "Revised" License
1.09k stars 340 forks source link

No such module 'flutter_secure_storage_macos' #666

Open colinbes opened 5 months ago

colinbes commented 5 months ago

mac application runs fine using command line flutter run --release -d macos but fails to compile in xcode showing error No such module 'flutter_secure_storage_macos'

In build->macos->Build->Products I do see folder flutter_secure_storage_macos under both debug and release folders. It appears that these folder do contain the module code.

ReleaseProfile.entitlements (and Debug...) contain

    <key>keychain-access-groups</key>
    <array>
        <string>*</string> // I have also tried inserting bundle id here
    </array>    

Appreciate any ideas/suggestions

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.5, on macOS 14.1.2 23B92 darwin-arm64, locale en-US)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] IntelliJ IDEA Community Edition (version 2023.2.4)
[✓] IntelliJ IDEA Community Edition (version 2023.2.5)
[✓] VS Code (version 1.85.1)
[✓] Connected device (2 available)
[✓] Network resources
rydmike commented 3 months ago

Hi @colinbes ,

Very interesting and good to know there are even more issues with macOS. I am curious though, did you get it 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!

colinbes commented 3 months ago

As it was a internal Mac application for managing internal soak testing I eventually dropped secure storage as for this project is was not really needed but I need to get back on it and figure it out.

Did you get it all working, or just the debug portion?