ionic-team / ng-cordova

OBSOLETE: Please move to Ionic Native https://github.com/ionic-team/ionic-native
https://github.com/ionic-team/ionic-native
MIT License
3.48k stars 1.05k forks source link

Fresh Ionic & Local Notification wont emulate on IOS #275

Closed dularion closed 10 years ago

dularion commented 10 years ago

Hi there! I got a problem with Local Notifications & ios emulation. I will split it up into phases.

PHASE 1: I did the following in my console:

npm install -g cordova ionic
ionic start myApp sidemenu
cd myApp
ionic platform add ios
ionic build ios

And then

ionic emulate ios

Which works fine.

PHASE 2: Then I add cordova

bower install ngCordova

And add it to my angular app and in the index.html

Then i run again:

ionic emulate ios

Which works fine.

PHASE 3: I then run

cordova plugin add de.appplant.cordova.plugin.local-notification   

And it installs fine. And then i try emulating again, but it fails .

the error is this:

2014-09-08 13:47:08.623 xcodebuild[86897:2403]  DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-5069/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:76
Details:  Failed to load dependencies output contents from ``/Users/antonia/dev/projects/myApp/platforms/ios/build/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/i386/APPLocalNotification.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “APPLocalNotification.d” couldn’t be opened because there is no such file." UserInfo=0x7fbc3fb2a9e0 {NSFilePath=/Users/antonia/dev/projects/myApp/platforms/ios/build/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/i386/APPLocalNotification.d, NSUnderlyingError=0x7fbc3fb2a9b0 "The operation couldn’t be completed. No such file or directory"}. User info: {
NSFilePath = "/Users/antonia/dev/projects/myApp/platforms/ios/build/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/i386/APPLocalNotification.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong))

Thread:   <NSThread: 0x7fbc3fb29f70>{name = (null), num = 9}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

** BUILD FAILED **

The following build commands failed:

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

Error: projects/myApp/platforms/ios/cordova/run: Command failed with exit code 65

at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)

I hope someone here can help me out! this problem is kind of strange, since it all seems like such a clean setup, so it should work imho.

Thanks in advance!

pbernasconi commented 10 years ago

@dularion Your problem lies with adding the plugin to cordova. Since your error message indicates that the plugin files are missing when you compile and run your application, you may want to rebuild your app completely:

cordova platform rm ios
cordova platform add ios
cordova build ios
cordova emulate ios

I'm also going to close this issue because it does not pertain to ng-cordova directly. Perhaps create an issue at the creator of the plugin.