iOS Siri integration and push-notification
Example: iOS Siri integration and push-notifications
Task
This example will show how to integrate Siri voice commands with LogicMachine and how to use push-notifications on your iOS device on specific events.
Video tutorial
Push-notification integration
Script to send push-notification to specific iOS device:
- pusher = dofile("/home/apps/store/data/cloud/lua/pusher.lua")
-
- status, errors = pusher.push_notification('08a7a67cc15d5325c0bbaffbd1106c0e5a914b8ea6e850f4210a4a2cd260c835', 'Test Message')
- log(status, errors)
Script to send push-notifications to all iOS devices:
- pusher = dofile("/home/apps/store/data/cloud/lua/pusher.lua")
-
- local ids= {}
- for _, d in ipairs(pusher.get_ios_devices()) do
- table.insert(ids, d.id)
- end
- local status,errors = pusher.push_notification(ids, 'Your house is on FIRE!')
- log(status,errors)
Here you can download FB editor libraries for push-notifications. Install it through Scripting -> User libraries -> Restore