Kaynağa Gözat

添加IpadOS 上架设置

slambb 7 ay önce
ebeveyn
işleme
764e81e0e3

+ 2 - 1
Assets/BowArrow/Scripts/CommonConfig.cs

@@ -16,7 +16,7 @@ public class CommonConfig
             //Application.identifier.Contains("com.xmjssvr.BowArrow.mi")
             //int index = Application.identifier == "com.xmjssvr.BowArrow" ? 0 : 1; // Array.IndexOf(AppNames, Application.productName);
 #if UNITY_IOS
-            int index = Application.identifier == "com.xmjssvr.BowArrow" ? 0 : 1;//海外版 com.xmjssvr.BowArrowEn
+            int index = Application.identifier == "com.xmjssvr.BowArrow" || Application.identifier == "com.xmjssvr.PadBowArrow" ? 0 : 1;//海外版 com.xmjssvr.BowArrowEn
 #endif
 #if UNITY_ANDROID
             int index = 0;
@@ -39,6 +39,7 @@ public class CommonConfig
     }
     //根据产品名决定默认语言
     public static int AppLanguage { get => AppArea; }
+
     //禁止语言切换(ios安全上架)
     // public static bool banLanguageChangeSwitch { get => Application.platform ==  RuntimePlatform.IPhonePlayer; }
     public static bool banLanguageChangeSwitch { get => false; }

+ 84 - 52
Assets/BowArrow/Scripts/Editor/MenuChangeAppLanguage.cs

@@ -1,85 +1,117 @@
 using UnityEditor;
 using UnityEngine;
 
-//在编辑菜单中增加功能-APP语言版本切换
 public class MenuChangeAppLanguage
 {
+    enum LanguageType { CN = 0, EN = 1 }
+    enum DeviceType { iPhone, iPad }
+
     static void RefreshMenuChecked()
     {
-        Menu.SetChecked("APP语言版本切换/中文", CommonConfig.AppLanguage == 0);
-        Menu.SetChecked("APP语言版本切换/英文", CommonConfig.AppLanguage == 1);
+        int lang = CommonConfig.AppLanguage; //EditorPrefs.GetInt("AppLanguage", 0);
+        string iosTarget = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.iOS);
+
+        Menu.SetChecked("APP语言版本切换/中文/iPhone", lang == 0 && iosTarget.Contains("BowArrow") && !iosTarget.Contains("Pad"));
+        Menu.SetChecked("APP语言版本切换/中文/iPad", lang == 0 && iosTarget.Contains("PadBowArrow"));
+        Menu.SetChecked("APP语言版本切换/英文/iPhone", lang == 1 && iosTarget.Contains("BowArrowEn") && !iosTarget.Contains("Pad"));
+        Menu.SetChecked("APP语言版本切换/英文/iPad", lang == 1 && iosTarget.Contains("PadBowArrowEn"));
     }
 
-    [MenuItem("APP语言版本切换/中文")]
-    static void ToCN() 
+    [MenuItem("APP语言版本切换/中文/iPhone")]
+    static void CN_iPhone() => ApplySetting(LanguageType.CN, DeviceType.iPhone);
+    [MenuItem("APP语言版本切换/中文/iPhone", true)]
+    static bool CN_iPhone_Validate() { RefreshMenuChecked(); return true; }
+
+    [MenuItem("APP语言版本切换/中文/iPad")]
+    static void CN_iPad() => ApplySetting(LanguageType.CN, DeviceType.iPad);
+    [MenuItem("APP语言版本切换/中文/iPad", true)]
+    static bool CN_iPad_Validate() { RefreshMenuChecked(); return true; }
+
+    [MenuItem("APP语言版本切换/英文/iPhone")]
+    static void EN_iPhone() => ApplySetting(LanguageType.EN, DeviceType.iPhone);
+    [MenuItem("APP语言版本切换/英文/iPhone", true)]
+    static bool EN_iPhone_Validate() { RefreshMenuChecked(); return true; }
+
+    [MenuItem("APP语言版本切换/英文/iPad")]
+    static void EN_iPad() => ApplySetting(LanguageType.EN, DeviceType.iPad);
+    [MenuItem("APP语言版本切换/英文/iPad", true)]
+    static bool EN_iPad_Validate() { RefreshMenuChecked(); return true; }
+
+    static void ApplySetting(LanguageType lang, DeviceType device)
     {
-        PlayerSettings.productName = CommonConfig.StandaloneModeOrPlatformB ? CommonConfig.AppNames[2]: CommonConfig.AppNames[0];
+        int langId = (int)lang;
+       // EditorPrefs.SetInt("AppLanguage", langId);
+
+        PlayerSettings.productName = CommonConfig.StandaloneModeOrPlatformB
+            ? CommonConfig.AppNames[2]
+            : CommonConfig.AppNames[langId];
+
 #if UNITY_IOS
-        PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, "com.xmjssvr.BowArrow");
+        string bundleId = lang switch
+        {
+            LanguageType.CN => device == DeviceType.iPhone ? "com.xmjssvr.BowArrow" : "com.xmjssvr.PadBowArrow",
+            LanguageType.EN => device == DeviceType.iPhone ? "com.xmjssvr.BowArrowEn" : "com.xmjssvr.PadBowArrowEn",
+            _ => "com.xmjssvr.BowArrow"
+        };
+
+        PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, bundleId);
+        PlayerSettings.iOS.targetDevice = device == DeviceType.iPhone ? iOSTargetDevice.iPhoneOnly : iOSTargetDevice.iPadOnly;
         PlayerSettings.iOS.appleDeveloperTeamID = "WR7WD35237";
         PlayerSettings.iOS.appleEnableAutomaticSigning = true;
 #endif
