Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read or edit values on macOS with hardened runtime enabled #3

Open
jdk-21 opened this issue Mar 4, 2024 · 6 comments
Open

Can't read or edit values on macOS with hardened runtime enabled #3

jdk-21 opened this issue Mar 4, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@jdk-21
Copy link

jdk-21 commented Mar 4, 2024

Describe the bug
I tried using the example and it works on Mac in debug mode. But when the app is signed and notarized the example isn't working anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the example
  2. Enable Hardened Runtime
  3. Build, Sign and Notarize the app

Expected behavior
I should be able to read/write values.

Desktop:

  • OS: macOS 14.3.1

Additional context
I added the Entitlements to both Debug and Release. They look like this:

<key>keychain-access-groups</key>
	<array/>
@jdk-21 jdk-21 added the bug Something isn't working label Mar 4, 2024
@Skyost
Copy link
Owner

Skyost commented Mar 5, 2024

Did you follow the steps here ?

@jdk-21
Copy link
Author

jdk-21 commented Mar 5, 2024

Yes, I did. I didn't enable any additional entitlements as they don't seem to be relevant for this package. But maybe that's not the case.

@Skyost
Copy link
Owner

Skyost commented Mar 7, 2024

Well, you can try and tell me if it works 🙂

@jdk-21
Copy link
Author

jdk-21 commented Mar 7, 2024

I tried it and added every entitlement possible. But it still doesn't work

@Skyost
Copy link
Owner

Skyost commented Mar 10, 2024

Seems that the hardening is only done during the signing process of your app. Can you please try to configure it like if you want to release it (with a dev team etc.), then to run flutter build macos and to run the produced build ?

Side question : does it work with the other packages (flutter_secure_storage and biometric_storage) ?

@jdk-21
Copy link
Author

jdk-21 commented Mar 10, 2024

Running the flutter app in release mode with a dev team works without issue. But actually releasing it with signing and notarizing doesn't work.
flutter_secure_storage has the same problems. I didn't test biometric_storage yet.
I also tried to find documentation on how Keychain is affected by the Hardened Runtime, but I couldn't find any documentation by Apple on this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants