Public Sub PutMapInCloud(Key As String, m As Map)
iCloudKVS.RunMethod("setDictionary:forKey:", Array(m.ToDictionary, Key))
Log("synchronize result: " & iCloudKVS.RunMethod("synchronize", Null).AsBoolean)
End Sub
Public Sub GetMapFromCloud (Key As String) As Map
Dim dict As Object = iCloudKVS.RunMethod("dictionaryForKey:", Array(Key))
If dict = Null Then
Dim res As Map
Return res 'will be uninitialized
End If
Dim B4IMap As NativeObject
Return B4IMap.Initialize("B4IMap").RunMethod("convertToMap:", Array(dict))
End Sub