Can recieve iOS push notifications, but how to send?
Posted: Thu Mar 14, 2024 10:35 pm
Hi all,
I have followed the steps described here to set up and send/recieve push notifications on iOS https://lessons.livecode.com/m/4069/l/1 ... ons-in-ios
I downloaded the example stack and I'm now recieving push notifications on my iPhone app, sending them from my desktop. Yay!
I would now like to send the messages out from the iPhone.
I included all the fields and stack script from the example into my iOS app. I tried sending a push notification to my own iPhone, but its not working. I have the device ID continually checked as I know these can change, so its not that. Everything else is the same as when I send from my desktop other than the folder path to the AuthKey, which I have as:
specialFolderPath("resources") & "/AuthKey......
although I also tried
specialFolderPath("resources")/AuthKey...
I'm not even getting notified of errors via the sort of status field, as I would when running on desktop.
I suspect the issue is this part of the stack script:
I'm not fully sure what's happening here, is it creating a file "send.sh" or reading it? I'm just not sure how this works but I'm sure this is where the problem is encountered trying to run on iOS.
Any help would be much appreciated!
I have followed the steps described here to set up and send/recieve push notifications on iOS https://lessons.livecode.com/m/4069/l/1 ... ons-in-ios
I downloaded the example stack and I'm now recieving push notifications on my iPhone app, sending them from my desktop. Yay!
I would now like to send the messages out from the iPhone.
I included all the fields and stack script from the example into my iOS app. I tried sending a push notification to my own iPhone, but its not working. I have the device ID continually checked as I know these can change, so its not that. Everything else is the same as when I send from my desktop other than the folder path to the AuthKey, which I have as:
specialFolderPath("resources") & "/AuthKey......
although I also tried
specialFolderPath("resources")/AuthKey...
I'm not even getting notified of errors via the sort of status field, as I would when running on desktop.
I suspect the issue is this part of the stack script:
Code: Select all
on doSendNotification
local tScriptFile
put specialfolderpath("temp") & "/send.sh" into tScriptFile
put sScript into url ("binfile:/" & tScriptFile)
get shell ("sh" && tScriptFile)
put it into fld "output"
end doSendNotification
Any help would be much appreciated!