+
 #if UNITY_ANDROID
-        if (CommonConfig.StandaloneModeOrPlatformB)
+        string androidId = lang switch
         {
+            LanguageType.CN => CommonConfig.StandaloneModeOrPlatformB
+                ? "com.xmjssvr.BowArrow.miBClient"
+                : "com.xmjssvr.BowArrow.mi",
 
-            PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xmjssvr.BowArrow.miBClient"); //com.xmjssvr.BowArrow
-        }
-        else {
+            LanguageType.EN => CommonConfig.StandaloneModeOrPlatformB
+                ? "com.xmjssvr.BowArrowEn.BClient"
+                : "com.xmjssvr.BowArrowEn",
 
-            PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xmjssvr.BowArrow.mi"); //com.xmjssvr.BowArrow
-        }
+            _ => "com.xmjssvr.BowArrow"
+        };
+
+        PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, androidId);
 #endif
-        SetIosAppIcon(0);
-    }
 
-    [MenuItem("APP语言版本切换/中文", true)]
-    static bool ToCN_Check() 
-    {
-        RefreshMenuChecked();
-        return true;
+        SetIosAppIcon(langId, device);
     }
 
-    [MenuItem("APP语言版本切换/英文")]
-    static void ToEN() 
+    static void SetIosAppIcon(int langId, DeviceType device)
     {
-        //PlayerSettings.productName = CommonConfig.AppNames[1];
-        PlayerSettings.productName = CommonConfig.StandaloneModeOrPlatformB ? CommonConfig.AppNames[2] : CommonConfig.AppNames[1];
-#if UNITY_IOS
-        PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, "com.xmjssvr.BowArrowEn");
-        PlayerSettings.iOS.appleDeveloperTeamID = "WR7WD35237";
-        PlayerSettings.iOS.appleEnableAutomaticSigning = true;
-#endif
-#if UNITY_ANDROID
-        if (CommonConfig.StandaloneModeOrPlatformB)
+        //string path = langId == 1
+        //    ? "Assets/BowArrow/Textures/Common/AppIconEN.png"
+        //    : "Assets/BowArrow/Textures/Common/AppIcon2.png";
+        string path;
+
+        if (device == DeviceType.iPad)
         {
-            PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xmjssvr.BowArrowEn.BClient"); //com.xmjssvr.BowArrow
+            // iPad版,选用 Pad 专用图标
+            path = langId == 1
+                ? "Assets/BowArrow/Textures/Common/AppIconPadEN.png"
+                : "Assets/BowArrow/Textures/Common/AppIconPad.png";
         }
         else
         {
-            PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xmjssvr.BowArrowEn");//com.xmjssvr.BowArrow.mi
+            // 普通版
+            path = langId == 1
+                ? "Assets/BowArrow/Textures/Common/AppIconEN.png"
+                : "Assets/BowArrow/Textures/Common/AppIcon2.png";
         }
