Gives you access to storing simple key-value pairs in iCloud. Values will be synchronized across all of the user's iOS devices.
There are several requirements for this module to function properly:
- This module will ONLY work with iOS 5 devices and higher. THE SIMULATOR WILL NOT WORK!
- All provisioning profiles must have been generated from an application configured to support iCloud. Check in your Provisioning Portal > App IDs that the "iCloud" column says "Enabled" beside your app.
- The device must be set up to use iCloud, and be signed in to an iCloud account.
Otherwise, you will receive warnings, and any calls to the "sync" method will return false.
If you have met the above requirements and you are still receiving errors, try removing the profiles from your device, and delete them from your Apple account. Regenerate them and try again.
View the Using Titanium Modules document for instructions on getting started with using this module in your application.
To access this module from JavaScript, you would do the following:
var iCloud = require('ti.icloud');
Forces your recent property changes to be saved to disk. Calling this method is optional, and it does not influence when Apple chooses to synchronize your changes with their servers and other iOS devices.
Stores a string.
Stores a boolean.
Stores a dictionary of any serializable values.
Stores an array of serializable values.
Stores an integer.
Stores a double.
Stores a serializable object.
Retrieves a previously stored string.
Retrieves a previously stored boolean.
Retrieves a previously stored dictionary.
Retrieves a previously stored array.
Retrieves a previously stored integer.
Retrieves a previously stored double.
Retrieves a previously stored object.
Retrieves all previously stored properties as a dictionary. The key you stored the property with will be its key in the dictionary.
Removes a previously stored property permanently.
The value changed on the remote server. This can occur when another device syncs a new value to the server.
Receives a dictionary with the following keys:
- keys (
[String]
): Affected store keys.
Local changes were discarded because an initial sync from the server has not yet happened. Initial syncs happen the first time the device is synced but may also happen when user account settings change.
Receives a dictionary with the following keys:
- keys (
[String]
): Affected store keys.
The key-value store has exceeded its space quota on the server.
Receives a dictionary with the following keys:
- keys (
[String]
): Affected store keys.
The user has changed the primary iCloud account. The keys and values in the local key-value store have been replaced with those from the new account, regardless of the relative timestamps.
Receives a dictionary with the following keys:
- keys (
[String]
): Affected store keys.
See example/app.js
.
Matthew Apperson, Hans Knöchel
View the change log for this module.
Please direct all questions, feedback, and concerns to [email protected].
Copyright(c) 2010-Present by Axway Appcelerator. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.