Explorar o código

导入新XcodeAPI备份

jet %!s(int64=8) %!d(string=hai) anos
pai
achega
d402193831

+ 2 - 2
Assets/Plugins/Alipay/IOS/AliPay.mm

@@ -1,4 +1,4 @@
-//
+//
 //  AliPay.m
 //  UnityAliPay
 //
@@ -33,7 +33,7 @@ extern "C" {
     {
         NSString *orderInfoStr = [NSString stringWithUTF8String:orderInfo];
         NSString *gameObjectNameStr = [NSString stringWithUTF8String:gameObjectName];
-        [[AlipaySDK defaultService] payOrder:orderInfoStr fromScheme:@"Unity-iPhone" callback:^(NSDictionary *resultDic) {
+        [[AlipaySDK defaultService] payOrder:orderInfoStr fromScheme:@"MyLovelyGarden" callback:^(NSDictionary *resultDic) {
             [[[AliPay alloc] init] payResult:gameObjectNameStr resultDic:resultDic];
         }];
     }

+ 14 - 1
Assets/Script/Editor/PostProcessor.cs

@@ -73,10 +73,23 @@ public class NewBehaviourScript
         
         plist.root.SetString("Bundle display name", "CFBundleDisplayName");
 
+
+        //添加URLScheme
+        PlistElementArray urlArray = plist.root.CreateArray("CFBundleURLTypes");
+        PlistElementDict urlDict = urlArray.AddDict();
+
+        urlDict.SetString("CFBundleURLName", "TestName");
+
+        PlistElementArray urlInnerArray = urlDict.CreateArray("TestScheme");
+        urlInnerArray.AddString("TestValue");
+
+       
+
+        //保存Plist
         plist.WriteToFile(plistPath);
 
 
-        //保存
+        //保存PBXProject
         File.WriteAllText(projectPath, project.WriteToString());
     }
 }

+ 4 - 26
Assets/Script/Manage/ManaIAP.cs

@@ -129,36 +129,14 @@ public class ManaIAP : MonoBehaviour, IStoreListener
 
     public static void InitializeAlipay()
     {
-        try
+        foreach (var attribute in ManaData.GetIAPConfig())
         {
-            foreach (var attribute in ManaData.GetIAPConfig())
-            {
-                ProductList.Add(attribute[1].Value);
+            ProductList.Add(attribute[1].Value);
 
-                ProductIdDic.Add(attribute[5].Value, attribute[1].Value);
-                PackNameDic.Add(attribute[1].Value, attribute[5].Value);
-            }
-        }
-        catch (Exception e)
-        {
-            ManaDebug.Log("001 " + e.ToString());
+            ProductIdDic.Add(attribute[5].Value, attribute[1].Value);
+            PackNameDic.Add(attribute[1].Value, attribute[5].Value);
         }
 
-        try
-        {
-            foreach (var attribute in ManaData.GetIAPConfig())
-            {
-                ManaDebug.Log("0012 " + attribute[1].Value + " " + attribute[5].Value);
-                ProductList.Add(attribute[1].Value);
-
-                ProductIdDic.Add(attribute[5].Value, attribute[1].Value);
-                PackNameDic.Add(attribute[1].Value, attribute[5].Value);
-            }
-        }
-        catch (Exception e)
-        {
-            ManaDebug.Log("002 " + e.ToString());
-        }
         AliplayManager.Instance.Init();
     }
 

+ 0 - 2
Assets/Script/ThirdParty/Alipay/AlipayManager.cs

@@ -56,8 +56,6 @@ public class AliplayManager : UnitySingleton<AliplayManager>
 
     public void OnPayResult(string result)
 	{
-        ManaDebug.Log("Resule " + result);
-
 		//if result=9000 means pay success;
 
         if (int.Parse(result.Split('|')[0]) == 9000)

+ 1 - 3
ToList.txt

@@ -1,6 +1,4 @@
-AlipayManager ManaIAP调试
-
-自动打包(DisplayNade的设置)
+自动打包(DisplayName的设置)
 
 存档不能更新?