External URL Calls

If you want your app to be able to receive specially formatted URLs, you should register the corresponding URL schemes with the system. Apps often use custom URL schemes to vend services to other apps. For example, the Maps app supports URLs for displaying specific map locations.

In order to register URL schemes for your app. Follow the steps bellow

  1. Open IOS Native Editor Settings.  Stan's Assets -> IOS Native ->  Services
  2. Open App Delegate Service
  3. Add as many schemes as you want fro your app as shown on a screenshot below:

When the application isn't running.

Since IOS APP controllers (App Delegate) is started before Unity player, you need to check if an app was started via URL in your game / app initialization script. See the code snippet below:

namespace SA.iOS.UIKit 
...
string url = ISN_UIApplication.ApplicationDelegate.GetLaunchURL();
if(!string.IsNullOrEmpty(url)) {
    Debug.Log("App is launched via external url");
}

When the application in a background

You also need to subscribe to the OpenURL event. In case the external URL request will be received while your app is running.

namespace SA.iOS.UIKit 
...
ISN_UIApplication.ApplicationDelegate.OpenURL.AddListener((string url) => {
    Debug.Log("URL request received: " + url);
});