Open Links in New Browser Requires Cordova-Plugin-Device

I’m trying to make links in my app open in a new browser (running on ios).
I’m using the coffeescript from here which is supposed to do this:

but it requires “device.platform” from cordova.
I have tried to add this plugin but get the error below.

If anyone know a better way to make links open in browser, or what I need to do to get this coffee script to work, I’d much much obliged.

Best, -Duncan.

Duncans-MBP-2:MyLC.ios Duncan$ meteor add cordova:cordova-plugin-device@
Added Cordova plugin
Duncans-MBP-2:MyLC.ios Duncan$ meteor run ios-device --mobile-server XXX:3000
[[[[[ ~/METEOR/MyLC.ios ]]]]]

=> Started proxy.
=> Started MongoDB.

WARNING: You are testing your app on a remote device. For the mobile app to be able to connect to the local server,
make sure your device is on the same network, and that the network configuration allows clients to talk to
each other (no client isolation).

Your project has been opened in Xcode so that you can run your app on an iOS device. For further instructions, visit
this wiki page:

=> Started app on iOS Device.
W20160325-16:36:32.877(0)? (STDERR)
W20160325-16:36:32.878(0)? (STDERR) /Users/Duncan/.meteor/packages/meteor-tool/.1.1.10.f0xwxk++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20160325-16:36:32.879(0)? (STDERR) throw(ex);
W20160325-16:36:32.879(0)? (STDERR) ^
W20160325-16:36:32.879(0)? (STDERR) ReferenceError: device is not defined
W20160325-16:36:32.879(0)? (STDERR) at
W20160325-16:36:32.880(0)? (STDERR) at /Users/Duncan/METEOR/MyLC.ios/.meteor/local/build/programs/server/boot.js:249:5
=> Exited with code: 8

This is the solution that’s still working for me:

1 Like

did you use version 0.5.4 of the inappbrowser?

@julianmwagner Not sure that’s addressed to me, but I was at the time, yes. I’m now on 1.3.0.

It was, but I found my problem was that i did not include type : ‘navigation’ in the App Access Rules