-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
area-essentialsEssentials: Device, Display, Connectivity, Secure Storage, Sensors, App InfoEssentials: Device, Display, Connectivity, Secure Storage, Sensors, App Infoplatform/iost/bugSomething isn't workingSomething isn't working
Description
Description
Calling SecureStorage.Default.SetAsync(key, value) when debugging on an iOS simulator throws an exception:
System.Exception: Error adding record: MissingEntitlement
at Microsoft.Maui.Storage.KeyChain.SetValueForKey(String value, String key, String service)
at Microsoft.Maui.Storage.SecureStorageImplementation.SetAsync(String key, String value, SecAccessible accessible)
at Microsoft.Maui.Storage.SecureStorageImplementation.PlatformSetAsync(String key, String data)
at Microsoft.Maui.Storage.SecureStorageImplementation.SetAsync(String key, String value)
I tried setting the CustomEntitlements in the .csproj but still it doesn't work:
<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>
Entitlements.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
I also tried to add the Keychain Sharing key to the Entitlements.plist but still the same exception is thrown:
<key>keychain-access-groups</key>
Steps to Reproduce
Call SecureStorage.Default.SetAsync(key, value) when debugging in an iOS simulator.
Expected outcome: No exception thrown
Link to public reproduction project repository
No response
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 17.2
Did you find any workaround?
No response
Relevant log output
No response
Metadata
Metadata
Assignees
Labels
area-essentialsEssentials: Device, Display, Connectivity, Secure Storage, Sensors, App InfoEssentials: Device, Display, Connectivity, Secure Storage, Sensors, App Infoplatform/iost/bugSomething isn't workingSomething isn't working