skip to Main Content

I want to use deep-linking , for example consider my post url is http://myappsite/api/video/post_id , how can I implement deep-linking using this link. as facebook is doing with this url https://www.facebook.com/page_name/videos/post-id

3

Answers


  1. You need to implement universal links on website and app.

    You can also use Branch to help you integrating universal links / deep linking.

    Login or Signup to reply.
  2. You need link you mobile app and website by universal links and than you need parse url inside you ios code and open correct screen

    Login or Signup to reply.
  3. You have to implement Universal linking for acheaving this type of functionality. This would give you a good start .

    https://medium.com/@abhimuralidharan/universal-links-in-ios-79c4ee038272

    After that, when you click on the link, your application will open and following delegate function called in AppDelegate.

    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
        print("Continue User Activity called: ")
        if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
            let url = userActivity.webpageURL!
            print(url.absoluteString)
            //handle url and open whatever page you want to open.
        }
        return true
    }
    

    The url.absolutelyString return the url string on which you tapped. Chop out your video_id and open the appropriate ViewController.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search