Cannot run in iOS simulator
See original GitHub issueCode builds fine. When I run in simulator mode, it gives.
System.Exception: Error adding record: MissingEntitlement at Xamarin.Essentials.KeyChain.SetValueForKey (System.String value, System.String key, System.String service) [0x0009a] in D:\a\1\s\Xamarin.Essentials\SecureStorage\SecureStorage.ios.tvos.watchos.cs:126 at Xamarin.Essentials.SecureStorage.SetAsync (System.String key, System.String value, Security.SecAccessible accessible) [0x00027] in D:\a\1\s\Xamarin.Essentials\SecureStorage\SecureStorage.ios.tvos.watchos.cs:24 at Xamarin.Essentials.SecureStorage.PlatformSetAsync (System.String key, System.String data) [0x00000] in D:\a\1\s\Xamarin.Essentials\SecureStorage\SecureStorage.ios.tvos.watchos.cs:38 at Xamarin.Essentials.SecureStorage.SetAsync (System.String key, System.String value) [0x00021] in D:\a\1\s\Xamarin.Essentials\SecureStorage\SecureStorage.shared.cs:27 at Xappy.Domain.Global.AppModel.set_UseDarkMode (System.Boolean value) [0x00001] in /Users/g7kw3/tmp/Xappy-master/Xappy/Xappy/Domain/Global/AppModel.cs:79 at Xappy.Domain.Global.AppModel.InitAsync () [0x0009f] in /Users/g7kw3/tmp/Xappy-master/Xappy/Xappy/Domain/Global/AppModel.cs:23 at AsyncAwaitBestPractices.SafeFireAndForgetExtensions.HandleSafeFireAndForget[TException] (System.Threading.Tasks.Task task, System.Boolean continueOnCapturedContext, System.Action`1[T] onException) [0x00027] in /Users/bramin/GitHub/AsyncAwaitBestPractices/Src/AsyncAwaitBestPractices/SafeFireAndForgetExtensions.cs:61 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021 at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/src/Xamarin.iOS/Foundation/NSAction.cs:178
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:10
Top GitHub Comments
Add Custom Entitlements
Add new key to Entitlements.plist
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.microsoft.adalcache</string>
</array>
this solution working well for me.
The solution is in the forum here Set the iOS project’s Custom Entitlements to your Entitlements.plist
iOS project => Properties => iOS Bundle Signing