dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

ReferenceError: Can't find variable: launchnavigator #104

Closed gblock0 closed 8 years ago

gblock0 commented 8 years ago

I've looked at the other issues surround this and it seems like I have everything setup, but I am still getting the errror: ReferenceError: Can't find variable: launchnavigator.

Platform: iOS 10.1 Device: iPhone 7 Plus Cordova Platform Version: ios 4.2.1 Building locally with Cordova-CLI OSX: 10.11.6

I installed the plugin using the cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator command.

My plugins and platforms/ios/platform_www/plugins/ folders do contain the uk.co.workingedge.phonegap.plugin.launchnavigator folder. When I open up Xcode, the 2 .m and 2 .h files are there.

The launchnavigator.js is not in my Scripts folder when I use the Safari Debugger.

I got it to open Waze by doing window.open('waze://...', '_system') and using maps://....

Is there something I haven't tried?

dpa99c commented 8 years ago

Make sure you wait for the deviceready event to be fired before attempting to invoke the plugin since Cordova loads plugins dynamically at runtime.

Also, try building and running one of sample apps in the example project and use these as a working reference to track down your issue.

gblock0 commented 8 years ago

Because of how we structure our app, I didn't realize that I needed to manually copy across the .js file. It works now. Thanks!