Prechádzať zdrojové kódy

添加兼容ios 摄像机,apple登录升级

slambb 9 mesiacov pred
rodič
commit
1e7658b1e3
73 zmenil súbory, kde vykonal 1179 pridanie a 1149 odobranie
  1. 1 1
      Assets/AppleSignInUnity/AppleAuth/AppleAuth.asmdef.meta
  2. 1 1
      Assets/AppleSignInUnity/AppleAuth/AppleAuthLoginArgs.cs.meta
  3. 3 3
      Assets/AppleSignInUnity/AppleAuth/AppleAuthManager.cs
  4. 1 1
      Assets/AppleSignInUnity/AppleAuth/AppleAuthManager.cs.meta
  5. 1 1
      Assets/AppleSignInUnity/AppleAuth/AppleAuthQuickLoginArgs.cs.meta
  6. 1 1
      Assets/AppleSignInUnity/AppleAuth/Editor.meta
  7. 1 1
      Assets/AppleSignInUnity/AppleAuth/Editor/AppleAuth.Editor.asmdef.meta
  8. 1 1
      Assets/AppleSignInUnity/AppleAuth/Editor/AppleAuthMacosPostprocessorHelper.cs.meta
  9. 57 37
      Assets/AppleSignInUnity/AppleAuth/Editor/ProjectCapabilityManagerExtension.cs
  10. 1 1
      Assets/AppleSignInUnity/AppleAuth/Editor/ProjectCapabilityManagerExtension.cs.meta
  11. 1 1
      Assets/AppleSignInUnity/AppleAuth/Enums.meta
  12. 1 1
      Assets/AppleSignInUnity/AppleAuth/Enums/AuthorizationErrorCode.cs.meta
  13. 1 1
      Assets/AppleSignInUnity/AppleAuth/Enums/CredentialState.cs.meta
  14. 1 1
      Assets/AppleSignInUnity/AppleAuth/Enums/LoginOptions.cs.meta
  15. 1 1
      Assets/AppleSignInUnity/AppleAuth/Enums/PersonNameFormatterStyle.cs.meta
  16. 1 1
      Assets/AppleSignInUnity/AppleAuth/Enums/RealUserStatus.cs.meta
  17. 1 1
      Assets/AppleSignInUnity/AppleAuth/Extensions.meta
  18. 1 1
      Assets/AppleSignInUnity/AppleAuth/Extensions/AppleErrorExtensions.cs.meta
  19. 2 2
      Assets/AppleSignInUnity/AppleAuth/Extensions/PersonNameExtensions.cs
  20. 1 1
      Assets/AppleSignInUnity/AppleAuth/Extensions/PersonNameExtensions.cs.meta
  21. 1 1
      Assets/AppleSignInUnity/AppleAuth/IAppleAuthManager.cs.meta
  22. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces.meta
  23. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/IAppleError.cs.meta
  24. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/IAppleIDCredential.cs.meta
  25. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/ICredential.cs.meta
  26. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/ICredentialStateResponse.cs.meta
  27. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/ILoginWithAppleIdResponse.cs.meta
  28. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/IPasswordCredential.cs.meta
  29. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/IPayloadDeserializer.cs.meta
  30. 1 1
      Assets/AppleSignInUnity/AppleAuth/Interfaces/IPersonName.cs.meta
  31. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native.meta
  32. 5 0
      Assets/AppleSignInUnity/AppleAuth/Native/AppleError.cs
  33. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/AppleError.cs.meta
  34. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/AppleIDCredential.cs.meta
  35. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/CredentialStateResponse.cs.meta
  36. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/FullPersonName.cs.meta
  37. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/LoginWithAppleIdResponse.cs.meta
  38. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/PasswordCredential.cs.meta
  39. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/PayloadDeserializer.cs.meta
  40. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/PersonName.cs.meta
  41. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/SerializationTools.cs.meta
  42. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/iOS.meta
  43. 55 2
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthManager.h.meta
  44. 16 15
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthManager.m
  45. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthManager.m.meta
  46. 9 9
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.h
  47. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.h.meta
  48. 4 4
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.m
  49. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.m.meta
  50. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/PersonNameComponentsFormatting.m
  51. 1 1
      Assets/AppleSignInUnity/AppleAuth/Native/iOS/PersonNameComponentsFormatting.m.meta
  52. 2 2
      Assets/AppleSignInUnity/AppleAuth/package.json
  53. 1 1
      Assets/AppleSignInUnity/AppleAuth/package.json.meta
  54. 1 35
      Assets/AppleSignInUnity/AppleAuthSample/GameMenuHandler.cs
  55. 18 174
      Assets/AppleSignInUnity/AppleAuthSample/MainMenu.cs
  56. 55 448
      Assets/AppleSignInUnity/AppleAuthSample/SampleScene.unity
  57. 10 6
      Assets/BowArrow/InfraredCamera/InfraredDemo.cs
  58. 2 2
      Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.cs
  59. 1 1
      Assets/BowArrow/Modules/InfraredGuider/InfraredResolution.cs
  60. 5 1
      Assets/BowArrow/Scripts/Editor/MenuChangeAppLanguage.cs
  61. 1 1
      Assets/Game_Hyperspace/Script/ShootingEvent.cs
  62. 61 336
      Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface.cs
  63. 388 0
      Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_Android.cs
  64. 11 0
      Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_Android.cs.meta
  65. 350 0
      Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_IOS.cs
  66. 11 0
      Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_IOS.cs.meta
  67. 26 8
      Assets/InfraredProject/InfraredCamera/Scripts/UVCManager.cs
  68. 0 13
      Assets/InfraredProject/Resources/WebCameraView.prefab
  69. 1 1
      Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs
  70. 4 1
      Assets/Plugins/iOS/Editor/XCodePostProcessBuild.cs
  71. BIN
      Assets/Plugins/iOS/libSlambbUVC.a
  72. 33 0
      Assets/Plugins/iOS/libSlambbUVC.a.meta
  73. 4 4
      ProjectSettings/ProjectSettings.asset

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/AppleAuth.asmdef.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 18299ae3367e54facaf234d6fdef478c
+guid: f0f7271028ac7491e8071ca74839ec94
 AssemblyDefinitionImporter:
   externalObjects: {}
   userData: 

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/AppleAuthLoginArgs.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 3b73c35a1b9cc46c4aee8b7ef42a8d16
+guid: 942d45185ed014f85860ee7e09cc0b20
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
Assets/AppleSignInUnity/AppleAuth/AppleAuthManager.cs

@@ -1,4 +1,4 @@
-#if ((UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX) && !UNITY_EDITOR)
+#if ((UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS || UNITY_STANDALONE_OSX) && !UNITY_EDITOR)
 #define APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
 #endif
 