-#endif
-        SetIosAppIcon(1);
-    }
-
-    [MenuItem("APP语言版本切换/英文", true)]
-    static bool ToEN_Check() 
-    {
-        RefreshMenuChecked();
-        return true;
-    }
 
-    static void SetIosAppIcon(int id)
-    {
-        string path = "Assets/BowArrow/Textures/Common/AppIcon2.png";
-        if (id == 1) {
-            path = "Assets/BowArrow/Textures/Common/AppIconEN.png";
+        Texture2D texture = AssetDatabase.LoadAssetAtPath<Texture2D>(path);
+        if (texture == null)
+        {
+            Debug.LogWarning("图标文件未找到:" + path);
+            return;
         }
-        Texture2D texture = AssetDatabase.LoadAssetAtPath(path, typeof(Texture2D)) as Texture2D;
-        Texture2D[] textureArray = PlayerSettings.GetIconsForTargetGroup(BuildTargetGroup.Unknown);
-        for (int i = 0; i < textureArray.Length; i++) textureArray[i] = texture;
-        PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.Unknown, textureArray);
+
+        Texture2D[] icons = PlayerSettings.GetIconsForTargetGroup(BuildTargetGroup.Unknown);
+        for (int i = 0; i < icons.Length; i++) icons[i] = texture;
+        PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.Unknown, icons);
         AssetDatabase.SaveAssets();
     }
 }

+ 29 - 19
Assets/BowArrow/Scripts/View/Home/HomeView.cs

