"Error adding record: MissingEntitlement" when using secure storage

Roman Prystaiko 15 Reputation points
2024-02-16T19:03:30.9+00:00

Hello, I use a mac m1, NET8 MAUI and vs code. I created a simple project. I use secure storage. I get this exception "Error adding record: MissingEntitlement" I checked, and I had this file under platforms/MacCatalyst I added this configuration <key>keychain-access-groups</key> <array> <string>com.companyname.appname</string> </array> But it is not working. I always receive this exception. I want to develop it locally and I am not going to buy an Apple developer account to receive certificates to publish the app to the Apple store. Please tell me what I am doing wrong.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,887 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ben Heldoorn 0 Reputation points
    2024-04-11T21:03:06.64+00:00

    See this technote https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles#Entitlements-on-macOS

    "In contrast, *restricted entitlements* must be authorized by a provisioning profile. This is an important security feature on macOS. For example, the fact that the keychain-access-groups` entitlement must be authorized by a profile means that other developers can’t impersonate your app in order to steal its keychain items."

    So, you need a provisioning profile, and you won't get one if you don't have a paid developer account. Bummer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.