我正在尝试测试一个使用 iCloud 键值存储的应用程序。一切都在物理设备上运行,但键值存储不会使用模拟器保存任何内容。
据我了解根据本文档 https://developer.apple.com/library/ios/documentation/ides/conceptual/iOS_Simulator_Guide/TestingontheiOSSimulator/TestingontheiOSSimulator.html,iCloud 测试可以在模拟器上进行,并且应该可以工作。 (顺便说一句,我已经在模拟器上配置了 iCloud)
我正在使用 Xamarin / Monotouch 和以下代码:
var store = NSUbiquitousKeyValueStore.DefaultStore;
store.SetString ("TestKey", "test123");
store.Synchronize ();
当立即或稍后读取该值时,该值始终为空。
var store = NSUbiquitousKeyValueStore.DefaultStore;
var testValue = store.GetString ("TestKey");
//*** testValue always null using the simulator ***
是否可以在 iOS 模拟器中测试 iCloud 键值存储?
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)