Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

KeyChain access on iOS 11 simulator requires

$
0
0

Hello,

I've been doing some maintenance on an old iOS app and been getting errors adding items to the keychain on the iOS Simulator (I haven't tried deploying the app to a real phone just yet).

I'd like to confirm what I think is the case:

  • The iOS simulator requires the keychain-access-groups entitlement to access the KeyChain.
  • That implies you need to provision the simulator with approprate certificates, et al.

The symptoms I'm seeing is that any call to SecKeyChain.Add() returns SecStatusCode.Parm. See below for an example.
I've tried setting pretty much every combination of property on SecRecord.
And have confirmed the Xamarin KeyChain sample app does not work on the simulator.

public static void SaveTicket(string ticket)
{
    var record = new SecRecord(SecKind.GenericPassword);
    record.Account = "ticket";
    record.ValueData = ticket;
    SecStatusCode sRes = SecKeyChain.Add(record);
    // sRes is always Parm
}

Murray


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>