1

I'm trying to open my Application from a SMS like when I receive an address and when i tap on it, open Plans. I receive also a SMS from server with this : a.doctolib.fr/hnFZ8k5sr who opens directly the application Doctolib. Is somebody knows how to do that? I saw the answer : Opening app from sms and getting the sms contents in iOS but when i look at my sms, it's ok, that's run... thanks by advance!

Opening app from sms and getting the sms contents in iOS

PierreIOSD
  • 11
  • 1

2 Answers2

0

You should be searching on how to open to your app from SMS using url scheme.

These links can help you:

Marina Aguilar
  • 1,151
  • 9
  • 26
0

You can use Universal link, If the app is installed, app will be opened otherwise will continue to the browser.

Steps to support universal links-

  1. Create your apple-app-site-association file(Suppose your universal link is www.abc.com/getapp and you want to redirect in your app from here).

    {
     "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "9JA89QQLNQ.com.apple.wwdc", //9JA89QQLNQ is your team ID & com.apple.wwdc is your bundle id
                "paths": [ "/getapp"]
            }
        ]
      }
    }
    
  2. Upload this file to the root directory of there server where www.abc.com is hosted(from where you need to redirect to your installed app).

e.g- Suppose you have to redirect from www.abc.com/getapp then you need to upload the apple-app-site-association file to the root directory where the www.abc.com is get hosted.

  1. Validate at http://branch.io/resources/aasa-validator/. If the file is valid then all checks would be green.

  2. Now prepare your app to support universal links-

    a. Go to developer.apple.com and enable Associated Domains to your app ID.

    b. Select your target and turn on Associated Domains switch.

    c. Add applinks:abc.com. enter image description here

    d. Add application:continueUserActivity:restorationHandler: app delegate method so that your app can receive a link and handle it appropriately.

Not getting callback to the app-

1.When a user is browsing your website in Safari and they tap a universal link to a URL in the same domain as the current webpage, iOS respects the user’s most likely intent and opens the link in Safari. enter image description here

2.Copy and paste your universal link(http(s)://www.abc.com/getapp) to notes and tap on it. It your app can handle this link you will get the option Open in "AppName".

References-

  1. https://gist.github.com/anhar/6d50c023f442fb2437e1
  2. https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html

Hope it may help.

Pooja Gupta
  • 785
  • 10
  • 22
  • Please check and if this solution works for you then accept the answer. Or if you face any difficulty, feel free to ask. – Pooja Gupta Nov 08 '19 at 08:41