Use IOSKeyChain in Unity
- copy UnityIOSKeyChain.mm repo/Plugins/iOS/
- select UnityIOSKeyChain.mm and check "Security" in platform settings
#if UNITY_IOS
[DllImport("__Internal")]
static extern string _Get(string dataType);
[DllImport("__Internal")]
static extern int _Add(string dataType, string value);
[DllImport("__Internal")]
static extern int _Delete(string dataType);
#endif
public int Add(string name, string value)
{
int x = _AddItem(name, value);
return x;
}
Registered name, value are argument. when successed, return 0
```
public string Load(string name)
{
string x = _Get(name);
return x;
}
```
argument is registered name. when item is not exist or error, return null.
public int delete(string name)
{
int x = _Delete(name);
return x;
}
when successed, return 0