Hi, we have setup my unity game with this
https://docs.microsoft.com/en-us/gaming/playfab/features/authentication/platform-specific-authentication/facebook-unity
and what we want to do, is
1) new user install game, register an account using facebook
2) close the game
3) open the game again, detect if playe has a registered facebook account, if yes, go to game scene.
----
On Android, our game will auto detect that player has a registered facebook account and go to game scene.
But iOS will just hang at the detection screen. Is there anything I am missing?
----
While troubleshooting, we also test another build that has post process in case it is not added via playfab.
It is also not working.
#if UNITY_IOS using System.Collections; using System.IO; using UnityEngine; using UnityEditor; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode; public class PostProcessor { [PostProcessBuild] public static void UpdateXcodePlist (BuildTarget buildTarget, string pathToBuiltProject) { if (buildTarget == BuildTarget.iOS) { // Get plist string plistPath = pathToBuiltProject + "/Info.plist"; PlistDocument plist = new PlistDocument(); plist.ReadFromString (File.ReadAllText (plistPath)); // Get root PlistElementDict rootDict = plist.root; // Change value of CFBundleVersion in Xcode plist var fbClientTokenKey = "FacebookClientToken"; var fbClientTokenValue = "d683c822667f49b6501ce93775c69419"; rootDict.SetString (fbClientTokenKey, fbClientTokenValue); // Write to file File.WriteAllText (plistPath, plist.WriteToString ()); } } // public static void UpdateXcodePlist } // public class PostProcessor #endif // Platform check
Is there anything we are missing? Do advise. Thanks!
,Hi, we have setup my unity game with this
https://docs.microsoft.com/en-us/gaming/playfab/features/authentication/platform-specific-authentication/facebook-unity
and what we want to do, is
1) new user install game, register an account using facebook
2) close the game
3) open the game again, detect if playe has a registered facebook account, if yes, go to game scene.
But this only works on Android. and not on iOS.
Our game will auto detect that player has a registered facebook account and go to game scene.
But iOS will just hand at the detection screen.
Is there anything I am missing?
While troubleshooting, we also test another build that has post process in case it is not added via playfab.
It is also not working.
#if UNITY_IOS using System.Collections; using System.IO; using UnityEngine; using UnityEditor; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode; public class PostProcessor { [PostProcessBuild] public static void UpdateXcodePlist (BuildTarget buildTarget, string pathToBuiltProject) { if (buildTarget == BuildTarget.iOS) { // Get plist string plistPath = pathToBuiltProject + "/Info.plist"; PlistDocument plist = new PlistDocument(); plist.ReadFromString (File.ReadAllText (plistPath)); // Get root PlistElementDict rootDict = plist.root; // Change value of CFBundleVersion in Xcode plist var fbClientTokenKey = "FacebookClientToken"; var fbClientTokenValue = "d683c822667f49b6501ce93775c69419"; rootDict.SetString (fbClientTokenKey, fbClientTokenValue); // Write to file File.WriteAllText (plistPath, plist.WriteToString ()); } } // public static void UpdateXcodePlist } // public class PostProcessor #endif // Platform check