I\'m trying to build my first Cordova app and I can\'t get a plugin to work.
My app was built using the Cordova command line interface, so I\'ve added the Camera plu
If you still get this error when all files are in place, make sure the relevant source .m
files are actually target members of the project.
To do so, select the Plugin.m
file in Xcode and make sure that in the right inspector pane under Target Membership the checkbox for your project is checked.
I had this problem after removing and adding a plugin a few times.
Hint: the corresponding Plugin.h
file lacks syntax color highlighting for types declared in the CDVPlugin
classes when your plugin is not a project member (as observed in Xcode 5.0).
I had this problem as well when reinstalling the plugin but managed to solve it. If, like me, removing the platform is not an option because you'd loose too much work, here's a solution:
Step 1: Add CDVCamera.m to your Compile Sources (Under Build Phases)
Step 2: If your problem is the same as mine, you'll get Apple Match-o-Linker errors: add the frameworks OpenAL and ImageIO to your project.
Step 3: Rebuild and rejoice :)
Let me just say I would try Chris Rae's solution of resetting your platform even if you don't think that's your issue!
cordova platform rm ios
cordova platform add ios
Thanks Chris Rae for your solution! It worked great for me. I gathered it and other solutions to problems I had while adding WKWebview to my app and put them in a blog post.
http://blog.tylerbuchea.com/using-wkwebview-in-ios9-to-boost-ionic-cordova-performance/
I think I took another one of your solutions about the build settings. So, don't be mad/thanks a bunch!
If you don't have too much tied up in your Xcode project (which I didn't), the easiest way to resolve this is to do:
cordova platform remove ios
and then...
cordova platform add ios
Whatever it is that gets muddled up is resolved by doing that. You don't need to reinstall the plugins, they get installed when you re-add the platform.
I had the same problem with phonegap 3.6. By updating phonegap, the problem is solved.
npm update -g cordova
Obviously, one must have the desire to update phonegap :)
Ok so it seems you have to add all the plugins you want before you create the built. All the resources files are correctly located then.