Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Any Plugin Tutorials? — Gideros Forum

Any Plugin Tutorials?

fawzmafawzma Member
edited January 2012 in General questions

Has anyone come up with a tutorial on writing a basic plugin?

I understand how you add native function to LUA and whatnot, I just can't wrap my head around what and when things should be added.

For instance, I want to test a plugin with the button sample. So I export the button app.

1) In xcode what am I including; all the SDK/include files and the plugin file and that's it?
2) Do I need to create a new target and compile the plugin and include it with the button app.

I've attempted 1) and put in an NSlog on the gamekit authenticate function in hopes to see lua calling it, but no luck.

I have storekit functions I've used for other apps that I'd like to convert to a plugin, just need to take that first baby step.


  • CarolineCaroline Guru
    edited January 2012
    I'm hoping to post simple sample code in the next few days, just showing how to send and receive data to and from an iOS plugin, not doing anything specific.

    For the gamekit authenticate function, try this:
    require "gamekit"
    local function onAuthenticateComplete()
    gamekit:addEventListener("authenticateComplete", onAuthenticateComplete)
    It needs to be run on the device - run GiderosiPhonePlayer on the iPhone. To receive Xcode console debug messages, you need to run the app from Xcode, so the iPhone has to be both plugged in (for Xcode) and receiving wireless (For Gideros Studio). Then run the Lua code from Gideros Studio, making sure player settings have the same IP as displaying on the iPhone.

    You can make changes to the Lua code and re-run from Gideros Studio, without having to exit the Xcode one.

    I've been having Xcode open on the left, and Gideros Studio on the right, with both debug consoles showing.

    And you need beta #7 for the gamekit to be included in GiderosiPhonePlayer. You shouldn't have to do anything on the Xcode end, except run the app. (I think)
Sign In or Register to comment.