@@ -12,7 +12,7 @@ namespace AppleAuth
     {
         static AppleAuthManager()
         {
-            const string versionMessage = "Using Sign in with Apple Unity Plugin - v1.4.2";
+            const string versionMessage = "Using Sign in with Apple Unity Plugin - v1.4.4";
 #if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
             PInvoke.AppleAuth_LogMessage(versionMessage);
 #else
@@ -289,7 +289,7 @@ namespace AppleAuth
 
         private static class PInvoke
         {
-#if UNITY_IOS || UNITY_TVOS
+#if UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS
             private const string DllName = "__Internal";
 #elif UNITY_STANDALONE_OSX
             private const string DllName = "MacOSAppleAuthManager";

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/AppleAuthManager.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 4c7f839cf27df4e2daf0b30aaecca941
+guid: 8f1c9ac38c36d41b5b3cee996dc6ac3f
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/AppleAuthQuickLoginArgs.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 880aaf66cd239420c84516df3808b1cd
+guid: 99b1f818af264456ea20929dd72afbb7
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Editor.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 9d2fa333a77c745fe8752ca94d41779f
+guid: ee5509fe0595343989be434d5c3a74a8
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Editor/AppleAuth.Editor.asmdef.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 1c91b2bcb0fb84a7097f5062974c1431
+guid: f1e90a31043bd4ee5a222b0cc88d9836
 AssemblyDefinitionImporter:
   externalObjects: {}
   userData: 

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Editor/AppleAuthMacosPostprocessorHelper.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: c63f43437574c466590bb388a8fcbcde
+guid: 65ea61def166544ca86e7e9cbc0b6e04
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 57 - 37
Assets/AppleSignInUnity/AppleAuth/Editor/ProjectCapabilityManagerExtension.cs

@@ -1,4 +1,4 @@
-#if UNITY_IOS || UNITY_TVOS
+#if UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS
 
 using System;
 using System.Reflection;
@@ -8,61 +8,81 @@ namespace AppleAuth.Editor
 {
     public static class ProjectCapabilityManagerExtension
     {
-        private const string EntitlementsArrayKey = "com.apple.developer.applesignin";
-        private const string DefaultAccessLevel = "Default";
-        private const string AuthenticationServicesFramework = "AuthenticationServices.framework";
-        private const BindingFlags NonPublicInstanceBinding = BindingFlags.NonPublic | BindingFlags.Instance;
-
         /// <summary>
         /// Extension method for ProjectCapabilityManager to add the Sign In With Apple capability in compatibility mode.
         /// In particular, adds the AuthenticationServices.framework as an Optional framework, preventing crashes in
         /// iOS versions previous to 13.0
         /// </summary>
         /// <param name="manager">The manager for the main target to use when adding the Sign In With Apple capability.</param>
-        /// <param name="unityFrameworkTargetGuid">The GUID for the UnityFramework target. If null, it will use the main target GUID.</param>
-        public static void AddSignInWithAppleWithCompatibility(this ProjectCapabilityManager manager, string unityFrameworkTargetGuid = null)
+        public static void AddSignInWithAppleWithCompatibility(this ProjectCapabilityManager manager)
         {
+            const BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
             var managerType = typeof(ProjectCapabilityManager);
-            var capabilityTypeType = typeof(PBXCapabilityType);
-            
-            var projectField = managerType.GetField("project", NonPublicInstanceBinding);
-            var targetGuidField = managerType.GetField("m_TargetGuid", NonPublicInstanceBinding);
-            var entitlementFilePathField = managerType.GetField("m_EntitlementFilePath", NonPublicInstanceBinding);
-            var getOrCreateEntitlementDocMethod = managerType.GetMethod("GetOrCreateEntitlementDoc", NonPublicInstanceBinding);
-            var constructorInfo = capabilityTypeType.GetConstructor(
-                NonPublicInstanceBinding, 
-                null,
-                new[] {typeof(string), typeof(bool), typeof(string), typeof(bool)}, 
-                null);
             
-            if (projectField == null || targetGuidField == null  || entitlementFilePathField == null ||
-                getOrCreateEntitlementDocMethod == null || constructorInfo == null)
-                throw new Exception("Can't Add Sign In With Apple programatically in this Unity version");
+            var projectField = managerType.GetField("project", bindingFlags);
+            var entitlementFilePathField = managerType.GetField("m_EntitlementFilePath", bindingFlags);
+            var targetGuidField = managerType.GetField("m_TargetGuid", bindingFlags);
+            var getOrCreateEntitlementDocMethod = managerType.GetMethod("GetOrCreateEntitlementDoc", bindingFlags);
+            if (projectField == null ||
+                entitlementFilePathField == null ||
+                targetGuidField == null ||
+                getOrCreateEntitlementDocMethod == null)
+                throw new Exception("Can't Add Sign In With Apple programatically in this Unity version.");
             
             var entitlementFilePath = entitlementFilePathField.GetValue(manager) as string;
-            var entitlementDoc = getOrCreateEntitlementDocMethod.Invoke(manager, new object[] { }) as PlistDocument;
+            var entitlementDoc = (PlistDocument) getOrCreateEntitlementDocMethod.Invoke(manager, new object[] { });
             if (entitlementDoc != null)
             {
                 var plistArray = new PlistElementArray();
-                plistArray.AddString(DefaultAccessLevel);
-                entitlementDoc.root[EntitlementsArrayKey] = plistArray;
+                plistArray.AddString("Default");
+                entitlementDoc.root["com.apple.developer.applesignin"] = plistArray;
             }
 
-            var project = projectField.GetValue(manager) as PBXProject;
-            if (project != null)
-            {
-                var mainTargetGuid = targetGuidField.GetValue(manager) as string;
-                var capabilityType = constructorInfo.Invoke(new object[] { "com.apple.developer.applesignin.custom", true, string.Empty, true }) as PBXCapabilityType;
+            var project = (PBXProject) projectField.GetValue(manager);
+            var emptyCapability = GetEmptyCapabilityWithReflection();
+            
+            var mainTargetGuid = (string)targetGuidField.GetValue(manager);
+#if UNITY_2019_3_OR_NEWER
+            var frameworkTargetGuid = project.GetUnityFrameworkTargetGuid();
+#else
+            var frameworkTargetGuid = mainTargetGuid;
+#endif
+            
+            project.AddFrameworkToProject(frameworkTargetGuid, "AuthenticationServices.framework", true);
+            project.AddCapability(mainTargetGuid, emptyCapability, entitlementFilePath);
+        }
+        
+        private static PBXCapabilityType GetEmptyCapabilityWithReflection()
+        {
+            // For Unity version >= 6000.0.23f1
+            var constructorInfo = typeof(PBXCapabilityType)
+                .GetConstructor(
+                    BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, 
+                    null, 
+                    new[] {typeof(bool), typeof(string), typeof(bool)}, 
+                    null);
 
-                var targetGuidToAddFramework = unityFrameworkTargetGuid;
-                if (targetGuidToAddFramework == null)
-                {
-                    targetGuidToAddFramework = mainTargetGuid;
-                }
+            if (constructorInfo != null)
+            {
+                return (PBXCapabilityType) constructorInfo
+                    .Invoke(new object[] {true, string.Empty, true});
+            }
+            
+            // For Unity version < 6000.0.23f1
+            constructorInfo = typeof(PBXCapabilityType)
+                .GetConstructor(
+                    BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, 
+                    null, 
+                    new[] {typeof(string), typeof(bool), typeof(string), typeof(bool)}, 
+                    null);
 
-                project.AddFrameworkToProject(targetGuidToAddFramework, AuthenticationServicesFramework, true);
-                project.AddCapability(mainTargetGuid, capabilityType, entitlementFilePath, false);
+            if (constructorInfo != null)
+            {
+                return (PBXCapabilityType) constructorInfo
+                    .Invoke(new object[] {"com.lupidan.apple-signin-unity.empty", true, string.Empty, true});
             }
+
+            throw new Exception("Can't create empty capability in this Unity version.");
         }
     }
 }

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Editor/ProjectCapabilityManagerExtension.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 78dac5699abb64d9fac79a0c86935222
+guid: 05c113d121f2c436ea9949b66c6dbae3
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Enums.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 932abca36e8644290a74701cbd118268
+guid: 2f261eb86ba734feca161c2f37a6e0fd
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Enums/AuthorizationErrorCode.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 94ed713aefbcb4ad4af09134940b6e6a
+guid: ba35f129575e343abbaf8e8e4fe387d5
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Enums/CredentialState.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 676a23062a9d949208d65b358409bea3
+guid: 64d60ba659f914e9d8e63b7c9994c325
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Enums/LoginOptions.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: fdb929423ec104623a3063907d6225c7
+guid: 08355c5c3f39b4ba399feeae4682c757
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Enums/PersonNameFormatterStyle.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e1f1c2ec40fe841078e00f863f1d423f
+guid: b1d984d066d6148e2a3c4cb8cf5a0f6d
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Enums/RealUserStatus.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 825807bd1c07d453793cb31245989cb7
+guid: c109c8d1cbdd148a2b42b34a7fcc2425
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Extensions.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e1c9a1626aa114777a15f069a203fda4
+guid: 46ae81adc8aa44e699353b9d9905efe7
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Extensions/AppleErrorExtensions.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 38ba8067d45904561992442829c81621
+guid: ee019489d69e149e69b06ccb21b0dd64
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 2 - 2
Assets/AppleSignInUnity/AppleAuth/Extensions/PersonNameExtensions.cs

@@ -1,4 +1,4 @@
-#if ((UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX) && !UNITY_EDITOR)
+#if ((UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS || UNITY_STANDALONE_OSX) && !UNITY_EDITOR)
 #define NATIVE_PERSON_NAME_COMPONENTS_AVAILABLE
 #endif
 
@@ -77,7 +77,7 @@ namespace AppleAuth.Extensions
         
         private static class PInvoke
         {
-#if UNITY_IOS || UNITY_TVOS
+#if UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS
             private const string DllName = "__Internal";
 #elif UNITY_STANDALONE_OSX
             private const string DllName = "MacOSAppleAuthManager";

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Extensions/PersonNameExtensions.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 0f0ce3be3f3d14936b66e17aeca1270d
+guid: 50a93c68971744766bec2462c301927e
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/IAppleAuthManager.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 8bab6e87f1e5b4a38a372f0346cda176
+guid: 32e1611c500594c25bdb8061c251076a
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: b4573b7b8e1474ab29d1b894d0f02787
+guid: 173fddc6bf46743bdbf40c1cd54ff4ce
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/IAppleError.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 5a866a07171f248c3ad143c36aa83d0a
+guid: 3929dbc055ed14b1a896cc4c67b423c8
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/IAppleIDCredential.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 5dd53646adf034cea90d0ecf78712394
+guid: b817603261dd2493794589b3fd458466
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/ICredential.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 5d586788ca6134d548a7cc5ee754e20a
+guid: 3375c07071b6d4ab993282abe5a574de
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/ICredentialStateResponse.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 04bbc9a18c17a4bd7a108ba1bfec7965
+guid: 9572e57440d98452a82c48632f7e8deb
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/ILoginWithAppleIdResponse.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: bec39bc93cefb4208a473599c4bab5a8
+guid: 0871a2e919f004f7a9351346ef4a4a80
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/IPasswordCredential.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 66bf942456541410f8647591a733b7a4
+guid: 460c69af0ca3e49d3830ab4d9f337f6a
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/IPayloadDeserializer.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: afdcdd284f56342368cbbb6058506522
+guid: ac6883326639942c4b152261b2649784
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Interfaces/IPersonName.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 03a0cb4a41a6e43aea5b76da524b1936
+guid: bf0076b2271ed4a4dbc2c43f5c5cf9fd
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 0b4db2f18400848a1870f020c35193c3
+guid: d7ae4752b928143e9b8d8396e8ee5f7c
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 5 - 0
Assets/AppleSignInUnity/AppleAuth/Native/AppleError.cs

@@ -32,5 +32,10 @@ namespace AppleAuth.Native
             
             SerializationTools.FixSerializationForArray(ref this._localizedRecoveryOptions);
         }
+
+        public override string ToString()
+        {
+            return $"Domain={_domain} Code={_code} Description={_localizedDescription}";
+        }
     }
 }

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/AppleError.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 972dbd5260990433088a91447f9b5996
+guid: 328bc30fa27f54dcc90fbd80e72b9cfb
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/AppleIDCredential.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 15f1c0e85148148df9c73c1bd394ad0b
+guid: 466c0624e95f44a9c88b8bdfd929cab0
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/CredentialStateResponse.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 9b612635356cd461a9e2534b4a3b319c
+guid: 9503865ba21114da4a14b55abed95465
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/FullPersonName.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 553939a7cdc8345438ef7c4acd6df81b
+guid: ceeacae8e47c24121af136939edfea56
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/LoginWithAppleIdResponse.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 5424178463c904f64a35b217a67ca26d
+guid: 59b9a0165d48d4a34b04ba6472db9a6e
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/PasswordCredential.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 8f9622fd2a2624b309ef315aee546084
+guid: 5244f103d85c64b3cb440ff15bc75ff2
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/PayloadDeserializer.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 7e11d92c61c294843bda2eac40302df7
+guid: 2526470d9dc4e4c1d95bce90a54084c4
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/PersonName.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 59d79ab039edf4a8a9e67de450c3e677
+guid: 7910ffff99e494b2fb97ff13169e0bb8
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/SerializationTools.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 61681e44feb1b43a8ae7b1afdcb3113f
+guid: 997d9975ced8a404abc25b6a2cbe3866
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/iOS.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 88d4fb72126254913917272059676859
+guid: 54498cbbbee9249ef82cd1cf6039fd31
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 55 - 2
Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthManager.h.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 11e16916ddef24a22b24c934116b75df
+guid: bc76c5dc90c84411784d9ce360740a53
 PluginImporter:
   externalObjects: {}
   serializedVersion: 2
@@ -11,6 +11,24 @@ PluginImporter:
   isExplicitlyReferenced: 0
   validateReferences: 1
   platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 0
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 0
+  - first:
+      Android: Android
+    second:
+      enabled: 1
+      settings:
+        CPU: ARMv7
   - first:
       Any: 
     second:
@@ -19,9 +37,44 @@ PluginImporter:
   - first:
       Editor: Editor
     second:
-      enabled: 0
+      enabled: 1
       settings:
+        CPU: AnyCPU
         DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 1
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: AuthenticationServices;
   userData: 
   assetBundleName: 
   assetBundleVariant: 

+ 16 - 15
Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthManager.m

@@ -27,8 +27,8 @@
 
 #pragma mark - AppleAuthManager Implementation
 
-// IOS/TVOS 13.0 | MACOS 10.15
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
+// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
 #define AUTHENTICATION_SERVICES_AVAILABLE true
 #import <AuthenticationServices/AuthenticationServices.h>
 #endif
@@ -45,7 +45,7 @@
 @end
 
 #if AUTHENTICATION_SERVICES_AVAILABLE
-API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
+API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
 @interface AppleAuthManager () <ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding>
 @property (nonatomic, strong) ASAuthorizationAppleIDProvider *appleIdProvider;
 @property (nonatomic, strong) ASAuthorizationPasswordProvider *passwordProvider;
@@ -74,7 +74,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
     if (self)
     {
 #if AUTHENTICATION_SERVICES_AVAILABLE
-        if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, *))
+        if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
         {
             _appleIdProvider = [[ASAuthorizationAppleIDProvider alloc] init];
             _passwordProvider = [[ASAuthorizationPasswordProvider alloc] init];
@@ -90,7 +90,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 - (void) quickLogin:(uint)requestId withNonce:(NSString *)nonce andState:(NSString *)state
 {
 #if AUTHENTICATION_SERVICES_AVAILABLE
-    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, *))
+    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
     {
         ASAuthorizationAppleIDRequest *appleIDRequest = [[self appleIdProvider] createRequest];
         [appleIDRequest setNonce:nonce];
@@ -117,7 +117,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 - (void) loginWithAppleId:(uint)requestId withOptions:(AppleAuthManagerLoginOptions)options nonce:(NSString *)nonce andState:(NSString *)state
 {
 #if AUTHENTICATION_SERVICES_AVAILABLE
-    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, *))
+    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
     {
         ASAuthorizationAppleIDRequest *request = [[self appleIdProvider] createRequest];
         NSMutableArray *scopes = [NSMutableArray array];
@@ -152,7 +152,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 - (void) getCredentialStateForUser:(NSString *)userId withRequestId:(uint)requestId
 {
 #if AUTHENTICATION_SERVICES_AVAILABLE
-    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, *))
+    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
     {
         [[self appleIdProvider] getCredentialStateForUserID:userId completion:^(ASAuthorizationAppleIDProviderCredentialState credentialState, NSError * _Nullable error) {
             NSNumber *credentialStateNumber = nil;
@@ -185,7 +185,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 - (void) registerCredentialsRevokedCallbackForRequestId:(uint)requestId
 {
 #if AUTHENTICATION_SERVICES_AVAILABLE
-    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, *))
+    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
     {
         if ([self credentialsRevokedObserver])
         {
@@ -265,7 +265,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 #if AUTHENTICATION_SERVICES_AVAILABLE
 
 - (void) performAuthorizationRequestsForController:(ASAuthorizationController *)authorizationController withRequestId:(uint)requestId
-API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
+API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
 {
     NSValue *authControllerAsKey = [NSValue valueWithNonretainedObject:authorizationController];
     [[self authorizationsInProgress] setObject:@(requestId) forKey:authControllerAsKey];
@@ -278,7 +278,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 #pragma mark ASAuthorizationControllerDelegate protocol implementation
 
 - (void) authorizationController:(ASAuthorizationController *)controller didCompleteWithAuthorization:(ASAuthorization *)authorization
-API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
+API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
 {
     NSValue *authControllerAsKey = [NSValue valueWithNonretainedObject:controller];
     NSNumber *requestIdNumber = [[self authorizationsInProgress] objectForKey:authControllerAsKey];
@@ -306,7 +306,7 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 }
 
 - (void) authorizationController:(ASAuthorizationController *)controller didCompleteWithError:(NSError *)error
-API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
+API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
 {
     NSValue *authControllerAsKey = [NSValue valueWithNonretainedObject:controller];
     NSNumber *requestIdNumber = [[self authorizationsInProgress] objectForKey:authControllerAsKey];
@@ -326,9 +326,10 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 #pragma mark ASAuthorizationControllerPresentationContextProviding protocol implementation
 
 - (ASPresentationAnchor) presentationAnchorForAuthorizationController:(ASAuthorizationController *)controller
-API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
+API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
 {
-    #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000
+    
+    #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
         return [[[UIApplication sharedApplication] delegate] window];
     #elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
         return [[NSApplication sharedApplication] mainWindow];
@@ -343,9 +344,9 @@ API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
 
 #pragma mark - Native C Calls
 
-bool AppleAuth_IsCurrentPlatformSupported()
+bool AppleAuth_IsCurrentPlatformSupported(void)
 {
-    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, *))
+    if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
     {
         return true;
     }

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthManager.m.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 4ea7c90f3e44b49608eed2c1ae802944
+guid: df29709c0b9d54068969948458498dcf
 PluginImporter:
   externalObjects: {}
   serializedVersion: 2

+ 9 - 9
Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.h

@@ -24,8 +24,8 @@
 
 #import <Foundation/Foundation.h>
 
-// IOS/TVOS 13.0 | MACOS 10.15
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
+// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
 #import <AuthenticationServices/AuthenticationServices.h>
 #endif
 
@@ -40,22 +40,22 @@
                                                       passwordCredentialDictionary:(NSDictionary * _Nullable)passwordCredentialDictionary
                                                                    errorDictionary:(NSDictionary * _Nullable)errorDictionary;
 
-// IOS/TVOS 9.0 | MACOS 10.11
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __TV_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
+// IOS/TVOS 9.0 | MACOS 10.11 | VISIONOS 1.0
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __TV_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
 
 + (NSDictionary * _Nullable) dictionaryForNSPersonNameComponents:(NSPersonNameComponents * _Nullable)nameComponents
-API_AVAILABLE(ios(9.0), macos(10.11), tvos(9.0), watchos(2.0));
+API_AVAILABLE(ios(9.0), macos(10.11), tvos(9.0), watchos(2.0), visionos(1.0));
 
 #endif
 
-// IOS/TVOS 13.0 | MACOS 10.15
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
+// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
 
 + (NSDictionary * _Nullable) dictionaryForASAuthorizationAppleIDCredential:(ASAuthorizationAppleIDCredential * _Nullable)appleIDCredential
-API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
+API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0));
 
 + (NSDictionary * _Nullable) dictionaryForASPasswordCredential:(ASPasswordCredential * _Nullable)passwordCredential
-API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
+API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0));
 
 #endif
 

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.h.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 77979d61af9924ca4820cfc62d0a493a
+guid: 576c4e551e2224c8fa8832cb12a61bd2
 PluginImporter:
   externalObjects: {}
   serializedVersion: 2

+ 4 - 4
Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.m

@@ -74,8 +74,8 @@
     return [result copy];
 }
 
-// IOS/TVOS 9.0 | MACOS 10.11
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __TV_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
+// IOS/TVOS 9.0 | MACOS 10.11 | VISIONOS 1.0
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __TV_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
 
 + (NSDictionary *) dictionaryForNSPersonNameComponents:(NSPersonNameComponents *)nameComponents
 {
@@ -111,8 +111,8 @@
 
 #endif
 
-// IOS/TVOS 13.0 | MACOS 10.15
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
+// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
 
 + (NSDictionary *) dictionaryForASAuthorizationAppleIDCredential:(ASAuthorizationAppleIDCredential *)appleIDCredential
 {

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/iOS/AppleAuthSerializer.m.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 1e6b72809d9044a83885801f89f8e67f
+guid: d76f903949803420aba83f8ff8da7d44
 PluginImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/iOS/PersonNameComponentsFormatting.m

@@ -46,7 +46,7 @@ const char* AppleAuth_GetPersonNameUsingFormatter(const char *payload, int style
     if (error)
         return NULL;
     
-    if (@available(iOS 9.0, tvOS 9.0, macOS 10.11, *)) {
+    if (@available(iOS 9.0, tvOS 9.0, macOS 10.11, visionOS 1.0, *)) {
         NSPersonNameComponents *nameData = [[NSPersonNameComponents alloc] init];
         [nameData setNamePrefix:[nameComponentsDictionary objectForKey:@"_namePrefix"]];
         [nameData setGivenName:[nameComponentsDictionary objectForKey:@"_givenName"]];

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/Native/iOS/PersonNameComponentsFormatting.m.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: b89ca8ecbea5c4f0dad838a9fde67910
+guid: 1742c1e92a67c48b4a36996ec0bbef55
 PluginImporter:
   externalObjects: {}
   serializedVersion: 2

+ 2 - 2
Assets/AppleSignInUnity/AppleAuth/package.json

@@ -1,8 +1,8 @@
 {
     "name": "com.lupidan.apple-signin-unity-src",
     "displayName": "Sign in with Apple [Local Source]",
-    "version": "1.4.2",
-    "unity": "2018.3",
+    "version": "1.4.4",
+    "unity": "2020.3",
     "description": "[Local Source]\nProvides a Unity bridge to use the native Sign In With Apple method on iOS/iPadOS/tvOS/macOS devices",
     "author": {
         "name": "Daniel Lupiañez Casares",

+ 1 - 1
Assets/AppleSignInUnity/AppleAuth/package.json.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: b78cf518d23ce49d1996efcd91b8b00a
+guid: 58dfe75f088e0478999dc7f2af3601eb
 TextScriptImporter:
   externalObjects: {}
   userData: 

+ 1 - 35
Assets/AppleSignInUnity/AppleAuthSample/GameMenuHandler.cs

@@ -1,12 +1,9 @@
 using AppleAuth.Enums;
 using AppleAuth.Extensions;
 using AppleAuth.Interfaces;
-using Newtonsoft.Json;
 using System;
-using System.Collections;
 using System.Text;
 using UnityEngine;
-using UnityEngine.Networking;
 using UnityEngine.UI;
 
 [Serializable]
@@ -67,7 +64,6 @@ public class GameMenuHandler
                 stringBuilder.AppendLine("<b>Email:</b> " + appleIdCredential.Email);
             }
 
-
             if (appleIdCredential.FullName != null)
             {
                 var fullName = appleIdCredential.FullName;
@@ -90,7 +86,7 @@ public class GameMenuHandler
                     stringBuilder.AppendLine("<b>Phonetic name (Abbreviated):</b> " + phoneticName.ToLocalizedString(PersonNameFormatterStyle.Abbreviated));
                 }
             }
-          
+
             this.AppleUserCredentialLabel.text = stringBuilder.ToString();
         }
         else if (passwordCredential != null)
@@ -106,34 +102,4 @@ public class GameMenuHandler
             this.AppleUserCredentialLabel.text = "Unknown credentials for user " + receivedCredential.User;
         }
     }
-
-
-    public IEnumerator LoginByApple(string identityToken,string email,string fullName, Action<RequestResult> callback)
-    {
-        string url = "http://192.168.0.112:11433/SmartBowBusinessServer/gameLogin/loginByApple";
-        WWWForm form = new WWWForm();
-        form.AddField("identityToken", identityToken);
-        form.AddField("email", email);
-        form.AddField("fullName", fullName);
-        form.AddField("serverIndex", 0);
-        using (UnityWebRequest request = UnityWebRequest.Post(url, form))
-        {
-            request.timeout = 10;
-            yield return request.SendWebRequest();
-            RequestResult requestResult = new RequestResult();
-            if (request.result == UnityWebRequest.Result.Success)
-            {
-                requestResult = JsonConvert.DeserializeObject<RequestResult>(request.downloadHandler.text);
-            }
-            if (callback != null) callback(requestResult);
-        }
-    }
-
-
-    public class RequestResult
-    {
-        public int code = -9999;
-        public object data;
-        public string msg;
-    }
 }

+ 18 - 174
Assets/AppleSignInUnity/AppleAuthSample/MainMenu.cs

@@ -1,19 +1,14 @@
-using System;
-using System.Collections;
-using System.Text;
-using AppleAuth;
+using AppleAuth;
 using AppleAuth.Enums;
 using AppleAuth.Extensions;
 using AppleAuth.Interfaces;
 using AppleAuth.Native;
-using Newtonsoft.Json;
 using UnityEngine;
-using UnityEngine.Networking;
 
 public class MainMenu : MonoBehaviour
 {
     private const string AppleUserIdKey = "AppleUserId";
-
+    
     private IAppleAuthManager _appleAuthManager;
 
     public LoginMenuHandler LoginMenu;
@@ -27,11 +22,10 @@ public class MainMenu : MonoBehaviour
             // Creates a default JSON deserializer, to transform JSON Native responses to C# instances
             var deserializer = new PayloadDeserializer();
             // Creates an Apple Authentication manager with the deserializer
-            this._appleAuthManager = new AppleAuthManager(deserializer);
+            this._appleAuthManager = new AppleAuthManager(deserializer);    
         }
 
         this.InitializeLoginMenu();
-
     }
 
     private void Update()
@@ -42,7 +36,7 @@ public class MainMenu : MonoBehaviour
         {
             this._appleAuthManager.Update();
         }
-
+        
         this.LoginMenu.UpdateLoadingMessage(Time.deltaTime);
     }
 
@@ -51,27 +45,19 @@ public class MainMenu : MonoBehaviour
         this.SetupLoginMenuForAppleSignIn();
         this.SignInWithApple();
     }
