Skip to content

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

Open

Description

@jdk-21

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/>

Activity

  1. added
    bug
    on Mar 4, 2024
  2. Skyost commented on Mar 5, 2024

    @Skyost
    Owner

    Did you follow the steps here ?

  3. jdk-21 commented on Mar 5, 2024

    @jdk-21
    Author

    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.

  4. Skyost commented on Mar 7, 2024

    @Skyost
    Owner

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

  5. jdk-21 commented on Mar 7, 2024

    @jdk-21
    Author

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

  6. Skyost commented on Mar 10, 2024

    @Skyost
    Owner

    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) ?

  7. jdk-21 commented on Mar 10, 2024

    @jdk-21
    Author

    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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions