[iOS] Local Notifications and Alerts [DEPRECATED]

Max Finch

  • *
  • Posts: 2174
Justin I renamed all references of nme to openfl in the latest build, should that fix it regardless if Stencyl fails to remap?


  • *
  • Posts: 4712
It should, and thanks for that. But it would really be best of stencyl did the remapping, otherwise all or most of the engine extensions that have been made to date will need to be updated for the few users who it's an issue for.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)


  • *
  • Posts: 731
Hi, I do normally just overwrite stencil when I update. This time I deleted first. I installed the latest version of notifications and I seem to get the same error, but this time with openfl instead of nme.

Log below

jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833768000850   stencyl.sw.io.write.resource.HXWriter   Finished building for iOS.
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833767000849   stencyl.sw.util.StreamGobbler   [openfl] haxelib repository is now /Applications/Stencyl-full/plaf/haxe/lib/
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/error.gif   false   ERROR   1423560833747000848   stencyl.sw.util.StreamGobbler   [openfl] (1 failure)
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/error.gif   false   ERROR   1423560833747000847   stencyl.sw.util.StreamGobbler   [openfl]    ExternalBuildToolExecution Build\ Haxe
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/error.gif   false   ERROR   1423560833747000846   stencyl.sw.util.StreamGobbler   [openfl] The following build commands failed:
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/error.gif   false   ERROR   1423560833747000845   stencyl.sw.util.StreamGobbler   [openfl] ** BUILD FAILED **
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833745000844   stencyl.sw.util.StreamGobbler   [openfl] make: *** [build-haxe-armv7] Error 1
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833742000843   stencyl.sw.util.StreamGobbler   [openfl] /Users/markbawden/Dropbox/STENCYL_DEVELOPMENT/stencylworks/engine-extensions/notifications/Notifications.hx:24: characters 35-53 : Unknown identifier : openfl
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833742000842   stencyl.sw.util.StreamGobbler   [openfl] /Users/markbawden/Dropbox/STENCYL_DEVELOPMENT/stencylworks/engine-extensions/notifications/Notifications.hx:23: characters 51-69 : Unknown identifier : openfl
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833742000841   stencyl.sw.util.StreamGobbler   [openfl] /Users/markbawden/Dropbox/STENCYL_DEVELOPMENT/stencylworks/engine-extensions/notifications/Notifications.hx:22: characters 50-68 : Unknown identifier : openfl
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833742000840   stencyl.sw.util.StreamGobbler   [openfl] /Users/markbawden/Dropbox/STENCYL_DEVELOPMENT/stencylworks/engine-extensions/notifications/Notifications.hx:21: characters 51-69 : Unknown identifier : openfl
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833741000839   stencyl.sw.util.StreamGobbler   [openfl] /Users/markbawden/Dropbox/STENCYL_DEVELOPMENT/stencylworks/engine-extensions/notifications/Notifications.hx:20: characters 51-69 : Unknown identifier : openfl
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560833740000838   stencyl.sw.util.StreamGobbler   [openfl] /Users/markbawden/Dropbox/STENCYL_DEVELOPMENT/stencylworks/engine-extensions/notifications/Notifications.hx:19: characters 44-62 : Unknown identifier : openfl
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560832957000837   stencyl.sw.util.StreamGobbler   [openfl] haxe Build.hxml -D HXCPP_ARMV7 -cpp build/Release-iphoneos-v7
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560832956000836   stencyl.sw.util.StreamGobbler   [openfl] Haxe device build: Release-iphoneos-v7
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560832956000835   stencyl.sw.util.StreamGobbler   [openfl]     /Applications/Xcode.app/Contents/Developer/usr/bin/make
jar:file:/Applications/Stencyl-full/sw.jar!/res/logview4j/images/info.gif   false   INFO   1423560832956000834   stencyl.sw.util.StreamGobbler   [openfl]     export variant=normal


  • Posts: 43
how do i use this extension? tried to use it but had a error so im assuming it was wrong the way i did it.


  • Posts: 90
I made the extension compile fine.. but it never actually shows a notification.. does it work currently for anyone else?


  • Posts: 90
I think i got it to work.. in iOS 8 we need to ask the user for permission for alerts.

so i basically added:
Code: [Select]
UIUserNotificationType types = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
    UIUserNotificationSettings *mySettings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
    [[UIApplication sharedApplication] registerUserNotificationSettings:mySettings];

inside "scheduleLocalNotificationWithBody" and it worked

i uploaded the new extension, try it out and let me know if it works


  • Posts: 523
So does this work if the app isn't running in the background?

Also, is anyone working on the android side of this?


  • Posts: 364
So does this work if the app isn't running in the background?

Also, is anyone working on the android side of this?

Yes but there's a bug which makes the notification fire twice



  • Posts: 523
So does this work if the app isn't running in the background?

Also, is anyone working on the android side of this?

Yes but there's a bug which makes the notification fire twice.

Is anyone working on a solution?


  • Posts: 7
Please  are planning for making this extension for android too