How could i detect the url on app side after installing the app?

I will send this url to end user, though email or text to install my app. After first time install I want to know the code value and the domain address from that URL.

https://apps.apple.com/{countrySortCode}/app/{appName}/id{APPID}?code={codeNumber}&domain={domainName}

I have tried using:

func scene(_ scene: UIScene, continue userActivity:NSUserActivity) {

  }

I have also tried using this:

   private func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
   // Take decision according to URL
    return true
  }

No luck. Any ideas. How could i will get that url Information after first time installed?

You can't. You need a universal link on your own server which has this information and, if installed, opens your app. Information on universal links can be found here: https://developer.apple.com/ios/universal-links/

How could i detect the url on app side after installing the app?
 
 
Q