External URL Calls

Before you can respond to the external URL calls, you need to register URL scheme for your app.

  1. Open IOS Native Editor Settings.  Stan's Assets -> IOS Native ->  Settings
  2. Open App Delegate Settings
  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.IOSNative.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.IOSNative.UIKit 
...
ISN_UIApplication.ApplicationDelegate.OpenURL.AddListener((string url) => {
    Debug.Log("URL request received: " + url);
});