Type | Library |
Corona Store | save |
Keywords | save, secure, crypto, hash, JSON |
See also | Sample code |
The save plugin can be used in your Corona project. It enables you to securely save application data, such as game high scores and achievements progress, and persistent settings/configuration. The secure aspect is useful for preventing users from modifying save data in an attempt to cheat leaderboards/achievements, or unlock IAP for free.
local save = require "plugin.save"
In order to use this plugin, you must activate the plugin at the Corona Store.
When you build using the Corona Simulator, the server automatically takes care of integrating the plugin into your project.
All you need to do is add an entry into a plugins
table of your build.settings
. The following is an example of a minimal build.settings
file:
settings =
{
plugins =
{
-- key is the name passed to Lua's 'require()'
["plugin.save"] =
{
-- required
publisherId = "com.pelagic-games",
},
},
}
If you have activated this plugin, you can download this plugin from the corresponding plugin page in the Corona Store.
You can access sample code here.
More support is available from the Pelagic Games team:
Platform | Supported |
---|---|
iOS | Yes |
Android | Yes |
Android (GameStick) | Yes |
Android (Kindle) | Yes |
Android (NOOK) | Yes |
Android (Ouya) | Yes |
Mac App | Yes |
Win32 App | Yes |
Windows Phone 8 | Yes |
Corona Simulator (Mac) | Yes |
Corona Simulator (Win) | Yes |