@@ -150,13 +150,16 @@ public class HomeView : JCUnityLib.ViewBase
         if (CommonConfig.StandaloneMode) return false;
         if (SceneManager.GetActiveScene().name.Equals("HeartRateBand")) return false;
         if (PlayerPrefs.GetInt("Location-Prominent", 0) == 0) {
-            ModalView m = ModalView.Show();
+            //ModalView m = ModalView.Show();
+            ModalConfirmView m = ModalConfirmView.Show();
             string pName = Application.productName;
             m.textKey = "Model_Location-Prominent";
-            m.onAgreeTextKey = "common_next";
-            m.onRejectTextKey = "common_cancel";
+            //m.onAgreeTextKey = "common_next";
+            m.onConfirmTextKey = "common_next";
+            //m.onRejectTextKey = "common_cancel";
             m.textFormatArgs = new object[] {pName};
-            m.onAgree = () => {
+            //m.onAgree = () => {
+            m.onConfirm = () => { 
                 PlayerPrefs.SetInt("Location-Prominent", 1);
                 try { 
                     onAgree?.Invoke(); 
@@ -175,13 +178,20 @@ public class HomeView : JCUnityLib.ViewBase
         if (SceneManager.GetActiveScene().name.Equals("HeartRateBand")) return false;
         if (PlayerPrefs.GetInt("Location-Prominent", 0) == 0)
         {
-            ModalView m = ModalView.Show();
+            //ModalView m = ModalView.Show();
+            //string pName = Application.productName;
+            //m.textKey = "Model_Location-Prominent";
+            //m.onAgreeTextKey = "common_next";
+            //m.onRejectTextKey = "common_cancel";
+            //m.textFormatArgs = new object[] { pName };
+
+            ModalConfirmView m = ModalConfirmView.Show();
             string pName = Application.productName;
             m.textKey = "Model_Location-Prominent";
-            m.onAgreeTextKey = "common_next";
-            m.onRejectTextKey = "common_cancel";
+            m.onConfirmTextKey = "common_next";
             m.textFormatArgs = new object[] { pName };
-            m.onAgree = () => {
+            //m.onAgree = () => {
+            m.onConfirm = () => {
                 PlayerPrefs.SetInt("Location-Prominent", 1);
                 try
                 {
@@ -192,17 +202,17 @@ public class HomeView : JCUnityLib.ViewBase
                     Debug.LogError(e.Message + "\n" + e.StackTrace);
                 }
             };
-            m.onReject = () =>
-            {
-                try
-                {
-                    onReject?.Invoke();
-                }
-                catch (System.Exception e)
-                {
-                    Debug.LogError(e.Message + "\n" + e.StackTrace);
-                }
-            };
+            //m.onReject = () =>
+            //{
+            //    try
+            //    {
+            //        onReject?.Invoke();
+            //    }
+            //    catch (System.Exception e)
+            //    {
+            //        Debug.LogError(e.Message + "\n" + e.StackTrace);
+            //    }
+            //};
             return true;
         }
         return false;

BIN
Assets/BowArrow/Textures/AppIconPad.png


+ 135 - 0
Assets/BowArrow/Textures/AppIconPad.png.meta

@@ -0,0 +1,135 @@
+fileFormatVersion: 2
+guid: 3f2a5378b02112b47bbd30673a5c5bdb
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 12
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMasterTextureLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 0
+    wrapV: 0
+    wrapW: 0
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/BowArrow/Textures/AppIconPadEN.png


+ 135 - 0
Assets/BowArrow/Textures/AppIconPadEN.png.meta

@@ -0,0 +1,135 @@
+fileFormatVersion: 2
+guid: 7322418ad61f1b04d97c33fc0bd45d90
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 12
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMasterTextureLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 0
+    wrapV: 0
+    wrapW: 0
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/BowArrow/Textures/Common/AppIconPad.png


+ 135 - 0
Assets/BowArrow/Textures/Common/AppIconPad.png.meta

@@ -0,0 +1,135 @@
+fileFormatVersion: 2
+guid: 63732bd42b4454449b8cfb439fe08f27
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 12
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMasterTextureLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 0
+    wrapV: 0
+    wrapW: 0
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/BowArrow/Textures/Common/AppIconPadEN.png


+ 135 - 0
Assets/BowArrow/Textures/Common/AppIconPadEN.png.meta

@@ -0,0 +1,135 @@
+fileFormatVersion: 2
+guid: a4b7ede0a933f4440bda406386f77c26
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 12
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMasterTextureLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 0
+    wrapV: 0
+    wrapW: 0
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 89 - 8
Assets/Plugins/iOS/Editor/XCodePostProcessBuild.cs

@@ -33,10 +33,26 @@ public static class XCodePostProcessBuild
         }
         string projectPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
         SetFrameworksAndBuildSettings(projectPath);
-        SetInfoList(path, "com.xmjssvr.BowArrow", "wxfe29f3f64e3c5d16");
+        //SetInfoList(path, "com.xmjssvr.BowArrow", "wxfe29f3f64e3c5d16");
+        // 根据当前包名 ApplicationIdentifier 决定调用哪个参数
+        string applicationIdentifier = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.iOS);
+
+        if (applicationIdentifier.Contains("PadBowArrow"))
+        {
+            // iPad版
+            SetInfoList(path, "com.xmjssvr.PadBowArrow", "wx9999999999999999");  // 这里填写 iPad 版的 wx id
+        }
+        else
+        {
+            // 默认普通版
+            SetInfoList(path, "com.xmjssvr.BowArrow", "wxfe29f3f64e3c5d16");
+        }
         SetAssociatedDomains(projectPath, "xmjssvr.cn");
         setSignInWithApple(projectPath);
 
+        // 这里新增你的两个方法调用添加国际化
+        AddLocalizedPermissionDescriptions(path);
+        AddLocalizedResourcesToXcode(path);
 
     }
 
@@ -90,13 +106,13 @@ public static class XCodePostProcessBuild
         wxArray.AddString("weixinULAPI");
         wxArray.AddString("weixinURLParamsAPI");
 
-        PlistElementDict ed = plist.root;
-        ed.SetString("NSBluetoothAlwaysUsageDescription", "您是否允此App使用蓝牙,来搜索和连接设备?");
-        ed.SetString("NSBluetoothPeripheralUsageDescription", "您是否允此App使用蓝牙,来搜索和连接设备?");
-        ed.SetString("NSCameraUsageDescription", "App需要您的同意,才能访问照相机");
-        ed.SetString("NSPhotoLibraryUsageDescription", "App需要您的同意,才能访问相册");
-        ed.SetString("NSLocationWhenInUseUsageDescription", "我们需要通过您的地理位置信息获取您周边的相关数据");
-        ed.SetString("NSLocationAlwaysUsageDescription", "我们需要通过您的地理位置信息获取您周边的相关数据");
+        //PlistElementDict ed = plist.root;
+        //ed.SetString("NSBluetoothAlwaysUsageDescription", "您是否允此App使用蓝牙,来搜索和连接设备?");
+        //ed.SetString("NSBluetoothPeripheralUsageDescription", "您是否允此App使用蓝牙,来搜索和连接设备?");
+        //ed.SetString("NSCameraUsageDescription", "App需要您的同意,才能访问照相机");
+        //ed.SetString("NSPhotoLibraryUsageDescription", "App需要您的同意,才能访问相册");
+        //ed.SetString("NSLocationWhenInUseUsageDescription", "我们需要通过您的地理位置信息获取您周边的相关数据");
+        //ed.SetString("NSLocationAlwaysUsageDescription", "我们需要通过您的地理位置信息获取您周边的相关数据");
 
 
         File.WriteAllText(listPath, plist.WriteToString());
@@ -133,5 +149,70 @@ public static class XCodePostProcessBuild
 
 
     }
+
+    public static void AddLocalizedPermissionDescriptions(string path)
+    {
+        string localizedFolderPath = Path.Combine(path, "LocalizedInfoPlist");
+        if (!Directory.Exists(localizedFolderPath))
+            Directory.CreateDirectory(localizedFolderPath);
+
+        // 中文 (简体) zh-Hans.lproj
+        string zhHansPath = Path.Combine(localizedFolderPath, "zh-Hans.lproj");
+        if (!Directory.Exists(zhHansPath))
+            Directory.CreateDirectory(zhHansPath);
+
+        File.WriteAllText(Path.Combine(zhHansPath, "InfoPlist.strings"),
+            "\"NSCameraUsageDescription\" = \"应用需要您的授权,以访问相机功能。\";\n" +
+            "\"NSPhotoLibraryUsageDescription\" = \"应用需要您的授权,以访问您的照片库。\";\n" +
+            "\"NSBluetoothAlwaysUsageDescription\" = \"请允许应用使用蓝牙,以搜索并连接附近的设备。\";\n" +
+            "\"NSBluetoothPeripheralUsageDescription\" = \"请允许应用使用蓝牙,以搜索并连接附近的设备。\";\n" +
+            "\"NSLocationWhenInUseUsageDescription\" = \"应用需要在使用期间访问您的位置信息,用于确定排行榜归属区域,并在蓝牙连接时搜索附近设备。例如,我们会根据您的当前位置将您的成绩归入对应地区的排行榜,并帮助您发现和连接周边蓝牙设备。\";\n" +
+            "\"NSLocationAlwaysUsageDescription\" = \"应用需要持续访问您的位置信息,用于确定排行榜归属区域,并在后台运行时搜索附近设备。例如,我们会根据您的当前位置将您的成绩归入对应地区的排行榜,并帮助您发现和连接周边蓝牙设备。\";\n"
+        );
+
+
+        // 英文 en.lproj
+        string enPath = Path.Combine(localizedFolderPath, "en.lproj");
+        if (!Directory.Exists(enPath))
+            Directory.CreateDirectory(enPath);
+
+        File.WriteAllText(Path.Combine(enPath, "InfoPlist.strings"),
+            "\"NSCameraUsageDescription\" = \"The app requires your permission to access the camera.\";\n" +
+            "\"NSPhotoLibraryUsageDescription\" = \"The app requires your permission to access your photo library.\";\n" +
+            "\"NSBluetoothAlwaysUsageDescription\" = \"Allow this app to use Bluetooth to search for and connect to devices.\";\n" +
+            "\"NSBluetoothPeripheralUsageDescription\" = \"Allow this app to use Bluetooth to search for and connect to devices.\";\n" +
+            "\"NSLocationWhenInUseUsageDescription\" = \"The app requires your location to determine your region for leaderboard assignment and to discover nearby devices during Bluetooth connections. For example, your achievements will be placed on the leaderboard of your current region, and the app will help you find and connect to nearby Bluetooth devices.\";\n" +
+            "\"NSLocationAlwaysUsageDescription\" = \"The app requires continuous access to your location to determine your region for leaderboard assignment and to discover nearby devices even when running in the background. For example, your achievements will be placed on the leaderboard of your current region, and the app will help you find and connect to nearby Bluetooth devices.\";\n"
+        );
+
+    }
+
+    public static void AddLocalizedResourcesToXcode(string path)
+    {
+        string projPath = PBXProject.GetPBXProjectPath(path);
+        PBXProject proj = new PBXProject();
+        proj.ReadFromString(File.ReadAllText(projPath));
+
+        string targetGuid = proj.GetUnityMainTargetGuid();
+
+        string localizedFolderPath = Path.Combine(path, "LocalizedInfoPlist");
+        if (Directory.Exists(localizedFolderPath))
+        {
+            foreach (var dir in Directory.GetDirectories(localizedFolderPath))
+            {
+                string relativePath = "LocalizedInfoPlist/" + Path.GetFileName(dir);
+                proj.AddFolderReference(relativePath, relativePath);
+
+                string stringsFile = Path.Combine(relativePath, "InfoPlist.strings");
+                if (File.Exists(Path.Combine(path, stringsFile)))
+                {
+                    proj.AddFileToBuild(targetGuid, proj.AddFile(stringsFile, stringsFile));
+                }
+            }
+        }
+
+        File.WriteAllText(projPath, proj.WriteToString());
+    }
+
 #endif
 }

