How to pass parameters from iOS native level to Lua directly without using plug-ins

Read through the document to use customised plug-in as a.lib:
https://docs.coronalabs.com/tutorial/native/iosIntro/index.html

just wondering is there an earlier way to communicate between lua and native iOS?

How to pass parameters from iOS native level to Lua directly without using plug-ins?

Are you looking for this?

In iOS callbacks, there would be a place that I wish to send Lua a event, but I don’t know how to get the lua_State*, how should I get it?

I thought I had a video of how to this but it might have been in the forums at some point. In any case here is an example project I built for the lost video:

FireFromLua.zip (128.0 KB)

I have also attached a much more complicated implementation that I use for Skillz:

FireFromLuaSkillz.zip (3.5 KB)

And finally the Lua portion of the Skillz code:

skillz2.lua.zip (1.1 KB)

Hope this helps to answer your question.

1 Like