protected virtual void PreprocessPlayerSettings() { tvOSProductInfo info = PlatformUtil.GetSettings <tvOSProductInfo>(); #if !SAGO_BUILD_DO_NOT_USE_VERSION_SERVICE if (!VersionService.Bump(info)) { Debug.LogWarning("Could not bump build number.", info); switch (this.BuildType) { case tvOSBuildType.Simulator: case tvOSBuildType.Device: Debug.LogWarning("Could not bump build number"); break; default: throw new System.InvalidOperationException("Could not bump build number"); } } #endif PlayerSettings.productName = info.DisplayName; PlayerSettings.bundleIdentifier = info.Identifier; PlayerSettings.bundleVersion = this.BundleVersion; if (string.IsNullOrEmpty(info.UrlScheme)) { throw new System.Exception("UrlScheme property is missing from tvOS platform prefab"); } // short bundle version // the short bundle version property was added in Unity 4.6.3, so // set it via reflection to play nice with older versions of Unity. PropertyInfo shortBundleVersion = typeof(PlayerSettings).GetProperty( "shortBundleVersion", BindingFlags.Public | BindingFlags.Static ); if (shortBundleVersion != null) { shortBundleVersion.SetValue(null, this.BundleShortVersion, null); } }
/// <summary> /// Updates the info plist. /// </summary> protected virtual void PostprocessXcodePlist() { // read plist Dictionary <string, object> dict; dict = ReadPlist(); // cleanup plist dict.Remove("CFBundleIconFiles"); // update plist dict["UIPrerenderedIcon"] = true; dict["CFBundleAllowMixedLocalizations"] = true; tvOSProductInfo productInfo = PlatformUtil.GetSettings <tvOSProductInfo>(SagoPlatform.PlatformUtil.ActivePlatform); object urlScheme = productInfo.UrlScheme; dict["CFBundleURLTypes"] = new List <object> { new Dictionary <string, object> { { "CFBundleURLName", PlayerSettings.iPhoneBundleIdentifier }, { "CFBundleURLSchemes", new List <object> { urlScheme } } } }; dict["LSApplicationQueriesSchemes"] = SagoBuildEditor.iOS.iOSLSApplicationQueriesSchemes.Schemes; dict["CFBundleShortVersionString"] = this.BundleShortVersion; dict["CFBundleVersion"] = this.BundleVersion; dict["UILaunchStoryboardName"] = "LaunchScreen"; // Inform App Store submission/Testflight that we do not use any non-standard encryption. dict["ITSAppUsesNonExemptEncryption"] = false; // write plist WritePlist(dict); }