asax asax - 5 months ago 25
iOS Question

How to use correct iOS link schema for launching external apps form Meteor app?

I am creating an app using Meteor Framework.

I have a contact us section and there is Address, Phone and a Email address.

I built/compiled the app into both Android and iPhone. But when click on Address or Phone or Email it does not take me to the default maps or call the number or open mail software. However it does in Android Device. When I finger tap on address it opens google map app or if I tap on phone then it calls the number respectively...

How do I link to the native iOS functions?

Answer

My guess is that your links are what iPhone can recognise and handle in a built-in or 3rd party app.

Check following documentation for built-in iOS apps:

If you prefer using Google Maps check Google Maps URL Scheme for iOS

or for Waze: Launching Waze iOS client with parameters

etc.

Also make sure your mobile-config.js includes appropriate App.acessRule permissions.

App.accessRule('https://www.google.si/maps/*', {launchExternal:true});

// needed for navigation on iOS:
App.accessRule('https://*.google.com/*', {launchExternal:true});
App.accessRule('https://*.googleapis.com/*', {launchExternal:true});
App.accessRule('https://*.gstatic.com/*', {launchExternal:true});

// needed for Apple Maps
App.accessRule('http://maps.apple.com/*', {launchExternal:true});

Hope this helps.

If not, please provide examples of links used on your buttons. Or detail if you are using any specific Cordova plugin used in your Meteor app.