Asif Alamgir
Asif Alamgir

Reputation: 1462

angularjs cordova application using cordova plugin

I am trying to work with angularjs and cordova application and I need to use cordova plugin such as map and geolocation. I saw ngCordova but that does not offer map plugin. For testing purpose i tried to add geolocation plugin but it is not building ios app at all

clang: error: no such file or directory: '/Users/asifalamgir/Documents/hungryHaven/hungryHavenApp/platforms/ios/hungryHaven/Plugins/org.apache.cordova.geolocation/CDVLocation.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

** BUILD FAILED **


The following build commands failed:
    CompileC build/hungryHaven.build/Debug-iphonesimulator/hungryHaven.build/Objects-normal/i386/CDVLocation.o hungryHaven/Plugins/org.apache.cordova.geolocation/CDVLocation.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: /Users/asifalamgir/Documents/hungryHaven/hungryHavenApp/platforms/ios/cordova/build: 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:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

Thank you

Upvotes: 2

Views: 989

Answers (2)

Arun Gopalpuri
Arun Gopalpuri

Reputation: 2493

The way I was able to resolve it was :

  1. Deleting the platforms ios folder/directory.
  2. Adding the geolocation plugin (cordova plugin add org.apache.cordova.geolocation)
  3. Adding back ios platform (ionic platform add ios).

Upvotes: 0

Miquel
Miquel

Reputation: 8989

Possible reasons can be:

There has been an error installing the plugin. You can try reinstalling it:

cordova plugin rm org.apache.cordova.geolocation
cordova plugin add org.apache.cordova.geolocation

Also (not most probably but could be) try with preparing the app again:

cordova prepare ios

Or even sometimes you can try removing the whole ios app and adding it again:

cordova platform rm ios
cordova platform add ios

Upvotes: 7

Related Questions