As a newcomer to objective-c, xcode, and app development, I kindly ask for your patience.
I have managed to send a push notification via APNS to my new app. I can view the JSON message and log it using NSSLog.
Payload: {
aps = {
alert = {
"action-loc-key" = Reveal;
body = "Hi Aleem, we have a new special offer just for you!";
};
badge = 70;
sound = default;
};
myCMD = {
"update_colour" = red;
};
}
Everything seems to be working well so far. However, I am struggling to take action based on the received push message. For instance, I would like to extract the update_colour
value (red in this case) and change the background color of a label in my controller to red.
The issue lies in my inability to reference the label from my appdelegate.m file. Consequently, I cannot update the background color or call a method on the controller to do so either.
Any assistance with this matter would be greatly valued.