Hello,
I’m pretty new to developing on the iPhone, and I’m trying to get the alert message to popup using the ‘NotificationServices’. But it just doesn’t seem to be doing anything?
function Start(){
var notif = new LocalNotification();
notif.alertBody = "Hello!";
NotificationServices.PresentLocalNotificationNow(notif);
}
function Update(){
if (NotificationServices.localNotificationCount > 0) {
Debug.Log(NotificationServices.localNotifications[0].alertBody);
NotificationServices.ClearLocalNotifications();
}
}
Nothing pops up at all, nothing! Although, within the xcode debugger, I do see the ‘Hello!’ message:
Loading /var/mobile/Applications/109EED84-4427-4361-A38A-0FE9FE7A9712/sandboxiSO.app/Data/Managed/Assembly-UnityScript.dll into Unity Child Domain
- Completed reload, in 0.050 seconds
-> applicationDidBecomeActive()
-> force accelerometer registration
Hello!
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
SceneController:Update()
(Filename: /Applications/buildAgent/work/812c4f5049264fad/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 43)
Any reason why this isn’t working? Thanks