-    public void SignInWithAppleButtonPressed2()
-    {
-        this.SignInWithApple();
-    }
-    public void SignInWithAppleButtonPressedDelete()
-    {
-        this.DeleteSignInWithApple();
-       
-    }
+
     private void InitializeLoginMenu()
     {
         this.LoginMenu.SetVisible(visible: true);
         this.GameMenu.SetVisible(visible: false);
-
+        
         // Check if the current platform supports Sign In With Apple
         if (this._appleAuthManager == null)
         {
             this.SetupLoginMenuForUnsupportedPlatform();
             return;
         }
-
+        
         // If at any point we receive a credentials revoked notification, we delete the stored User ID, and go back to login
         this._appleAuthManager.SetCredentialsRevokedCallback(result =>
         {
@@ -102,7 +88,7 @@ public class MainMenu : MonoBehaviour
         this.LoginMenu.SetSignInWithAppleButton(visible: false, enabled: false);
         this.LoginMenu.SetLoadingMessage(visible: true, message: "Unsupported platform");
     }
-
+    
     private void SetupLoginMenuForSignInWithApple()
     {
         this.LoginMenu.SetVisible(visible: true);
@@ -110,7 +96,7 @@ public class MainMenu : MonoBehaviour
         this.LoginMenu.SetSignInWithAppleButton(visible: true, enabled: true);
         this.LoginMenu.SetLoadingMessage(visible: false, message: string.Empty);
     }
-
+    
     private void SetupLoginMenuForCheckingCredentials()
     {
         this.LoginMenu.SetVisible(visible: true);
@@ -118,7 +104,7 @@ public class MainMenu : MonoBehaviour
         this.LoginMenu.SetSignInWithAppleButton(visible: true, enabled: false);
         this.LoginMenu.SetLoadingMessage(visible: true, message: "Checking Apple Credentials");
     }
-
+    
     private void SetupLoginMenuForQuickLoginAttempt()
     {
         this.LoginMenu.SetVisible(visible: true);
@@ -126,7 +112,7 @@ public class MainMenu : MonoBehaviour
         this.LoginMenu.SetSignInWithAppleButton(visible: true, enabled: false);
         this.LoginMenu.SetLoadingMessage(visible: true, message: "Attempting Quick Login");
     }
-
+    
     private void SetupLoginMenuForAppleSignIn()
     {
         this.LoginMenu.SetVisible(visible: true);
@@ -134,7 +120,7 @@ public class MainMenu : MonoBehaviour
         this.LoginMenu.SetSignInWithAppleButton(visible: true, enabled: false);
         this.LoginMenu.SetLoadingMessage(visible: true, message: "Signing In with Apple");
     }
-
+    
     private void SetupGameMenu(string appleUserId, ICredential credential)
     {
         this.LoginMenu.SetVisible(visible: false);
@@ -155,7 +141,7 @@ public class MainMenu : MonoBehaviour
                     case CredentialState.Authorized:
                         this.SetupGameMenu(appleUserId, null);
                         return;
-
+                    
                     // If it was revoked, or not found, we need a new sign in with apple attempt
                     // Discard previous apple user id
                     case CredentialState.Revoked:
@@ -172,11 +158,11 @@ public class MainMenu : MonoBehaviour
                 this.SetupLoginMenuForSignInWithApple();
             });
     }