+ 1 - 1
Assets/Plugins/iOS/WeChatSDK/WXApi.h.meta

@@ -71,7 +71,7 @@ PluginImporter:
     second:
       enabled: 1
       settings:
-        AddToEmbeddedBinaries: true
+        AddToEmbeddedBinaries: false
         CPU: AnyCPU
         CompileFlags: 
         FrameworkDependencies: 

+ 1 - 1
Assets/Plugins/iOS/WeChatSDK/WXApiObject.h.meta

@@ -71,7 +71,7 @@ PluginImporter:
     second:
       enabled: 1
       settings:
-        AddToEmbeddedBinaries: true
+        AddToEmbeddedBinaries: false
         CPU: AnyCPU
         CompileFlags: 
         FrameworkDependencies: 

+ 1 - 1
Assets/Plugins/iOS/WeChatSDK/WechatAuthSDK.h.meta

@@ -71,7 +71,7 @@ PluginImporter:
     second:
       enabled: 1
       settings:
-        AddToEmbeddedBinaries: true
+        AddToEmbeddedBinaries: false
         CPU: AnyCPU
         CompileFlags: 
         FrameworkDependencies: 

+ 1 - 1
Assets/Plugins/iOS/WeChatSDK/libWeChatSDK.a.meta

@@ -71,7 +71,7 @@ PluginImporter:
     second:
       enabled: 1
       settings:
