Local Notification build failing on iOS

Installed the local notification plugin (https://github.com/katzer/cordova-plugin-local-notifications) and it works great on Android. When I try to load up XCode and deploy to a simulator though, I get the following build error. Any thoughts on why? I tried reinstalling the plugin, adding and removing the ios platform, but no avail.

You might want to check out this tutorial I made for @saimon’s blog:

http://devdactic.com/local-notifications-ionic/

Might help you get past the iOS obstacle.

Regards,

Thanks @nicraboy. I tried running the instructions on your blog but no progress. I’m not using the ng-cordova plugin since it hasn’t been working for me, just using the Cordova plugin directly. It works perfectly for Android, but getting build errors in the XCode for iOS.

After reading your post, I tried:

  1. cordova plugin rm de.appplant.cordova.plugin.local-notification
  2. ionic platform rm ios
  3. ionic platform add ios
  4. cordova plugin add de.appplant.cordova.plugin.local-notification
  5. ionic build ios

On the ‘ionic build ios’ - I get the following error, which is reflected in the XCode screenshot above.

** BUILD FAILED **

> The following build commands failed:
> 	CompileC build/Masma.build/Debug-iphonesimulator/Masma.build/Objects-normal/i386/APPLocalNotification.o Masma/Plugins/de.appplant.cordova.plugin.local-notification/APPLocalNotification.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
> (1 failure)

I also tried with a brand new project and got the same build error. Could it be a problem with my XCode or iOS Simulator?

If you’re using the latest Xcode you should be fine. Maybe the plugin author broke the plugin in one of his more recent updates?

1 Like

Hmm I am using XCode 4.6 since I don’t have the latest OSX to upgrade to XCode 6. I’ll try again on another machine later tonight and report if it makes a difference. Thanks @nicraboy

Confirmed that it was an XCode problem, using the latest XCode removed the build errors @nicraboy

1 Like

Awesome, thanks for reporting back :slight_smile:

1 Like