-
+    
     private void AttemptQuickLogin()
     {
         var quickLoginArgs = new AppleAuthQuickLoginArgs();
-
+        
         // Quick login should succeed if the credential was authorized before and not revoked
         this._appleAuthManager.QuickLogin(
             quickLoginArgs,
@@ -186,11 +172,10 @@ public class MainMenu : MonoBehaviour
                 var appleIdCredential = credential as IAppleIDCredential;
                 if (appleIdCredential != null)
                 {
-                    PlayerPrefs.SetString(AppleUserIdKey, credential.User);
+                    PlayerPrefs.SetString(AppleUserIdKey, credential.User);    
                 }
 
                 this.SetupGameMenu(credential.User, credential);
-                this.onAppleData(credential.User, credential);
             },
             error =>
             {
@@ -200,11 +185,11 @@ public class MainMenu : MonoBehaviour
                 this.SetupLoginMenuForSignInWithApple();
             });
     }
-
+    
     private void SignInWithApple()
     {
         var loginArgs = new AppleAuthLoginArgs(LoginOptions.IncludeEmail | LoginOptions.IncludeFullName);
-
+        
         this._appleAuthManager.LoginWithAppleId(
             loginArgs,
             credential =>
@@ -212,39 +197,6 @@ public class MainMenu : MonoBehaviour
                 // If a sign in with apple succeeds, we should have obtained the credential with the user id, name, and email, save it
                 PlayerPrefs.SetString(AppleUserIdKey, credential.User);
                 this.SetupGameMenu(credential.User, credential);
-                this.onAppleData(credential.User, credential);
-            },
-            error =>
-            {
-                var authorizationErrorCode = error.GetAuthorizationErrorCode();
-                Debug.LogWarning("Sign in with Apple failed " + authorizationErrorCode.ToString() + " " + error.ToString());
-                this.SetupLoginMenuForSignInWithApple();
-            });
-    }
-
-    private void DeleteSignInWithApple() {
-        var loginArgs = new AppleAuthLoginArgs(LoginOptions.IncludeEmail | LoginOptions.IncludeFullName);
-
-        this._appleAuthManager.LoginWithAppleId(
-            loginArgs,
-            credential =>
-            {
-                var appleIdCredential = credential as IAppleIDCredential;
-                if (appleIdCredential.AuthorizationCode != null)
-                {
-                    var authorizationCode = Encoding.UTF8.GetString(appleIdCredential.AuthorizationCode, 0, appleIdCredential.AuthorizationCode.Length);
-                    Debug.Log("delete===authorizationCode======= " + authorizationCode.Substring(0, 45));
-                    StartCoroutine(DdeleteUserByApple(authorizationCode, (res) =>
-                    {
-                        Debug.Log($"DdeleteUserByApple service rescode {res.code}, msg {res.msg}");
-                        if (res.code == 0)
-                        {
-                            Debug.Log("删除成功");
-                            this.SetupLoginMenuForSignInWithApple();
-                            PlayerPrefs.DeleteKey(AppleUserIdKey);
-                        }
-                    }));
-                }
             },
             error =>
             {
@@ -252,113 +204,5 @@ public class MainMenu : MonoBehaviour
                 Debug.LogWarning("Sign in with Apple failed " + authorizationErrorCode.ToString() + " " + error.ToString());
                 this.SetupLoginMenuForSignInWithApple();
             });
-
-    }
-
-    public void onAppleData(string appleUserId, ICredential receivedCredential)
-    {
-        var appleIdCredential = receivedCredential as IAppleIDCredential;
-        if (appleIdCredential != null)
-        {
-
-            if (appleIdCredential.IdentityToken != null)
-            {
-                var identityToken = Encoding.UTF8.GetString(appleIdCredential.IdentityToken, 0, appleIdCredential.IdentityToken.Length);
-                Debug.Log("11===identityToken======= " + identityToken);
-            }
-            if (appleIdCredential.AuthorizationCode != null)
-            {
-                var authorizationCode = Encoding.UTF8.GetString(appleIdCredential.AuthorizationCode, 0, appleIdCredential.AuthorizationCode.Length);
-                Debug.Log("22===authorizationCode======= " + authorizationCode.Substring(0, 45));
-            }
-
-
-            string _email = "";
-            if (appleIdCredential.Email != null)
-            {
-                _email = appleIdCredential.Email;
-            }
-            Debug.Log("33===Email======= " + _email);
-            string _fullName = "";
-            if (appleIdCredential.FullName != null)
-            {
-                var fullName = appleIdCredential.FullName;
-                if (appleIdCredential.FullName.PhoneticRepresentation != null)
-                {
-                    var phoneticName = appleIdCredential.FullName.PhoneticRepresentation;
-                    //phoneticName.ToLocalizedString()
-                }
-                _fullName = fullName.ToLocalizedString();
-            }
-            Debug.Log("44===FullName======= " + appleIdCredential.FullName);
-            var _identityToken = Encoding.UTF8.GetString(appleIdCredential.IdentityToken, 0, appleIdCredential.IdentityToken.Length);
-            StartCoroutine(LoginByApple(_identityToken, _email, _fullName, (res) =>
-            {
-                Debug.Log($"LoginByApple service rescode {res.code}, msg {res.msg}");
-                if (res.code == 0)
-                {
-                    Debug.Log("LoginByApple 登录");
-                }
-                else
-                {
-                    this.SetupLoginMenuForSignInWithApple();
-                    PlayerPrefs.DeleteKey(AppleUserIdKey);
-                }
-            }));
-        }
-        else
-        {
-
-                    this.SetupLoginMenuForSignInWithApple();
-                    PlayerPrefs.DeleteKey(AppleUserIdKey);
-        }
-    }
-
-
-    public IEnumerator LoginByApple(string identityToken, string email, string fullName, Action<RequestResult> callback)
-    {
-        string url = "http://192.168.0.112:11432/SmartBowBusinessServer/gameLogin/loginByApple";
-        WWWForm form = new WWWForm();
-        form.AddField("identityToken", identityToken);
-        form.AddField("email", email);
-        form.AddField("fullName", fullName);
-        form.AddField("serverIndex", 0);
-        using (UnityWebRequest request = UnityWebRequest.Post(url, form))
-        {
-            request.timeout = 10;
-            yield return request.SendWebRequest();
-            RequestResult requestResult = new RequestResult();
-            if (request.result == UnityWebRequest.Result.Success)
-            {
-                requestResult = JsonConvert.DeserializeObject<RequestResult>(request.downloadHandler.text);
-            }
-            if (callback != null) callback(requestResult);
-        }
-    }
-
-
-    public IEnumerator DdeleteUserByApple(string identityToken, Action<RequestResult> callback)
-    {
-        string url = "http://192.168.0.112:11432/SmartBowBusinessServer/gameLogin/deleteUserByApple";
-        WWWForm form = new WWWForm();
-        form.AddField("identityToken", identityToken);
-        using (UnityWebRequest request = UnityWebRequest.Post(url, form))
-        {
-            request.timeout = 10;
-            yield return request.SendWebRequest();
-            RequestResult requestResult = new RequestResult();
-            if (request.result == UnityWebRequest.Result.Success)
-            {
-                requestResult = JsonConvert.DeserializeObject<RequestResult>(request.downloadHandler.text);
-            }
-            if (callback != null) callback(requestResult);
-        }
-    }
-
-    public class RequestResult
-    {
-        public int code = -9999;
-        public object data;
-        public string msg;
     }
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 55 - 448
Assets/AppleSignInUnity/AppleAuthSample/SampleScene.unity


+ 10 - 6
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -216,7 +216,7 @@ public class InfraredDemo : JCUnityLib.ViewBase
     //public ParamFloatValue saturation = new ParamFloatValue("ic_saturation", 1.0f);
     //public ParamFloatValue contrast = new ParamFloatValue("ic_contrast", 1.0f);
 
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
     //初始化纹理-1280*720,index = 0
     // public ParamFloatValue resoution = new ParamFloatValue("ic_resoution2", 0);
     //摄像机分辨率 -320*240,index = 10
@@ -458,7 +458,7 @@ public class InfraredDemo : JCUnityLib.ViewBase
     public void onResetUVCData()
     {
 
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         resetUVCData();
 #endif
 
@@ -638,7 +638,7 @@ public class InfraredDemo : JCUnityLib.ViewBase
 #if UNITY_STANDALONE_WIN || UNITY_EDITOR
             infraredCameraHelper.CreateToPc();
 #endif
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
             //开始时候设置一个默认分辨率
             Debug.Log("开始时候的分辨率下标:" + resoution.Get());
             Vector2 resoutionVec2 = SetDefByIndex((int)resoution.Get());
@@ -767,7 +767,7 @@ public class InfraredDemo : JCUnityLib.ViewBase
 
         //yield return new WaitForSeconds(1f);
         yield return new WaitForEndOfFrame();
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         initSlider(camera);
 
         camera.GetResolutionsStrs();
@@ -1318,6 +1318,10 @@ public class InfraredDemo : JCUnityLib.ViewBase
         System.IO.File.WriteAllBytes(path, bytes);
 
         Debug.Log($"Texture saved as: {path}");
+
+        //NativeGallery.SaveImageToGallery(path,"InfraredGame", $"{baseName}_{fileName}.png",(success,path)=> {
+        //    Debug.Log(success?$" 成功保存到相册: {path}" : "保存失败");
+        //});
     }
 
     //下面是处理对象放大缩小
@@ -1442,7 +1446,7 @@ public class InfraredDemo : JCUnityLib.ViewBase
     /// <param name="index"></param>
     public void resolutionRestartApp(int index)
     {
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         //StartCoroutine(RestartOrKillApp());
         //获取第一个分辨率设置后设置size
         switch (index)
@@ -1487,7 +1491,7 @@ public class InfraredDemo : JCUnityLib.ViewBase
     /// <param name="OnResolutionChanged">320x240</param>
     private void OnResolutionChanged(int index)
     {
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         Debug.Log("Selected Resolution: " + index);
         // 将选定的分辨率转换为实际的宽度和高度
         // 并且需要判断是否存在最低分辨率

+ 2 - 2
Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.cs

@@ -80,7 +80,7 @@ public class InfraredGuider : MonoBehaviour
     }
 
     public void enterInfraredResulutionGuider() {
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         Instantiate(infraredResulutionGuider);
 #endif
     }
@@ -103,7 +103,7 @@ public class InfraredGuider : MonoBehaviour
     /// </summary>
     public void enterInfraredLightGuider2()
     {
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         Instantiate(infraredLightGuider2);
 #endif
     }

+ 1 - 1
Assets/BowArrow/Modules/InfraredGuider/InfraredResolution.cs

@@ -15,7 +15,7 @@ public class InfraredResolution : MonoBehaviour
     int _index = 0;
     void Start()
     {
-#if UNITY_ANDROID
+#if UNITY_ANDROID ||UNITY_IOS
         if (InfraredDemo.running) {
             _index = (int)InfraredDemo._ins.resoution.Get();
         }

+ 5 - 1
Assets/BowArrow/Scripts/Editor/MenuChangeAppLanguage.cs

@@ -16,6 +16,8 @@ public class MenuChangeAppLanguage
         PlayerSettings.productName = CommonConfig.StandaloneModeOrPlatformB ? CommonConfig.AppNames[2]: CommonConfig.AppNames[0];
 #if UNITY_IOS
         PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, "com.xmjssvr.BowArrow");
+        PlayerSettings.iOS.appleDeveloperTeamID = "7M2LZ4HF3C";
+        PlayerSettings.iOS.appleEnableAutomaticSigning = true;
 #endif
 #if UNITY_ANDROID
         if (CommonConfig.StandaloneModeOrPlatformB)
@@ -27,7 +29,7 @@ public class MenuChangeAppLanguage
 
             PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xmjssvr.BowArrow.mi"); //com.xmjssvr.BowArrow
         }
- #endif
+#endif
         SetIosAppIcon(0);
     }
 
