|
|
@@ -150,11 +150,11 @@ namespace Pack
|
|
|
//pbxProject.AddBuildProperty(targetGuid, "Library Search Path", "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
|
|
|
//pbxProject.AddBuildProperty(targetGuid, "Library Search Path", "$(SDKROOT)/usr/lib/swift");
|
|
|
|
|
|
- pbxProject.AddBuildProperty(unityFmwkGUid, "LIBRARY_SEARCH_PATHS", "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
|
|
|
+ //pbxProject.AddBuildProperty(unityFmwkGUid, "LIBRARY_SEARCH_PATHS", "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
|
|
|
//pbxProject.AddBuildProperty(targetGuid, "LIBRARY_SEARCH_PATHS", "$(SDKROOT)/usr/lib/swift");
|
|
|
|
|
|
- pbxProject.AddBuildProperty(unityFmwkGUid, "LIBRARY_SEARCH_PATHS", "$(SDKROOT)/usr/lib/swift");
|
|
|
- pbxProject.AddBuildProperty(targetGuid, "Runpath Search Path", "/usr/lib/swift");
|
|
|
+ //pbxProject.AddBuildProperty(unityFmwkGUid, "LIBRARY_SEARCH_PATHS", "$(SDKROOT)/usr/lib/swift");
|
|
|
+ //pbxProject.AddBuildProperty(targetGuid, "Runpath Search Path", "/usr/lib/swift");
|
|
|
//pbxProject.AddBuildProperty(targetGuid, "RUNPATH_SEARCH_PATHS", "/usr/lib/swift");
|
|
|
//AdSupport.framework AuthenticationServices.framework, Accelerate.framework
|
|
|
|
|
|
@@ -178,26 +178,26 @@ namespace Pack
|
|
|
string plistPath = Path.Combine(outPath, "Info.plist");
|
|
|
PlistDocument plistDocument = new PlistDocument();
|
|
|
plistDocument.ReadFromFile(plistPath);
|
|
|
- if (plugins.Contains("Lebian"))
|
|
|
- {
|
|
|
- int appId;
|
|
|
- if (!ExpressionEvaluator.Evaluate(leBian_MainChId, out appId))
|
|
|
- {
|
|
|
- appId = 0;
|
|
|
- }
|
|
|
- plistDocument.root.SetInteger("LEBIAN_APPID", appId);
|
|
|
- plistDocument.root.SetString("LEBIAN_SECID", leBian_SECID);
|
|
|
- plistDocument.root.SetString("LEBIAN_META", leBian_ClientChId);
|
|
|
- plistDocument.root.SetInteger("LEBIAN_VERCODE", (int)(uint)resVersionCode);
|
|
|
- }
|
|
|
-
|
|
|
- if (!string.IsNullOrEmpty(plugins.Find((x)=>x.StartsWith("YOUYI"))))
|
|
|
- {
|
|
|
- plistDocument.root.SetString("YouYi_GameId", "1023");
|
|
|
- plistDocument.root.SetString("YouYi_AppKey", "3db62ef3789f3752a4a6d1b7ffc6f922");
|
|
|
- plistDocument.root.SetString("YouYi_VestId", "");
|
|
|
- plistDocument.root.SetString("NSUserTrackingUsageDescription", "获取设备信息用以精准推送您喜欢的内容");
|
|
|
- }
|
|
|
+ //if (plugins.Contains("Lebian"))
|
|
|
+ //{
|
|
|
+ // int appId;
|
|
|
+ // if (!ExpressionEvaluator.Evaluate(leBian_MainChId, out appId))
|
|
|
+ // {
|
|
|
+ // appId = 0;
|
|
|
+ // }
|
|
|
+ // plistDocument.root.SetInteger("LEBIAN_APPID", appId);
|
|
|
+ // plistDocument.root.SetString("LEBIAN_SECID", leBian_SECID);
|
|
|
+ // plistDocument.root.SetString("LEBIAN_META", leBian_ClientChId);
|
|
|
+ // plistDocument.root.SetInteger("LEBIAN_VERCODE", (int)(uint)resVersionCode);
|
|
|
+ //}
|
|
|
+
|
|
|
+ //if (!string.IsNullOrEmpty(plugins.Find((x)=>x.StartsWith("YOUYI"))))
|
|
|
+ //{
|
|
|
+ // plistDocument.root.SetString("YouYi_GameId", "1023");
|
|
|
+ // plistDocument.root.SetString("YouYi_AppKey", "3db62ef3789f3752a4a6d1b7ffc6f922");
|
|
|
+ // plistDocument.root.SetString("YouYi_VestId", "");
|
|
|
+ // plistDocument.root.SetString("NSUserTrackingUsageDescription", "获取设备信息用以精准推送您喜欢的内容");
|
|
|
+ //}
|
|
|
|
|
|
//plistDocument.root.SetString("FacebookUrlSchemeSuffix", "3db62ef3789f3752a4a6d1b7ffc6f922");
|
|
|
/* FacebookAppID:facebook 后台应用参数
|
|
|
@@ -206,21 +206,21 @@ namespace Pack
|
|
|
* FacebookClientToken:在 facebook 后台应用设置->高级->客户端口令查看;
|
|
|
* LSApplicationQueriesSchemes:Facebook 相关白名单。*/
|
|
|
|
|
|
- plistDocument.root.SetString("FacebookAppID", "214372257886989");
|
|
|
+ //plistDocument.root.SetString("FacebookAppID", "214372257886989");
|
|
|
|
|
|
- plistDocument.root.SetString("FacebookDisplayNam", "初心者大冒險");
|
|
|
- plistDocument.root.SetString("FacebookClientToken", "eb90a0c5b6ab59dc16d63f2e78a34f39");
|
|
|
- PlistElementArray plArr = plistDocument.root.CreateArray("LSApplicationQueriesSchemes");
|
|
|
- //fbapi
|
|
|
- //fb-messenger-api
|
|
|
- //fbauth2
|
|
|
- //fbshareextension
|
|
|
- //fb-messenger-share-api
|
|
|
- plArr.AddString("fbapi");
|
|
|
- plArr.AddString("fb-messenger-api");
|
|
|
- plArr.AddString("fbauth2");
|
|
|
- plArr.AddString("fbshareextension");
|
|
|
- plArr.AddString("fb-messenger-share-api");
|
|
|
+ //plistDocument.root.SetString("FacebookDisplayNam", "初心者大冒險");
|
|
|
+ //plistDocument.root.SetString("FacebookClientToken", "eb90a0c5b6ab59dc16d63f2e78a34f39");
|
|
|
+ //PlistElementArray plArr = plistDocument.root.CreateArray("LSApplicationQueriesSchemes");
|
|
|
+ ////fbapi
|
|
|
+ ////fb-messenger-api
|
|
|
+ ////fbauth2
|
|
|
+ ////fbshareextension
|
|
|
+ ////fb-messenger-share-api
|
|
|
+ //plArr.AddString("fbapi");
|
|
|
+ //plArr.AddString("fb-messenger-api");
|
|
|
+ //plArr.AddString("fbauth2");
|
|
|
+ //plArr.AddString("fbshareextension");
|
|
|
+ //plArr.AddString("fb-messenger-share-api");
|
|
|
|
|
|
|
|
|
|
|
|
@@ -236,27 +236,28 @@ namespace Pack
|
|
|
"_VendorID = AllocCString([WentingSDK GetUUID]);");
|
|
|
script.Save();
|
|
|
|
|
|
- if (plugins.Contains("Lebian"))
|
|
|
- {
|
|
|
- string unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
|
|
|
- script = new ObjCScript(unityAppControllerMMPath);
|
|
|
- script.AddImport("LBSDK/LBInit.h", true);
|
|
|
- int idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
|
|
|
- script.InsertLine(idx, idx + 1);
|
|
|
- script.InsertLine(idx, idx + 2, "// 请务必在方法的最前面调用该接口,否则很容易出问题");
|
|
|
- script.InsertLine(idx, idx + 3, "if ([[LBInit sharedInstance] LBSDKShouldInitWithLaunchOptions:launchOptions]) {");
|
|
|
- script.InsertLine(idx, idx + 4, "\treturn YES;");
|
|
|
- script.InsertLine(idx, idx + 5, "}");
|
|
|
- script.InsertLine(idx, idx + 6);
|
|
|
- script.Save();
|
|
|
- }
|
|
|
-
|
|
|
+ //if (plugins.Contains("Lebian"))
|
|
|
+ //{
|
|
|
+ // string unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
|
|
|
+ // script = new ObjCScript(unityAppControllerMMPath);
|
|
|
+ // script.AddImport("LBSDK/LBInit.h", true);
|
|
|
+ // int idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
|
|
|
+ // script.InsertLine(idx, idx + 1);
|
|
|
+ // script.InsertLine(idx, idx + 2, "// 请务必在方法的最前面调用该接口,否则很容易出问题");
|
|
|
+ // script.InsertLine(idx, idx + 3, "if ([[LBInit sharedInstance] LBSDKShouldInitWithLaunchOptions:launchOptions]) {");
|
|
|
+ // script.InsertLine(idx, idx + 4, "\treturn YES;");
|
|
|
+ // script.InsertLine(idx, idx + 5, "}");
|
|
|
+ // script.InsertLine(idx, idx + 6);
|
|
|
+ // script.Save();
|
|
|
+ //}
|
|
|
+ int idx = 0;
|
|
|
+ string unityAppControllerMMPath = "";
|
|
|
if (plugins.Contains("WentingLicense"))
|
|
|
{
|
|
|
- string unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
|
|
|
+ unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
|
|
|
script = new ObjCScript(unityAppControllerMMPath);
|
|
|
script.AddImport("WentingLicense.h", false);
|
|
|
- int idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
|
|
|
+ idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
|
|
|
script.InsertLine(idx, idx + 1);
|
|
|
script.InsertLine(idx, idx + 2, "if ([[WentingLicense sharedInstance] CheckAgreeWithLaunchOptions:launchOptions]) {");
|
|
|
script.InsertLine(idx, idx + 3, "\treturn YES;");
|
|
|
@@ -265,6 +266,36 @@ namespace Pack
|
|
|
script.Save();
|
|
|
}
|
|
|
|
|
|
+ unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
|
|
|
+ script = new ObjCScript(unityAppControllerMMPath);
|
|
|
+ //SMPCQuickSDK/SMPCQuickSDK.h
|
|
|
+ //"QuickSDK_ios.h"
|
|
|
+ script.AddImport("SMPCQuickSDK/SMPCQuickSDK.h", true);
|
|
|
+ script.AddImport("QuickSDK_ios.h", false);
|
|
|
+ // / 注骨事件监听[[QuickSok ios shareInstance] addNotifications];
|
|
|
+ /// 初始化
|
|
|
+ //SMPCQuickSDKInitConfigure* cfg m[[sMpcQuicksDKInitconfigure alloc] init];
|
|
|
+ // cfg.productkey e e"09633196";
|
|
|
+ // cfg.productCode 50840817638746911281319234382938":
|
|
|
+ //int error m ismpcouicksok defaultInstance] initwithconfia: cf application:application didFinishLaunchinaWithoptions:launchoptions
|
|
|
+ //if (error!8){
|
|
|
+ // NSLog(@"不能启动初始化:hd", error);
|
|
|
+
|
|
|
+ idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2,"//注册事件监听");
|
|
|
+ script.InsertLine(idx, idx + 3, "[[QuickSDK_ios shareInstance] addNotifications];");
|
|
|
+ script.InsertLine(idx, idx + 4, "//初始化");
|
|
|
+ script.InsertLine(idx, idx + 5, "SMPCQuickSDKInitConfigure *cfg = [[SMPCQuickSDKInitConfigure alloc] init];");
|
|
|
+ script.InsertLine(idx, idx + 6, "cfg.productKey = @\"60700384\";");
|
|
|
+ script.InsertLine(idx, idx + 7, "cfg.productCode = @\"84854058398037796099970471354112\"; ");
|
|
|
+ script.InsertLine(idx, idx + 8, "int error = [[SMPCQuickSDK defaultInstance] intWithConfig:cfg application:application didFinishLaunchingWithOptions:launchOptions];");
|
|
|
+ script.InsertLine(idx, idx + 9,"if (error != 0){");
|
|
|
+ script.InsertLine(idx, idx + 10,"NsLog(@\"不能启动初始化:%d\",error);");
|
|
|
+ script.InsertLine(idx, idx + 11,"}");
|
|
|
+ script.Save();
|
|
|
+
|
|
|
+
|
|
|
//if (!string.IsNullOrEmpty(plugins.Find((x) => x.StartsWith("YOUYI"))))
|
|
|
//{
|
|
|
// string unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
|