Can i use NSUbiquitousKeyValueStore in iOS 7 or iOS 8 Simulator?

I am trying to test an application using iCloud keystore. Everything works on a physical device, but storage with a key does not save anything using a simulator.

From what I understand based on this documentation , iCloud verification is possible on the simulator, and this should work. (By the way, I set up iCloud on the simulator)

I am using Xamarin / Monotouch with the following code:

var store = NSUbiquitousKeyValueStore.DefaultStore;
store.SetString ("TestKey", "test123");
store.Synchronize ();

When reading a value immediately after or later, the value is always null.

var store = NSUbiquitousKeyValueStore.DefaultStore;
var testValue = store.GetString ("TestKey");
//*** testValue always null using the simulator ***

Is it possible to test iCloud key storage in an iOS simulator?

+2
source share

Source: https://habr.com/ru/post/1544591/


All Articles