-
Notifications
You must be signed in to change notification settings - Fork 0
/
wickeyappstore.lua
45 lines (35 loc) · 1.16 KB
/
wickeyappstore.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--
-- myplugin.lua
-- Copyright (c) 2018 Corona Labs Inc. All rights reserved.
--
local lib
local platform = system.getInfo("platform")
if platform == 'html5' then
-- use native JS plugin
lib = require("wickeyappstore_js")
else
-- wrapper for non web platforms
local CoronaLibrary = require "CoronaLibrary"
-- Create stub library for simulator
lib = CoronaLibrary:new{ name='wickeyappstore', publisherId='com.wickeyappstore' }
-- Default implementations
local function defaultFunction()
print( "WARNING: The '" .. lib.name .. "' library is not available on this platform." )
end
lib.set = defaultFunction
lib.get = defaultFunction
lib.addEventListener = defaultFunction
lib.onOpen = defaultFunction
lib.onClose = defaultFunction
lib.onLoad = defaultFunction
lib.loginChange = defaultFunction
lib.updateUsername = defaultFunction
lib.getLeaderboard = defaultFunction
lib.submitHighscore = defaultFunction
lib.dataRestore = defaultFunction
lib.dataSave = defaultFunction
lib.dataGet = defaultFunction
lib.user = defaultFunction
end
-- Return an instance
return lib