WriteToFile() public method

public WriteToFile ( ) : void
return void
Esempio n. 1
0
        public static void UpdatePlist(string path)
        {
#if UNITY_IOS
            string appId    = FacebookSettings.AppId;
            string fullPath = Path.Combine(path, "Info.plist");
            if (string.IsNullOrEmpty(appId) || appId.Equals("0"))
            {
                Debug.LogError("You didn't specify a Facebook app ID.  Please add one using the Facebook menu in the main Unity editor.");
                return;
            }
            PListParser pListParser = new PListParser(fullPath);
            pListParser.UpdateFBSettings(appId, FacebookSettings.IosURLSuffix, FacebookSettings.AppLinkSchemes[FacebookSettings.SelectedAppIndex].Schemes);
            pListParser.UpdateInfolist();
            pListParser.WriteToFile();
#endif
        }
        public static void UpdatePlist(string path)
        {
            const string FileName = "Info.plist";
            string appId = FacebookSettings.AppId;
            string fullPath = Path.Combine(path, FileName);

            if (string.IsNullOrEmpty(appId) || appId.Equals("0"))
            {
                Debug.LogError("You didn't specify a Facebook app ID.  Please add one using the Facebook menu in the main Unity editor.");
                return;
            }

            var facebookParser = new PListParser(fullPath);
            facebookParser.UpdateFBSettings(
                appId,
                FacebookSettings.IosURLSuffix,
                FacebookSettings.AppLinkSchemes[FacebookSettings.SelectedAppIndex].Schemes);
            facebookParser.WriteToFile();
        }