@@ -45,6 +47,8 @@ public class MenuChangeAppLanguage
         PlayerSettings.productName = CommonConfig.StandaloneModeOrPlatformB ? CommonConfig.AppNames[2] : CommonConfig.AppNames[1];
 #if UNITY_IOS
         PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, "com.xmjssvr.BowArrowEn");
+        PlayerSettings.iOS.appleDeveloperTeamID = "7M2LZ4HF3C";
+        PlayerSettings.iOS.appleEnableAutomaticSigning = true;
 #endif
 #if UNITY_ANDROID
         if (CommonConfig.StandaloneModeOrPlatformB)

+ 1 - 1
Assets/Game_Hyperspace/Script/ShootingEvent.cs

@@ -43,7 +43,7 @@ public class ShootingEvent : MonoBehaviour
 
     void LateUpdate()
     {
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         //if (limitAimInScrren) aimTransform.eulerAngles = LimitAngles(aimTransform.eulerAngles);
         //UpdateCrossHairPosition();
 #else

+ 61 - 336
Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface.cs

@@ -1,14 +1,6 @@
 using UnityEngine;
 using System;
-using System.Collections;
 using System.Runtime.InteropServices;
-using SLAMUVC;
-using UnityEngine.UI;
-using System.Collections.Generic;
-using AOT;
-using System.Threading;
-using UnityEngine.Events;
-using UnityEngine.Android;
 
 namespace SLAMUVC
 {
@@ -49,8 +41,8 @@ namespace SLAMUVC
 	public enum CameraMirror
 	{
 		NONE,
-		HORIZONTAL,//水平
-		VERTICAL//垂直翻
+		HORIZONTAL,//水平锟斤拷
+		VERTICAL//锟斤拷直锟斤拷
 	}
 	public enum UVCCameraPixelFormat
 	{
@@ -62,364 +54,97 @@ namespace SLAMUVC
 		PIXEL_FORMAT_RGB565,
 		PIXEL_FORMAT_RGBX
 	}
-	//UVC的管理类
-	public class UVCInterface : MonoBehaviour
+	public enum CameraStatus
 	{
-		private const string UVC_MANAGER = "com.slambb.myuvc.MyUVCManager";
-		//java对象
-		private AndroidJavaObject uvcManagerObj = null;
+		Stopped = 0,                // 鎽勫儚澶村仠姝�
+		Started = 1,                // 鎽勫儚澶村惎鍔�
+		Connecting = 2,             // 杩炴帴璁惧�涓�
+		Active = 3,                 // UI 婵€娲�
+		Idle = 4,                   // UI 绌洪棽
+		Scanning = 5,               // 纭�欢鎵�弿涓�
+		NoDevice = 6,               // 鏃犺�澶�
+		ResolutionChanged = 7,      // 鍒嗚鲸鐜囦慨鏀�
+		RenderUpdate = 8,           // 娓叉煋鏇存柊
+	}
+	//UVC锟侥癸拷锟斤拷锟斤拷
+	public abstract class UVCInterface : MonoBehaviour
+	{
+		// 鍒濆�鍖栫浉鏈�
+		public abstract void InitCamera(int width, int height);
 
-		CameraFormat mCameraFormat = CameraFormat.MJPEG;
-		CameraMirror mCameraMirror = CameraMirror.VERTICAL;//默认垂直
-		int Width = 1280;
-		int Height = 720;
-		Texture2D _cameraTexture;
-		public Texture2D CameraTexture => _cameraTexture;
+		// 鎵撳紑鐩告満
+		public abstract void OpenCamera();
 
-		private UVCCtrl[] uvcCtrls;
-		public UVCCtrl[] UVCCtrls => uvcCtrls;
+		// 鍏抽棴鐩告満
+		public abstract void CloseCamera();
 
+		// 鏀瑰彉鐩告満鍒嗚鲸鐜�
+		public abstract void ChangeCameraInfo(int width, int height);
 
-		private SynchronizationContext mainContext;
+		// 鏀瑰彉鐩告満鍒嗚鲸鐜囧洖璋�
+		public abstract void ChangeCameraInfoCallback(int width, int height);
+		// 鑾峰彇鏀�寔鐨勫垎杈ㄧ巼鍒楄〃
+		public abstract string[] GetSupportedResolutions();
 
-		/// <summary>
-		/// 初始化相机权限成功
-		/// </summary>
-		public CameraPermissionHandle systemCameraPermissionHandle;
-		public delegate void CameraPermissionHandle();
-		/// <summary>
-		/// 纹理更新事件
-		/// </summary>
-		public CameraTextureHandle cameraTextureHandle;
-		public delegate void CameraTextureHandle();
+		// 鑾峰彇 UVC 鎺у埗鍒楄〃锛堝�浜�害銆佸�姣斿害绛夋帶鍒跺姛鑳斤級
+		public abstract string GetUvcCtrlList();
 
+		// 鎺у埗浜�害
+		public abstract void SetBrightness(int value);
 
+		// 鎺у埗瀵规瘮搴�
+		public abstract void SetContrast(int value);
 
-		private static readonly string ActivityClassName = "com.slambb.myuvc.UsbPermissionActivity";
+		// 璁剧疆 UVC 鎺у埗鍔熻兘鐨勫€硷紙濡備寒搴︺€佸�姣斿害锛�
+		public abstract int SetCtrlValue(string type, int value);
 
-		//public void RequestUsbPermission()
-		//{
-		//	using (AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
-		//	{
-		//		AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
-		//		AndroidJavaClass usbPermissionActivity = new AndroidJavaClass(ActivityClassName);
+		//
+		public abstract void FlipHorizontally();
 
-		//		// Start UsbPermissionActivity
-		//		activity.Call("startActivity", usbPermissionActivity.CallStatic<AndroidJavaObject>("newIntent", activity));
-		//	}
-		//}
+		//
+		public abstract void FlipVertically();
 
-		void Awake()
-		{
-			try
-			{
-				// 创建 uvcManagerObj 对象
-				uvcManagerObj = new AndroidJavaObject(UVC_MANAGER);
+		//閲嶇疆鍙傛暟
+		public abstract void resetControlParams();
 
-			}
-			catch (Exception e)
-			{
-				Debug.LogError("UVC_MANAGER Exception: " + e.Message);
-			}
+		public abstract bool GetIsPreviewing();
 
-			//RequestUsbPermission();
-		}
+		public abstract void OnTextureUpdate(int width, int height, bool bUpdate);
 
-		void Start()
-		{
 
-			OpenCameraPermisson();
-		}
+		// 鐩告満绾圭悊
+		public abstract Texture2D CameraTexture { get; }
 
-		private void OnDestroy()
-		{
-			Remove(this);
-			uvcManagerObj.Call("clearCameraHelper");
+		// UVC灞炴€�
+		public abstract UVCCtrl[] UVCCtrls { get; }
 
-		}
-		/// <summary>
-		/// 创建一个纹理id到插件
-		/// </summary>
-		private void CreateTextureAndPassToPlugin()
-		{
-			// 销毁纹理
-			if (_cameraTexture != null)
-			{
-				Destroy(_cameraTexture);
-				_cameraTexture = null;
-			}
-			// Create a texture
-			Texture2D tex = new Texture2D(Width, Height, TextureFormat.ARGB32, false);
-			// 设置点过滤,以便我们可以清楚地看到像素
-			tex.filterMode = FilterMode.Point;
-			// 调用Apply(),使其实际上传到GPU
-			tex.Apply();
-			_cameraTexture = tex;
-			//将纹理指针传递给插件
-			SetTexture(tex.GetNativeTexturePtr(), tex.width, tex.height);
-
-			cameraTextureHandle?.Invoke();
-		}
-		//private IEnumerator CallPluginAtEndOfFrames()
-		//{
-		//	while (true)
-		//	{
-		//		//等待所有帧渲染完成
-		//		yield return new WaitForEndOfFrame();
-		//		//发出具有任意整数标识符的插件事件。
-		//		//该插件可以区分不同的
-		//		//它需要根据这个ID做的事情。
-		//		//对于我们的简单插件,我们在这里传递哪个ID并不重要。
-		//		if(GetIsPreviewing()) GL.IssuePluginEvent(GetRenderEventFunc(), 1);
-		//	}
-		//}
+		// 杩囧害鍒嗚鲸鐜�
+		public abstract int[] tempCameraSize { get; }
 		/// <summary>
-		/// 更新纹理
+		/// 鎽勫儚澶存潈闄愭垚鍔熶簨浠�
 		/// </summary>
-		/// <param name="width"></param>
-		/// <param name="height"></param>
-		/// <param name="bUpdate"></param>
-		public void OnTextureUpdate(int width, int height, bool bUpdate)
-		{
-
-			mainContext.Post(__ =>
-			{
-				if (bUpdate)
-				{
-					Debug.Log("创建新纹理:size=[" + width + "," + height + "]");
-					Width = width;
-					Height = height;
-					CreateTextureAndPassToPlugin();
-				}
-				else
-				{
-					GL.IssuePluginEvent(GetRenderEventFunc(), 1);
-				}
-
-			}, null);
-		}
-		public bool GetIsPreviewing()
-		{
-			if (uvcManagerObj != null)
-			{
-				if (uvcManagerObj.Call<int>("GetIsPreviewing") == 1)
-				{
-					return true;
-				}
-			}
+		public event Action systemCameraPermissionHandle;
 
-			return false;
-		}
 		/// <summary>
-		/// 初始化相机和对应的操作,初始化后会自动打开相机
+		/// 鎽勫儚澶寸汗鐞嗘洿鏂颁簨浠�
 		/// </summary>
-		/// <param name="width"></param>
-		/// <param name="height"></param>
-		public void InitCamera(int width, int height)
-		{
-			Width = width;
-			Height = height;
-			uvcManagerObj.Call("initCameraHelper", Width, Height, mCameraFormat.ToString(), mCameraMirror.ToString());
-			//主线程
-			mainContext = SynchronizationContext.Current;
-			//注册c回调
-			Add(this);
-			//mainContext.Post(__ =>
-			//{
-			//	//CreateTextureAndPassToPlugin();
-			//}, null);
-			//StartCoroutine("CallPluginAtEndOfFrames");
-		}
-
-		public void OpenCamera()
-		{
-			uvcManagerObj.Call("OpenCamera");
-		}
-		public void CloseCamera()
-		{
-			uvcManagerObj.Call("CloseCamera");
-		}
-		public void ChangeCameraInfo(int width, int height)
-		{
-			uvcManagerObj.Call("ChangeCameraInfo", width, height, mCameraFormat.ToString());
-		}
-		public string[] GetSupportedResolutions()
-		{
-			if (uvcManagerObj != null)
-			{
-				var objPtr = uvcManagerObj.Call<AndroidJavaObject>("GetSupportedResolutions").GetRawObject();
-
-				if (objPtr != IntPtr.Zero)
-					return AndroidJNIHelper.ConvertFromJNIArray<string[]>(objPtr);
-			}
-
-			return null;
-		}
+		public event Action cameraTextureHandle;
 
 		/// <summary>
-		/// 水平翻转
+		/// 瑙﹀彂鎽勫儚澶存潈闄愭垚鍔熶簨浠讹紙渚涘瓙绫昏皟鐢�級
 		/// </summary>
-		public void FlipHorizontally()
+		public void OnCameraPermissionGranted()
 		{
-			uvcManagerObj.Call("FlipHorizontally");
+			systemCameraPermissionHandle?.Invoke();
 		}
 
 		/// <summary>
-		/// 垂直翻转
+		/// 瑙﹀彂鎽勫儚澶寸汗鐞嗘洿鏂颁簨浠讹紙渚涘瓙绫昏皟鐢�級
 		/// </summary>
-		public void FlipVertically()
-		{
-			uvcManagerObj.Call("FlipVertically");
-		}
-		public void resetControlParams()
-		{
-			uvcManagerObj.Call("resetControlParams");
-		}
-		public void GetUvcCtrlList()
+		public void OnCameraTextureUpdated()
 		{
-
-			if (uvcManagerObj != null)
-			{
-				string json = uvcManagerObj.Call<string>("GetUvcCtrlList");
-
-				UVCCtrlWrapper wrapper = JsonUtility.FromJson<UVCCtrlWrapper>("{\"uvcCtrls\":" + json + "}");
-				if (wrapper != null && wrapper.uvcCtrls != null)
-				{
-
-					//赋值
-					uvcCtrls = wrapper.uvcCtrls;
-
-					//foreach (UVCCtrl ctrl in wrapper.uvcCtrls)
-					//{
-					//	Debug.Log($"name:{ctrl.name}, isAuto: {ctrl.isAuto}, isEnable: {ctrl.isEnable}, limit: {string.Join(", ", ctrl.limit)}, value: {ctrl.value}");
-					//}
-				}
-				else
-				{
-					Debug.LogError("Failed to parse JSON data.");
-				}
-			}
-
-
-		}
-		public void SetBrightness(int value)
-		{
-			uvcManagerObj.Call("SetBrightness", value);
-		}
-		public void SetContrast(int value)
-		{
-			uvcManagerObj.Call("SetContrast", value);
-		}
-
-		public int SetCtrlValue(string type, Int32 value)
-		{
-			int result = -1;
-			if (type == "PU_BRIGHTNESS")
-			{
-				uvcManagerObj.Call("SetBrightness", value);
-				result = 0;
-			}
-			else if (type == "PU_CONTRAST")
-			{
-				uvcManagerObj.Call("SetContrast", value);
-				result = 0;
-			}
-			return result;
-		}
-
-		//--------------------------------------------------------------------------------
-		/**
-		 * 先处理相机权限
-		*/
-		private void OpenCameraPermisson()
-		{
-
-			if (Permission.HasUserAuthorizedPermission(Permission.Camera))
-			{
-				//Debug.LogError("HasUserAuthorizedPermission!");
-				systemCameraPermissionHandle?.Invoke();
-				return;
-			}
-
-			bool useCallbacks = true;
-			if (!useCallbacks)
-			{
-				// We do not have permission to use the microphone.
-				// Ask for permission or proceed without the functionality enabled.
-				Permission.RequestUserPermission(Permission.Camera);
-			}
-			else
-			{
-				var callbacks = new PermissionCallbacks();
-				callbacks.PermissionDenied += PermissionCallbacks_PermissionDenied;
-				callbacks.PermissionGranted += PermissionCallbacks_PermissionGranted;
-				callbacks.PermissionDeniedAndDontAskAgain += PermissionCallbacks_PermissionDeniedAndDontAskAgain;
-				Permission.RequestUserPermission(Permission.Camera, callbacks);
-			}
-		}
-
-
-		void PermissionCallbacks_PermissionDenied(string PermissionName)
-		{
-			Debug.LogError($"PermissionCallbacks_PermissionDenied[{PermissionName}]");
-		}
-
-		//本次允许
-		void PermissionCallbacks_PermissionGranted(string PermissionName)
-		{
-			Debug.Log($"PermissionCallbacks_PermissionGranted[{PermissionName}]");
-			systemCameraPermissionHandle?.Invoke();
-		}
-		void PermissionCallbacks_PermissionDeniedAndDontAskAgain(string PermissionName)
-		{
-			Debug.Log($"PermissionCallbacks_PermissionDeniedAndDontAskAgain[{PermissionName}]");
-			systemCameraPermissionHandle?.Invoke();
-		}
-
-		//设置GL纹理
-		[DllImport("TransferTexture")]
-		private static extern void SetTexture(IntPtr texture, int w, int h);
-		//GL渲染事件
-		[DllImport("TransferTexture")]
-		private static extern IntPtr GetRenderEventFunc();
-
-
-		[UnmanagedFunctionPointer(CallingConvention.StdCall)]
-		public delegate void TextureUpdateDelegate(Int32 id, int width, int height, bool bUpdate);
-
-		[DllImport("TransferTexture")]
-		private static extern void RegisterTextureUpdateCallback(Int32 id, TextureUpdateDelegate callback);
-		[DllImport("TransferTexture")]
-		private static extern void UnregisterTextureUpdateCallback(Int32 id, TextureUpdateDelegate callback);
-		//记录MyUVCInterface
-		private static Dictionary<Int32, UVCInterface> mUVCInterfaces = new Dictionary<Int32, UVCInterface>();
-
-		private static TextureUpdateDelegate textureUpdateDelegate;
-		//注册回调事件
-		public static void Add(UVCInterface myUVCInterface)
-		{
-			Int32 id = myUVCInterface.GetHashCode();
-			textureUpdateDelegate = new TextureUpdateDelegate(TextureUpdateHandler);
-			mUVCInterfaces.Add(id, myUVCInterface);
-			RegisterTextureUpdateCallback(id, textureUpdateDelegate);
-		}
-		//移除回调事件
-		public static void Remove(UVCInterface myUVCInterface)
-		{
-			Int32 id = myUVCInterface.GetHashCode();
-			UnregisterTextureUpdateCallback(id, textureUpdateDelegate);
-			mUVCInterfaces.Remove(id);
-		}
-		//数据更新时候回调
-		[MonoPInvokeCallback(typeof(TextureUpdateDelegate))]
-		private static void TextureUpdateHandler(Int32 id, int width, int height, bool bUpdate)
-		{
-			var myUVCInterface = mUVCInterfaces.ContainsKey(id) ? mUVCInterfaces[id] : null;
-			if (myUVCInterface != null)
-			{
-				myUVCInterface.OnTextureUpdate(width, height, bUpdate);
-			}
+			cameraTextureHandle?.Invoke();
 		}
 
 	}
-}
+}

