jpCloudEnvironment

jpCloudEnvironment

Environment variables in the cloud
Version : 2.0
Price : $20
State : Outtvosipadiphone

Downloads

Changelog

v2.0

  • Now compatible with Apple TV
  • Now compatible with ShiVa 2.0.
  • Compiled for Mac and Linux in addition to Windows, so you can now use it while working with ShiVa Editor for each of these operating systems.
  • Now uses a user token instead of an email to activate

API

--jpCloudEnvironment API jpCloudEnvironment.activate ( sUserToken, sActivationKey ) jpCloudEnvironment.clear ( ) bYes = jpCloudEnvironment.variableExists ( sName ) vValue = jpCloudEnvironment.getVariable ( sName ) nCount = jpCloudEnvironment.getVariableCount ( ) sName = jpCloudEnvironment.getVariableNameAt ( nIndex ) jpCloudEnvironment.setVariable ( sName, vValue ) jpCloudEnvironment.synchronize ( ) jpCloudEnvironment.unsetVariable ( sName ) --User notification events: "onCloudEnvironmentChanged" ( )

Description

jpCloudEnvironment works just like the ShiVa integrated environment system, except that the environment is stored on iCloud.

Its API has been designed to be as smooth as possible. The functions name are the same ones as the default ShiVa environment ones.

A couple of things to know

Once variables have been saved locally they will not be synchronized with iCloud storage until a call is made to the synchronize. It is important to note that a call to the synchronize method does not result in an immediate synchronization of the locally saved data with the iCloud store. iOS will, instead, perform the synchronization at what the Apple documentation refers to as “an appropriate later time”.

Data Storage Restrictions

The amount of data that can be stored per variable is 64Kb. The per-application limit is 256 individual variables which, combined, must also not exceed 64Kb in total.

Conflict Resolution

In the event that two application instances make changes to the same variable, the most recent change is given precedence.

Sharing Data Between Applications

As with iCloud document storage, environment storage requires the implementation of appropriate iCloud entitlements. In this case the application must have the com.apple.developer.ubiquity-kvstore-identifier entitlement key configured in the project’s entitlements file. The value assigned to this key is used to identify which applications are able to share access to the same iCloud stored key-value data. If, for example, the ubiquity-kvstore-identifier entitlement key for an application named MyApp is assigned a value of ABCDE12345.com.mycompany.MyApp (where ABCDEF12345 is developer’s unique team or individual ID) then any other applications using the same entitlement value will also be able to access the same stored environment. This, by definition, will be any instance of the MyApp running on multiple devices, but applies equally to entirely different applications (for example MyOtherApp) if they also use the same entitlement value.

Requirements

  • The jpEventQueue plugin is required (free)