-        AddToEmbeddedBinaries: true
+        AddToEmbeddedBinaries: false
         CPU: AnyCPU
         CompileFlags: 
         FrameworkDependencies: WebKit;

+ 5 - 5
ProjectSettings/ProjectSettings.asset

@@ -9,11 +9,11 @@ PlayerSettings:
   AndroidFilterTouchesWhenObscured: 0
   AndroidEnableSustainedPerformanceMode: 0
   defaultScreenOrientation: 4
-  targetDevice: 2
+  targetDevice: 1
   useOnDemandResources: 0
   accelerometerFrequency: 60
   companyName: JssF
-  productName: "WONDERFITTER Pro \u8FD0\u52A8"
+  productName: WONDER FITTER Pro
   defaultCursor: {fileID: 0}
   cursorHotspot: {x: 0, y: 0}
   m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -137,7 +137,7 @@ PlayerSettings:
     16:10: 1
     16:9: 1
     Others: 1
-  bundleVersion: 2.1.3
+  bundleVersion: 2.1.4
   preloadedAssets: []
   metroInputSource: 0
   wsaTransparentSwapchain: 0
@@ -160,7 +160,7 @@ PlayerSettings:
   applicationIdentifier:
     Android: com.xmjssvr.BowArrow.mi
     Standalone: com.JssF.BowArrow
-    iPhone: com.xmjssvr.BowArrow
+    iPhone: com.xmjssvr.PadBowArrowEn
   buildNumber:
     Bratwurst: 0
     Standalone: 0
@@ -279,7 +279,7 @@ PlayerSettings:
   - m_BuildTarget: 
     m_Icons:
     - serializedVersion: 2
-      m_Icon: {fileID: 2800000, guid: e1485575cd9962247a6d7cc46fd6d6a9, type: 3}
+      m_Icon: {fileID: 2800000, guid: a4b7ede0a933f4440bda406386f77c26, type: 3}
       m_Width: 128
       m_Height: 128
       m_Kind: 0