ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / iCloud functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
WLanguage procedure called by iCloudKeyValueWatch
WLanguage procedure ("callback") called by iCloudKeyValueWatch when observing a key. This procedure gets the cause of the change.
Example
IF iCloudKeyValueWatch(Callback_Observer) = True THEN
Trace("Start observing")
END
 
INTERNAL PROCEDURE Callback_Observer(nEvent, arrKeys)
sEventLabel, sKeyList is string
 
SWITCH nEvent
CASE ickvServerChange: sEventLabel = "Server change"
CASE ickvInitialSynchronizationChange: sEventLabel = "Initial synchronization"
CASE ickvQuotaViolation: sEventLabel = "Quota violation"
CASE ickvAccountChange: sEventLabel = "Account change"
CASE ickvSynchronizationFailed: sEventLabel = "Synchronization failed"
OTHER CASE
sEventLabel = "Unknown"
END
 
Trace("------------------>>> " + sEventLabel)
 
FOR EACH sKey OF arrKeys
Trace(sKey)
sKeyList += [" / "] + sKey
END
gsObserverReport += [CR] + sEventLabel + TAB + sKeyList
END
Syntax
iCloudKeyValueWatch_Callback(<Event> , <Keys>)
<Event>: Integer constant
Cause de l'événement:
ickvAccountChangeThe user has used a different account.
ickvInitialSynchronizationChangeInitial synchronization with the Apple iCloud server.
ickvQuotaViolationThe quota has been exceeded (number of keys, storage space, etc.).
ickvServerChangeThe keys have been changed from the Apple iCloud server.
ickvSynchronizationFailedError when attempting to sync between the device and the Apple iCloud server.
<Keys>: Array
Array of keys affected by the problem. This parameter has a value only if the event affects keys.
Remarks
  • The key name must be less than 64 bytes in UTF-8 encoding.
  • An application can use up to 1024 keys.
  • The total space for key storage cannot exceed 1 MB.
  • Keys and values are shared for the same application on devices using the same iCloud account.
  • Synchronization between devices can take several minutes.
Minimum version required
  • Version 28
Comments
Click [Add] to post a comment

Last update: 02/28/2023

Send a report | Local help