I'm working on building an iOS module for trigger.io. I have it working as desired within the ios-inspector
app.
I've tried building the module following the docs here: https://trigger.io/docs/current/api/native_modules/the_basics.html#ios_2
I get a generated inspector/ios-inspector/build/module.a
I then copy that module.a
to module/ios/module.a
I then go into the trigger toolkit and bump the version number and upload the new module. Then in the toolkit app section I pick the new version of the module and build the app.
in my app code I do
for(var prop in forge.my_module){
console.log("prop==", prop, forge.my_module[prop]);
}
and the only properties I get are:
[ INFO] Console.log: prop==,showAlert,function (c, b, a) {forge.internal.call("my_module.showAlert",{text:c},b,a);}
Which is the showAlert
method from the original ios-inspector
project. However I no longer have any Objective C code for that method.
I feel like I'm missing an obvious step here.
Adding objective C API methods will allow you to call them like so:
No JavaScript methods are generated for you, they're actually defined explicitly in
module/javascript/module.js
. The defaultmodule.js
generated when making a module contains something like:You should be able to add your APIs there. See https://trigger.io/docs/current/api/native_modules/adding_javascript.html for more details.