+ 388 - 0
Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_Android.cs

@@ -0,0 +1,388 @@
+using UnityEngine;
+using System;
+using System.Collections;
+using System.Runtime.InteropServices;
+using SLAMUVC;
+using UnityEngine.UI;
+using System.Collections.Generic;
+using AOT;
+using System.Threading;
+using UnityEngine.Events;
+using UnityEngine.Android;
+
+namespace SLAMUVC
+{
+	
+	//UVC������
+	public class UVCInterface_Android : UVCInterface
+	{
+		private const string UVC_MANAGER = "com.slambb.myuvc.MyUVCManager";
+		//java����
+		private AndroidJavaObject uvcManagerObj = null;
+
+		CameraFormat mCameraFormat = CameraFormat.MJPEG;
+		CameraMirror mCameraMirror = CameraMirror.VERTICAL;//Ĭ�ϴ�ֱ
+		int Width = 1280;
+		int Height = 720;
+		Texture2D _cameraTexture;
+		public override Texture2D CameraTexture => _cameraTexture;
+
+		private UVCCtrl[] uvcCtrls;
+		public override UVCCtrl[] UVCCtrls => uvcCtrls;
+
+		//修改时候的分辨率
+		int[] tempSize = new int[2] { 1280, 720 };
+		public override int[] tempCameraSize => tempSize;
+
+		private SynchronizationContext mainContext;
+
+		///// <summary>
+		///// ��ʼ�����Ȩ�޳ɹ�
+		///// </summary>
+		//public CameraPermissionHandle systemCameraPermissionHandle;
+		//public void CameraPermissionHandle();
+		///// <summary>
+		///// ��������¼�
+		///// </summary>
+		//public CameraTextureHandle cameraTextureHandle;
+		//public  void CameraTextureHandle();
+
+
+
+		private static readonly string ActivityClassName = "com.slambb.myuvc.UsbPermissionActivity";
+
+		//public void RequestUsbPermission()
+		//{
+		//	using (AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
+		//	{
+		//		AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
+		//		AndroidJavaClass usbPermissionActivity = new AndroidJavaClass(ActivityClassName);
+
+		//		// Start UsbPermissionActivity
+		//		activity.Call("startActivity", usbPermissionActivity.CallStatic<AndroidJavaObject>("newIntent", activity));
+		//	}
+		//}
+
+		void Awake()
+		{
+			try
+			{
+				// ���� uvcManagerObj ����
+				uvcManagerObj = new AndroidJavaObject(UVC_MANAGER);
+
+			}
+			catch (Exception e)
+			{
+				Debug.LogError("UVC_MANAGER Exception: " + e.Message);
+			}
+
+			//RequestUsbPermission();
+		}
+
+		void Start()
+		{
+
+			OpenCameraPermisson();
+
+		}
+
+		private void OnDestroy()
+		{
+			Remove(this);
+			uvcManagerObj.Call("clearCameraHelper");
+
+		}
+		/// <summary>
+		/// ����һ������id�����
+		/// </summary>
+		private void CreateTextureAndPassToPlugin()
+		{
+			// ��������
+			if (_cameraTexture != null)
+			{
+				Destroy(_cameraTexture);
+				_cameraTexture = null;
+			}
+			// Create a texture
+			Texture2D tex = new Texture2D(Width, Height, TextureFormat.ARGB32, false);
+			// ���õ���ˣ��Ա����ǿ�������ؿ�������
+			tex.filterMode = FilterMode.Point;
+			// ����Apply()��ʹ��ʵ���ϴ���GPU
+			tex.Apply();
+			_cameraTexture = tex;
+			//������ָ�봫�ݸ����
+			SetTexture(tex.GetNativeTexturePtr(), tex.width, tex.height);
+
+			//cameraTextureHandle?.Invoke();
+			OnCameraTextureUpdated();
+		}
+		//private IEnumerator CallPluginAtEndOfFrames()
+		//{
+		//	while (true)
+		//	{
+		//		//�ȴ�����֡��Ⱦ���
+		//		yield return new WaitForEndOfFrame();
+		//		//������������������ʶ���IJ���¼���
+		//		//�ò���������ֲ�ͬ��
+		//		//����Ҫ�������ID�������顣
+		//		//�������ǵļ򵥲�������������ﴫ���ĸ�ID������Ҫ��
+		//		if(GetIsPreviewing()) GL.IssuePluginEvent(GetRenderEventFunc(), 1);
+		//	}
+		//}
+		/// <summary>
+		/// ��������
+		/// </summary>
+		/// <param name="width"></param>
+		/// <param name="height"></param>
+		/// <param name="bUpdate"></param>
+		public override void OnTextureUpdate(int width, int height, bool bUpdate)
+		{
+
+			mainContext.Post(__ =>
+			{
+				if (bUpdate)
+				{
+					Debug.Log("�����������size=[" + width + "," + height + "]");
+					Width = width;
+					Height = height;
+					CreateTextureAndPassToPlugin();
+				}
+				else
+				{
+					GL.IssuePluginEvent(GetRenderEventFunc(), 1);
+				}
+
+			}, null);
+		}
+		public override bool GetIsPreviewing()
+		{
+			if (uvcManagerObj != null)
+			{
+				if (uvcManagerObj.Call<int>("GetIsPreviewing") == 1)
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+		/// <summary>
+		/// ��ʼ������Ͷ�Ӧ�IJ�������ʼ������Զ������
+		/// </summary>
+		/// <param name="width"></param>
+		/// <param name="height"></param>
+		public override void InitCamera(int width, int height)
+		{
+			Width = width;
+			Height = height;
+			uvcManagerObj.Call("initCameraHelper", Width, Height, mCameraFormat.ToString(), mCameraMirror.ToString());
+			//���߳�
+			mainContext = SynchronizationContext.Current;
+			//ע��c�ص�
+			Add(this);
+			//mainContext.Post(__ =>
+			//{
+			//	//CreateTextureAndPassToPlugin();
+			//}, null);
+			//StartCoroutine("CallPluginAtEndOfFrames");
+		}
+
+		public override void OpenCamera()
+		{
+			uvcManagerObj.Call("OpenCamera");
+		}
+		public override void CloseCamera()
+		{
+			uvcManagerObj.Call("CloseCamera");
+		}
+		public override void ChangeCameraInfo(int width, int height)
+		{
+			uvcManagerObj.Call("ChangeCameraInfo", width, height, mCameraFormat.ToString());
+		}
+		public override string[] GetSupportedResolutions()
+		{
+			if (uvcManagerObj != null)
+			{
+				var objPtr = uvcManagerObj.Call<AndroidJavaObject>("GetSupportedResolutions").GetRawObject();
+
+				if (objPtr != IntPtr.Zero)
+					return AndroidJNIHelper.ConvertFromJNIArray<string[]>(objPtr);
+			}
+
+			return null;
+		}
+
+		/// <summary>
+		/// ˮƽ��ת
+		/// </summary>
+		public override void FlipHorizontally()
+		{
+			uvcManagerObj.Call("FlipHorizontally");
+		}
+
+		/// <summary>
+		/// ��ֱ��ת
+		/// </summary>
+		public override void FlipVertically()
+		{
+			uvcManagerObj.Call("FlipVertically");
+		}
+		public override void resetControlParams()
+		{
+			uvcManagerObj.Call("resetControlParams");
+		}
+		public override string GetUvcCtrlList()
+		{
+
+			if (uvcManagerObj != null)
+			{
+				string json = uvcManagerObj.Call<string>("GetUvcCtrlList");
+
+				UVCCtrlWrapper wrapper = JsonUtility.FromJson<UVCCtrlWrapper>("{\"uvcCtrls\":" + json + "}");
+				if (wrapper != null && wrapper.uvcCtrls != null)
+				{
+
+					//��ֵ
+					uvcCtrls = wrapper.uvcCtrls;
+
+					//foreach (UVCCtrl ctrl in wrapper.uvcCtrls)
+					//{
+					//	Debug.Log($"name:{ctrl.name}, isAuto: {ctrl.isAuto}, isEnable: {ctrl.isEnable}, limit: {string.Join(", ", ctrl.limit)}, value: {ctrl.value}");
+					//}
+				}
+				else
+				{
+					Debug.LogError("Failed to parse JSON data.");
+				}
+			}
+			return "";
+
+		}
+		public override void SetBrightness(int value)
+		{
+			uvcManagerObj.Call("SetBrightness", value);
+		}
+		public override void SetContrast(int value)
+		{
+			uvcManagerObj.Call("SetContrast", value);
+		}
+
+		public override int SetCtrlValue(string type, Int32 value)
+		{
+			int result = -1;
+			if (type == "PU_BRIGHTNESS")
+			{
+				uvcManagerObj.Call("SetBrightness", value);
+				result = 0;
+			}
+			else if (type == "PU_CONTRAST")
+			{
+				uvcManagerObj.Call("SetContrast", value);
+				result = 0;
+			}
+			return result;
+		}
+
+		//--------------------------------------------------------------------------------
+		/**
+		 * �ȴ������Ȩ��
+		*/
+		private void OpenCameraPermisson()
+		{
+
+			if (Permission.HasUserAuthorizedPermission(Permission.Camera))
+			{
+				Debug.LogError("HasUserAuthorizedPermission��");
+				//systemCameraPermissionHandle?.Invoke();
+				OnCameraPermissionGranted();
+				return;
+			}
+
+			bool useCallbacks = true;
+			if (!useCallbacks)
+			{
+				// We do not have permission to use the microphone.
+				// Ask for permission or proceed without the functionality enabled.
+				Permission.RequestUserPermission(Permission.Camera);
+			}
+			else
+			{
+				var callbacks = new PermissionCallbacks();
+				callbacks.PermissionDenied += PermissionCallbacks_PermissionDenied;
+				callbacks.PermissionGranted += PermissionCallbacks_PermissionGranted;
+				callbacks.PermissionDeniedAndDontAskAgain += PermissionCallbacks_PermissionDeniedAndDontAskAgain;
+				Permission.RequestUserPermission(Permission.Camera, callbacks);
+			}
+		}
+
+
+		void PermissionCallbacks_PermissionDenied(string PermissionName)
+		{
+			Debug.LogError($"PermissionCallbacks_PermissionDenied[{PermissionName}]");
+		}
+
+		//��������
+		void PermissionCallbacks_PermissionGranted(string PermissionName)
+		{
+			Debug.Log($"PermissionCallbacks_PermissionGranted[{PermissionName}]");
+			//systemCameraPermissionHandle?.Invoke();
+			OnCameraPermissionGranted();
+		}
+		void PermissionCallbacks_PermissionDeniedAndDontAskAgain(string PermissionName)
+		{
+			Debug.Log($"PermissionCallbacks_PermissionDeniedAndDontAskAgain[{PermissionName}]");
+			//systemCameraPermissionHandle?.Invoke();
+			OnCameraPermissionGranted();
+		}
+
+		//����GL����
+		[DllImport("TransferTexture")]
+		private static extern void SetTexture(IntPtr texture, int w, int h);
+		//GL��Ⱦ�¼�
+		[DllImport("TransferTexture")]
+		private static extern IntPtr GetRenderEventFunc();
+
+
+		[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+		public delegate void TextureUpdateDelegate(Int32 id, int width, int height, bool bUpdate);
+
+		[DllImport("TransferTexture")]
+		private static extern void RegisterTextureUpdateCallback(Int32 id, TextureUpdateDelegate callback);
+		[DllImport("TransferTexture")]
+		private static extern void UnregisterTextureUpdateCallback(Int32 id, TextureUpdateDelegate callback);
+		//��¼MyUVCInterface
+		private static Dictionary<Int32, UVCInterface> mUVCInterfaces = new Dictionary<Int32, UVCInterface>();
+
+		private static TextureUpdateDelegate textureUpdateDelegate;
+		//ע��ص��¼�
+		public static void Add(UVCInterface myUVCInterface)
+		{
+			Int32 id = myUVCInterface.GetHashCode();
+			textureUpdateDelegate = new TextureUpdateDelegate(TextureUpdateHandler);
+			mUVCInterfaces.Add(id, myUVCInterface);
+			RegisterTextureUpdateCallback(id, textureUpdateDelegate);
+		}
+		//�Ƴ��ص��¼�
+		public static void Remove(UVCInterface myUVCInterface)
+		{
+			Int32 id = myUVCInterface.GetHashCode();
+			UnregisterTextureUpdateCallback(id, textureUpdateDelegate);
+			mUVCInterfaces.Remove(id);
+		}
+		//���ݸ���ʱ��ص�
+		[MonoPInvokeCallback(typeof(TextureUpdateDelegate))]
+		private static void TextureUpdateHandler(Int32 id, int width, int height, bool bUpdate)
+		{
+			var myUVCInterface = mUVCInterfaces.ContainsKey(id) ? mUVCInterfaces[id] : null;
+			if (myUVCInterface != null)
+			{
+				myUVCInterface.OnTextureUpdate(width, height, bUpdate);
+			}
+		}
+
+        public override void ChangeCameraInfoCallback(int width, int height)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 11 - 0
Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_Android.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 99d28997f3efc0a43b15caf5108eb73c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 350 - 0
Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_IOS.cs

@@ -0,0 +1,350 @@
+using System;
+using UnityEngine;
+using System.Runtime.InteropServices;
+using System.Collections;
+using UnityEngine.Rendering;
+using AOT;
+using System.Collections.Generic;
+using UnityEngine.Events;
+
+namespace SLAMUVC
+{
+    //public class MonoPInvokeCallbackAttribute : Attribute { }
+    //UVC������
+    public class UVCInterface_IOS : UVCInterface
+    {
+        // 导入iOS插件中的方法
+        [DllImport("__Internal")]
+        private static extern void Lib_InitCamera(int w, int h, [MarshalAs(UnmanagedType.LPStr)] string format, [MarshalAs(UnmanagedType.LPStr)] string mirror);
+
+        [DllImport("__Internal")]
+        static extern IntPtr GetTextureUpdateCallback();
+
+        [DllImport("__Internal")]
+        private static extern void Lib_OpenCamera();
+
+        [DllImport("__Internal")]
+        private static extern void Lib_CloseCamera();
+
+        [DllImport("__Internal")]
+        private static extern void Lib_SetCameraMirror([MarshalAs(UnmanagedType.LPStr)] string mirror);
+
+        [DllImport("__Internal")]
+        private static extern void Lib_SetBrightness(float brightness);
+
+        [DllImport("__Internal")]
+        private static extern void Lib_SetContrast(float contrast);
+
+        [DllImport("__Internal")]
+        private static extern void Lib_SetSaturation(float saturation);
+
+        [DllImport("__Internal")]
+        private static extern void Lib_ResetControlParams();
+
+        [DllImport("__Internal")]
+        private static extern IntPtr Lib_GetUvcCtrlList();
+
+        [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
+        private static extern IntPtr Lib_GetSupportedResolutions(out int count);
+        [DllImport("__Internal")]
+        private static extern void Lib_FreeResolutions(IntPtr resArray, int count);
+
+        [DllImport("__Internal")]
+        private static extern void Lib_ChangeCameraInfo(int width, int height, [MarshalAs(UnmanagedType.LPStr)] string format);
+
+        [DllImport("__Internal")]
+        private static extern bool Lib_GetIsPreviewing();
+
+        // 定义 C# 回调函数委托
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        public delegate void CameraCallback(int id, int status);
+
+        // 用于存储 UVC 接口实例
+        private static Dictionary<int, UVCInterface> mUVCInterfaces = new Dictionary<int, UVCInterface>();
+
+        // 用于持有回调,防止 GC 清理
+        private static CameraCallback CameraCallbackDelegate;
+
+        // ✅ 确保 C# 代码和 iOS 端方法匹配
+        [DllImport("__Internal")]
+        private static extern void RegisterCameraCallback(int id, CameraCallback callback);
+
+        [DllImport("__Internal")]
+        private static extern void UnregisterCameraCallback(int id);
+
+
+        public static void Add(UVCInterface myUVCInterface)
+        {
+            int id = myUVCInterface.GetHashCode();
+            if (mUVCInterfaces.ContainsKey(id)) return;
+
+            mUVCInterfaces.Add(id, myUVCInterface);
+
+            // ✅ 这里要存储委托,防止 GC 清理
+            CameraCallbackDelegate = OnCameraStatusChanged;
+            RegisterCameraCallback(id, CameraCallbackDelegate);
+
+        }
+
+        public static void Remove(UVCInterface myUVCInterface)
+        {
+            int id = myUVCInterface.GetHashCode();
+            if (!mUVCInterfaces.ContainsKey(id)) return;
+
+            UnregisterCameraCallback(id);
+            mUVCInterfaces.Remove(id);
+        }
+
+        // ✅ 添加 MonoPInvokeCallback,防止崩溃
+        [MonoPInvokeCallback(typeof(CameraCallback))]
+        private static void OnCameraStatusChanged(int id, int status)
+        {
+            if (mUVCInterfaces.TryGetValue(id, out UVCInterface myUVCInterface))
+            {
+                CameraStatus cameraStatus = (CameraStatus)status;
+                switch (cameraStatus)
+                {
+                    case CameraStatus.Active:
+                        Debug.Log($"[Unity] 摄像头状态更新: {cameraStatus}");
+                        myUVCInterface.GetUvcCtrlList();
+                        myUVCInterface.GetSupportedResolutions();
+                        myUVCInterface.OnCameraTextureUpdated();
+                        break;
+
+                    case CameraStatus.ResolutionChanged:
+                        Debug.Log($"[Unity] 摄像头状态更新: {cameraStatus}");
+                        myUVCInterface.ChangeCameraInfoCallback(myUVCInterface.tempCameraSize[0], myUVCInterface.tempCameraSize[1]);
+                        break;
+
+                    case CameraStatus.RenderUpdate:
+                        myUVCInterface.OnTextureUpdate(myUVCInterface.tempCameraSize[0], myUVCInterface.tempCameraSize[1], true);
+                        break;
+                }
+            }
+        }
+
+        Texture2D _cameraTexture;
+        public override Texture2D CameraTexture => _cameraTexture;
+
+        private UVCCtrl[] uvcCtrls;
+        public override UVCCtrl[] UVCCtrls => uvcCtrls;
+        //修改时候的分辨率
+        int[] tempSize = new int[2] { 1280, 720 };
+        public override int[] tempCameraSize => tempSize;
+        CommandBuffer _command;
+        CameraFormat mCameraFormat = CameraFormat.MJPEG;
+        CameraMirror mCameraMirror = CameraMirror.NONE;
+
+        public UnityEvent<bool> updateUVCManager;
+
+        /// <summary>
+        /// 更新纹理
+        /// </summary>
+        /// <param name="newWidth"></param>
+        /// <param name="newHeight"></param>
+        /// <param name="isInit"></param>
+        void UpdateCameraTexture(int newWidth, int newHeight, bool isInit = true)
+        {
+            // 销毁旧纹理
+            if (_cameraTexture != null)
+            {
+                Destroy(_cameraTexture);
+                _cameraTexture = null;
+            }
+
+            // 重新创建新的纹理
+            _cameraTexture = new Texture2D(newWidth, newHeight, TextureFormat.BGRA32, false);
+            _cameraTexture.filterMode = FilterMode.Point;
+            _cameraTexture.Apply();
+
+
+            if (isInit)
+            {
+                tempSize = new int[2] { newWidth, newHeight };
+                Debug.Log($"[Unity] 重新获取 " + tempSize[0] + "=" + tempSize[1]);
+                // 重新初始化 Camera
+                string format = mCameraFormat == CameraFormat.MJPEG ? "MJPEG" : "YUV";
+                string mirror = mCameraMirror == CameraMirror.NONE ? "NONE" :
+                                mCameraMirror == CameraMirror.HORIZONTAL ? "HORIZONTAL" : "VERTICAL";
+                Lib_InitCamera(_cameraTexture.width, _cameraTexture.height, format, mirror);
+            }
+
+        }
+
+        private void Awake()
+        {
+            Add(this);
+        }
+        private void Start()
+        {
+            OnCameraPermissionGranted();
+        }
+
+        void OnDestroy()
+        {
+            Remove(this);
+            if (_command != null)
+            {
+                _command.Dispose();
+                _command = null;
+            }
+            if (_cameraTexture != null)
+            {
+                Destroy(_cameraTexture);
+                _cameraTexture = null;
+            }
+        }
+
+        public override void InitCamera(int width, int height)
+        {
+            Debug.Log($"[Unity] InitCamera Texture1 : " + width + "=" + height);
+            if (_command == null) _command = new CommandBuffer();
+            UpdateCameraTexture(width, height);
+            Debug.LogWarning("初始化 texture 成功!.");
+        }
+
+        public override void OpenCamera()
+        {
+            Lib_OpenCamera();
+        }
+
+        public override void CloseCamera()
+        {
+            Lib_CloseCamera();
+        }
+
+        public override void ChangeCameraInfo(int width, int height)
+        {
+            string format = mCameraFormat == CameraFormat.MJPEG ? "MJPEG" : "YUV";
+            tempSize = new int[2] { width, height };
+            Debug.Log($"[Unity]  ChangeCameraInfo:" + tempSize[0] + "=" + tempSize[1]);
+            Lib_ChangeCameraInfo(width, height, format);
+        }
+
+        public override void ChangeCameraInfoCallback(int width, int height)
+        {
+            Debug.Log($"[Unity] ChangeCameraInfoCallback Texture1 : " + width + "=" + height);
+            if (_command == null) _command = new CommandBuffer();
+            UpdateCameraTexture(width, height, false);
+            OnCameraTextureUpdated();
+        }
+
+        public override string[] GetSupportedResolutions()
+        {
+            int count = 0;
+            IntPtr resPtr = Lib_GetSupportedResolutions(out count);
+
+            if (count == 0 || resPtr == IntPtr.Zero)
+            {
+                Debug.LogError("[Unity] GetSupportedResolutions 失败: count=0 或 resPtr 为 null");
+                return new string[0];
+            }
+
+            string[] resolutions = new string[count];
+            IntPtr[] ptrArray = new IntPtr[count];
+            Marshal.Copy(resPtr, ptrArray, 0, count);
+
+            for (int i = 0; i < count; i++)
+            {
+                resolutions[i] = Marshal.PtrToStringAnsi(ptrArray[i]);
+            }
+
+            // 释放 C 端内存
+            Lib_FreeResolutions(resPtr, count);
+
+            Debug.Log("[Unity] UVC支持的分辨率列表: " + string.Join(", ", resolutions));
+            return resolutions;
+        }
+
+        public override string GetUvcCtrlList()
+        {
+            IntPtr ptr = Lib_GetUvcCtrlList();
+            if (ptr == IntPtr.Zero)
+            {
+                Debug.LogError("[Unity] Lib_GetUvcCtrlList 返回空指针");
+                return string.Empty;
+            }
+
+            string json = Marshal.PtrToStringAnsi(ptr); // 读取完就好,绝对不能 FreeHGlobal
+            // 解析 JSON 并包裹在 wrapper 里
+            try
+            {
+                UVCCtrlWrapper wrapper = JsonUtility.FromJson<UVCCtrlWrapper>("{\"uvcCtrls\":" + json + "}");
+                if (wrapper != null && wrapper.uvcCtrls != null)
+                {
+                    uvcCtrls = wrapper.uvcCtrls;
+                }
+                else
+                {
+                    Debug.LogError("[Unity] JSON 解析失败,UVC 控制列表为空!");
+                }
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("[Unity] 解析 JSON 出错: " + e.Message);
+            }
+
+            return json;
+        }
+
+        public override void SetBrightness(int value)
+        {
+            Lib_SetBrightness(value);
+        }
+
+        public override void SetContrast(int value)
+        {
+            Lib_SetContrast(value);
+        }
+
+        public override void FlipHorizontally()
+        {
+            mCameraMirror = CameraMirror.HORIZONTAL;
+            Lib_SetCameraMirror("HORIZONTAL");
+        }
+
+        public override void FlipVertically()
+        {
+            mCameraMirror = CameraMirror.VERTICAL;
+            Lib_SetCameraMirror("VERTICAL");
+        }
+        public override void resetControlParams()
+        {
+            Lib_ResetControlParams();
+        }
+        public override bool GetIsPreviewing()
+        {
+            return Lib_GetIsPreviewing();
+        }
+        public override int SetCtrlValue(string type, int value)
+        {
+            int result = -1;
+            if (type == "PU_BRIGHTNESS")
+            {
+                Lib_SetBrightness(value);
+                result = 0;
+            }
+            else if (type == "PU_CONTRAST")
+            {
+                Lib_SetContrast(value);
+                result = 0;
+            }
+            return result;
+        }
+
+        public override void OnTextureUpdate(int width, int height, bool bUpdate)
+        {
+            if (_cameraTexture == null) return;
+
+            if (!GetIsPreviewing()) return;
+
+            _command.IssuePluginCustomTextureUpdateV2(
+                GetTextureUpdateCallback(), _cameraTexture, (uint)(Time.time * 60)
+            );
+            Graphics.ExecuteCommandBuffer(_command);
+            _command.Clear();
+        }
+
+
+    }
+}

+ 11 - 0
Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface_IOS.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bfa89516df6ddcd4492aa51fb5d29505
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 26 - 8
Assets/InfraredProject/InfraredCamera/Scripts/UVCManager.cs

@@ -19,7 +19,7 @@ using UnityEngine.Android;
 
 namespace SLAMUVC
 {
-    [RequireComponent(typeof(UVCInterface))]
+    //[RequireComponent(typeof(UVCInterface))]
     public class UVCManager : MonoBehaviour
     {
         private const string TAG = "UVCManager#";
@@ -338,7 +338,14 @@ namespace SLAMUVC
 
         private void Awake()
         {
-            _interface = GetComponent<UVCInterface>();
+            // _interface = GetComponent<UVCInterface>();
+#if UNITY_IOS
+            _interface = gameObject.AddComponent<UVCInterface_IOS>();
+#elif UNITY_ANDROID
+            _interface = gameObject.AddComponent<UVCInterface_Android>();
+#else
+            Debug.LogError("Unsupported platform!");
+#endif
             _interface.systemCameraPermissionHandle += () =>
             {
                 //授权系统相机之后,初始化红外相机
@@ -354,11 +361,21 @@ namespace SLAMUVC
         /// </summary>
         public void initUVCManagerCamera()
         {
-            //初始化相机,连接设备时候自动开启渲染
-            _interface.InitCamera(DefaultWidth, DefaultHeight);
+
             _interface.cameraTextureHandle += () =>
             {
+                Debug.Log("cameraTextureHandle");
+                if (_interface.CameraTexture == null)
+                {
+                    Debug.LogError("[Error] CameraTexture is NULL!");
+                    return;
+                }
                 var info = GetCamera();
+                if (info == null)
+                {
+                    Debug.LogError("[Error] GetCamera() returned NULL!");
+                    return;
+                }
                 //bChange反馈是否变化宽高
                 bool bChange = info.SetSize(_interface.CameraTexture.width, _interface.CameraTexture.height);
                 info.previewTexture = _interface.CameraTexture;
@@ -376,11 +393,12 @@ namespace SLAMUVC
                     info.UpdateCtrls();//获取摄像机参数
                     info.UpdateResolution();//获取摄像机分辨率
                     startUVCManager?.Invoke(info);
-                   // StartCoroutine(DelayGetInfo(info));
+                    // StartCoroutine(DelayGetInfo(info));
                 }
                 bInit = true;
             };
-
+            //初始化相机,连接设备时候自动开启渲染
+            _interface.InitCamera(DefaultWidth, DefaultHeight);
         }
         /// <summary>
         /// 延迟一下获取操作参数
@@ -390,7 +408,7 @@ namespace SLAMUVC
         //IEnumerator DelayGetInfo(CameraInfo info)
         //{
         //    yield return new WaitForSecondsRealtime(0.5f);
-          
+
         //}
         /// <summary>
         /// 开启渲染
@@ -427,4 +445,4 @@ namespace SLAMUVC
 
 
     }
-}
+}

+ 0 - 13
Assets/InfraredProject/Resources/WebCameraView.prefab

@@ -7576,7 +7576,6 @@ GameObject:
   - component: {fileID: 8173640441273753836}
   - component: {fileID: 8173640441273753840}
   - component: {fileID: 7223338890413580568}
-  - component: {fileID: 5436066657383946373}
   - component: {fileID: 2411089137542987312}
   - component: {fileID: 8173640441273753841}
   m_Layer: 5
@@ -7681,18 +7680,6 @@ MonoBehaviour:
   m_BlockingMask:
     serializedVersion: 2
     m_Bits: 4294967295
---- !u!114 &5436066657383946373
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 8173640441273753835}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 5f1c2725f9e681e4b9141e0214161630, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
 --- !u!114 &2411089137542987312
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 1 - 1
Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

@@ -1002,7 +1002,7 @@ public partial class ScreenLocate : o0InfraredCameraHandler
     {
         if (mUVCCameraInfo == null) return;
 
-#if UNITY_ANDROID
+#if UNITY_ANDROID || UNITY_IOS
         //发送修改指令给相机实际分辨率
         mUVCCameraInfo.SetCameraSize(width, height);
 #endif

+ 4 - 1
Assets/Plugins/iOS/Editor/XCodePostProcessBuild.cs

@@ -119,8 +119,11 @@ public static class XCodePostProcessBuild
         var project = new PBXProject();
         project.ReadFromString(System.IO.File.ReadAllText(pbxProjectPath));
         var entitlements = new ProjectCapabilityManager(pbxProjectPath, entitlementsFileName, targetName, project.GetUnityMainTargetGuid());
-        entitlements.AddSignInWithAppleWithCompatibility(project.GetUnityFrameworkTargetGuid());
+        //entitlements.AddSignInWithAppleWithCompatibility(project.GetUnityFrameworkTargetGuid());
+        entitlements.AddSignInWithAppleWithCompatibility();
         entitlements.WriteToFile();
+
+
     }
 #endif
 }

BIN
Assets/Plugins/iOS/libSlambbUVC.a


+ 33 - 0
Assets/Plugins/iOS/libSlambbUVC.a.meta

@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 345fe111e7282c84db15171985582cfa
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 0
+      settings:
+        DefaultValueInitialized: true
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 1
+      settings:
+        AddToEmbeddedBinaries: false
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 4 - 4
ProjectSettings/ProjectSettings.asset

@@ -160,7 +160,7 @@ PlayerSettings:
   applicationIdentifier:
     Android: com.xmjssvr.BowArrow.mi
     Standalone: com.JssF.BowArrow
-    iPhone: com.xmjssvr.BowArrowEn
+    iPhone: com.xmjssvr.BowArrow
   buildNumber:
     Bratwurst: 0
     Standalone: 0
@@ -183,7 +183,7 @@ PlayerSettings:
   StripUnusedMeshComponents: 1
   VertexChannelCompressionMask: 4054
   iPhoneSdkVersion: 988
-  iOSTargetOSVersionString: 13.0
+  iOSTargetOSVersionString: 17.6
   tvOSSdkVersion: 0
   tvOSRequireExtendedGameController: 0
   tvOSTargetOSVersionString: 13.0
@@ -231,12 +231,12 @@ PlayerSettings:
   metalAPIValidation: 1
   iOSRenderExtraFrameOnPause: 0
   iosCopyPluginsCodeInsteadOfSymlink: 0
-  appleDeveloperTeamID: 
+  appleDeveloperTeamID: 7M2LZ4HF3C
   iOSManualSigningProvisioningProfileID: 
   tvOSManualSigningProvisioningProfileID: 
   iOSManualSigningProvisioningProfileType: 1
   tvOSManualSigningProvisioningProfileType: 0
-  appleEnableAutomaticSigning: 2
+  appleEnableAutomaticSigning: 1
   iOSRequireARKit: 0
   iOSAutomaticallyDetectAndAddCapabilities: 1
   appleEnableProMotion: 0

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov