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

霸气de小男生 提交于 2021-02-08 12:15:43

问题


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?


回答1:


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:

  • iOS Phone Links
  • Mail Links
  • Apple MapLinks

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.



来源:https://stackoverflow.com/questions/37769326/how-to-use-correct-ios-link-schema-for-launching-external-apps-form-meteor-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!