|
|
@@ -229,11 +229,11 @@ namespace Pack
|
|
|
|
|
|
pbxProject.SetBuildProperty(targetGuid, "ENABLE_BITCODE", "NO");//enable Bitcode 设置 为 no
|
|
|
|
|
|
- pbxProject.AddBuildProperty(targetGuid, "OTHER_LDFLAGS", "-ObjC");
|
|
|
- pbxProject.AddBuildProperty(unityFmwkGUid, "OTHER_LDFLAGS", "-ObjC");
|
|
|
+ pbxProject.AddBuildProperty(targetGuid, "OTHER_LDFLAGS", "-all_load -ObjC -lc++");
|
|
|
+ pbxProject.AddBuildProperty(unityFmwkGUid, "OTHER_LDFLAGS", " -all_load -ObjC -lc++");
|
|
|
// 设置 Allow Non-modular Includes in Framework Modules 为 true
|
|
|
- // pbxProject.SetBuildProperty(targetGuid, "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES", "YES");
|
|
|
- //pbxProject.SetBuildProperty(unityFmwkGUid, "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES", "YES");
|
|
|
+ pbxProject.SetBuildProperty(targetGuid, "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES", "YES");
|
|
|
+ pbxProject.SetBuildProperty(unityFmwkGUid, "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES", "YES");
|
|
|
|
|
|
|
|
|
|
|
|
@@ -253,8 +253,17 @@ namespace Pack
|
|
|
PlistDocument plistDocument = new PlistDocument();
|
|
|
plistDocument.ReadFromFile(plistPath);
|
|
|
|
|
|
-
|
|
|
PlistCreateArray(plistDocument, "LSApplicationQueriesSchemes", new string[] { "fbauth2", "fbapi", "fb-messenger-share-api", "fbshareextension", "fb-messenger-api"});
|
|
|
+ PlistCreateArray(plistDocument, "UIAppFonts", new string[] {
|
|
|
+ "Inter-Black.ttf",
|
|
|
+ "Inter-Bold.ttf",
|
|
|
+ "Inter-ExtraBold.ttf",
|
|
|
+ "Inter-Light.ttf",
|
|
|
+ "Inter-Medium.ttf",
|
|
|
+ "Inter-Regular.ttf",
|
|
|
+ "Inter-SemiBold.ttf",
|
|
|
+ "Inter-Thin.ttf",
|
|
|
+ });
|
|
|
|
|
|
//PlistCreateArray(plistDocument, "Queried URL Schemes", new string[] { "vk", "vk-share", "vkauthorize" });
|
|
|
PlistCreateDict(plistDocument, "NSAppTransportSecurity", new Dictionary<string, DictItem>() { { "NSAllowsArbitraryLoads", new DictItem("bool",true)} });
|
|
|
@@ -266,8 +275,8 @@ namespace Pack
|
|
|
{ "FacebookAppID", new DictItem("string", "849135470863608") },
|
|
|
{ "FacebookDisplayName", new DictItem("string", "The King of Poring: Origin") },
|
|
|
{ "NSUserTrackingUsageDescription", new DictItem("string", "App would like to access IDFA for tracking purpose") },
|
|
|
- { "NSPhotoLibraryAddUsageDescription", new DictItem("string", "Photo Library Add Usage Description") },
|
|
|
- { "NSPhotoLibraryUsageDescription", new DictItem("string", "Photo Library Usage Description") },
|
|
|
+ //{ "NSPhotoLibraryAddUsageDescription", new DictItem("string", "Photo Library Add Usage Description") },
|
|
|
+ //{ "NSPhotoLibraryUsageDescription", new DictItem("string", "Photo Library Usage Description") },
|
|
|
},true);
|
|
|
|
|
|
PlistElementDict dict = PlistCreateDict(plistDocument, "SPAdjustConfig", new Dictionary<string, DictItem>()
|
|
|
@@ -286,7 +295,9 @@ namespace Pack
|
|
|
},false, dict);
|
|
|
|
|
|
|
|
|
- PlistAddUrlType(plistDocument, null, "facebook", "Editor", "fb849135470863608");
|
|
|
+ PlistElementArray arr = PlistAddUrlType(plistDocument, null, "facebook", "Editor", "fb849135470863608");
|
|
|
+ PlistAddUrlType(plistDocument, arr, "com.boliking.ios", "Editor", "com.boliking.ios");
|
|
|
+ PlistAddUrlType(plistDocument, arr, "com.boliking.ios", "Editor", "827002282646-eefr6v53fvhmfts5d5huo9ptir8ola1k.apps.googleusercontent.com");
|
|
|
|
|
|
|
|
|
plistDocument.WriteToFile(plistPath);
|
|
|
@@ -300,8 +311,67 @@ namespace Pack
|
|
|
script.ReplaceInLine("_VendorID = AllocCString([[UIDevice currentDevice].identifierForVendor UUIDString]);",
|
|
|
"_VendorID = AllocCString([WentingSDK GetUUID]);");
|
|
|
script.Save();
|
|
|
-
|
|
|
+ /*
|
|
|
+ string unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
|
|
|
+ script = new ObjCScript(unityAppControllerMMPath);
|
|
|
+
|
|
|
+ //script.AddImport("OEGFramework", true, true);
|
|
|
+
|
|
|
+ int idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, "[OEGManager handleDidFinishLaunchingWithOptions:launchOptions];");
|
|
|
+ script.InsertLine(idx, idx + 3, "// If you want to control Firebase push message you can add below code");
|
|
|
+ script.InsertLine(idx, idx + 4, "[[FirebaseService sharedManager] messagingDelegate:self];");
|
|
|
+ script.InsertLine(idx, idx + 5);
|
|
|
+
|
|
|
+
|
|
|
+ idx = script.FindLine("::printf(\"-> applicationWillResignActive()\\n\");");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, "[OEGManager handleWillResignActive];");
|
|
|
+ script.InsertLine(idx, idx + 3);
|
|
|
+
|
|
|
+ idx = script.FindLine("::printf(\"-> applicationDidEnterBackground()\\n\");");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, " [OEGManager handleDidEnterBackground];");
|
|
|
+ script.InsertLine(idx, idx + 3);
|
|
|
+
|
|
|
+ idx = script.FindLine("::printf(\"-> applicationWillEnterForeground()\\n\");");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, "[OEGManager handleWillEnterForeground];");
|
|
|
+ script.InsertLine(idx, idx + 3);
|
|
|
+
|
|
|
+ idx = script.FindLine("::printf(\"-> applicationDidBecomeActive()\\n\");");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, "[OEGManager handleDidBecomeActive];");
|
|
|
+ script.InsertLine(idx, idx + 3);
|
|
|
|
|
|
+ idx = script.FindLine("::printf(\"-> applicationWillTerminate()\\n\");");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, "[OEGManager handleWillTerminate];");
|
|
|
+ script.InsertLine(idx, idx + 3);
|
|
|
+
|
|
|
+ idx = script.FindLine("@end") - 1;
|
|
|
+ //script.InsertLine(idx, idx + 1);
|
|
|
+ //script.InsertLine(idx, idx + 2, "- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {");
|
|
|
+ //script.InsertLine(idx, idx + 3, " [OEGManager handleDidRegisterForRemoteNotificationsWithDeviceToken:deviceToken];\n}");
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, "- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {");
|
|
|
+ script.InsertLine(idx, idx + 3, " return [OEGManager handleOpenURL:url options:options];\n}");
|
|
|
+ script.InsertLine(idx, idx + 4);
|
|
|
+ script.InsertLine(idx, idx + 5);
|
|
|
+
|
|
|
+ //
|
|
|
+
|
|
|
+ idx = script.FindLine("- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken") + 1;
|
|
|
+ script.InsertLine(idx, idx + 1);
|
|
|
+ script.InsertLine(idx, idx + 2, "[OEGManager handleDidRegisterForRemoteNotificationsWithDeviceToken:deviceToken];");
|
|
|
+ script.InsertLine(idx, idx + 3);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ script.Save();
|
|
|
+ */
|
|
|
}
|
|
|
|
|
|
EditorUtility.DisplayProgressBar("修改XCodeProject", "完成修改XCodeProject", 1);
|