Adds eventCallbacks support to the iOS SDK. This allows a callback to be triggered by the App following a message in the bot.
To test, setup a JavaScript Event block in your bot. Set the bot handle in ExampleApp to your bot. Add the eventCallbacks attribute to your bot. Note: The JavaScript Event requires the custom_javascript_event_block feature flag be turned on.
ex.
lazy var adaFramework = AdaWebHost(handle: "nic", appScheme: "adaexampleapp", eventCallbacks: ["my-event": { event in print("it worked!") }])
Start the simulator and test. It should work! You can also try specifying a general callback with "*" as the key name. This will be triggered for any event.
Checklist
[ ] The steps for distribution have been follow here.
[ ] A Release Note has been drafted and published after merging to master.
Description
Adds
eventCallbacks
support to the iOS SDK. This allows a callback to be triggered by the App following a message in the bot.To test, setup a JavaScript Event block in your bot. Set the bot handle in
ExampleApp
to your bot. Add the eventCallbacks attribute to your bot. Note: The JavaScript Event requires thecustom_javascript_event_block
feature flag be turned on.ex.
Start the simulator and test. It should work! You can also try specifying a general callback with "*" as the key name. This will be triggered for any event.
Checklist