I don’t know this is a normal thing or not to ask, but I require your guys help on this topic.
In my app I want my user to tap on a notification and open a certain scene using the data of that FCM notification. I’ve already done this thing in Android but I’m unable to figure this out for iOS.
Here is the code for my android notification redirection:
#if UNITY_ANDROID
if (hasFocus)
{
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
AndroidJavaObject intent = currentActivity.Call<AndroidJavaObject>("getIntent");
string onClickScreen = intent.Call<string>("getStringExtra", "onClickScreen");
if (onClickScreen != null && onClickScreen.Trim().Length > 0)
{
redirectToAppropriateScreen(intent, onClickScreen);
}
intent.Call("removeExtra", "onClickScreen");
}
#endif