swiftifttt

Opening IFTTT app from another app using URL scheme giving me error in swift 4


I need to open IFTTT app from one of my app on a button click. Here is the code I am using to open the IFTTT app:

let appURL = NSURL(string: "https://ifttt.com/")
self.openURL(url: appURL as! NSURL)

This code (code used to open app with URL scheme that usually opens up other apps successfully) opens up IFTTT app but app opens up a different page. It is not home page of IFTTT app. I want to open the app's home page.

Any Solution ? How can I open the IFTTT app home page?

Thanks!


Solution

  • Solved : The url need to be added the name of the App we want to open :

    let appURL = NSURL(string: "https://ifttt.com/connect/YOURAPPNAME")
    self.openURL(url: appURL as! NSURL)
    

    In this case YOUR APP should be live on App Store.