|
|
@@ -218,68 +218,67 @@ namespace Pack
|
|
|
string unityFmwkGUid = pbxProject.GetUnityFrameworkTargetGuid();
|
|
|
Debug.Log($"=================== targetGuid = {targetGuid} ===============");
|
|
|
|
|
|
-
|
|
|
+ //pbxProject.AddCopyFilesBuildPhase(targetGuid, "SSBundle.bundle", Application.dataPath + "/Plugins/iOS", "");
|
|
|
|
|
|
- pbxProject.SetBuildProperty(targetGuid, "ENABLE_BITCODE", "NO");//enable Bitcode 设置 为 no
|
|
|
+ pbxProject.SetBuildProperty(targetGuid, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym");
|
|
|
+ pbxProject.SetBuildProperty(targetGuid, "GCC_GENERATE_DEBUGGING_SYMBOLS", "YES");
|
|
|
+ pbxProject.SetBuildProperty(targetGuid, "COPY_PHASE_STRIP", "NO");
|
|
|
+ pbxProject.SetBuildProperty(targetGuid, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES");
|
|
|
+ pbxProject.SetBuildProperty(targetGuid, "GCC_ENABLE_CPP_EXCEPTIONS", "YES");
|
|
|
|
|
|
- pbxProject.AddBuildProperty(targetGuid, "OTHER_LDFLAGS", "-ObjC");
|
|
|
+ pbxProject.SetBuildProperty(targetGuid, "ENABLE_BITCODE", "NO");
|
|
|
+ pbxProject.AddBuildProperty(targetGuid, "OTHER_LDFLAGS", "-ObjC -lz");
|
|
|
pbxProject.AddBuildProperty(unityFmwkGUid, "OTHER_LDFLAGS", "-ObjC");
|
|
|
- // 设置 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, "SWIFT_VERSION", "5.0");
|
|
|
+ //pbxProject.AddBuildProperty(targetGuid, "Library Search Path", "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
|
|
|
+ //pbxProject.AddBuildProperty(targetGuid, "Library Search Path", "$(SDKROOT)/usr/lib/swift");
|
|
|
|
|
|
-
|
|
|
- pbxProject.AddCapability(targetGuid,PBXCapabilityType.InAppPurchase);//内购
|
|
|
- pbxProject.AddCapability(targetGuid,PBXCapabilityType.SignInWithApple);//苹果登录
|
|
|
+ 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(targetGuid, "RUNPATH_SEARCH_PATHS", "/usr/lib/swift");
|
|
|
+ //AdSupport.framework AuthenticationServices.framework, Accelerate.framework
|
|
|
|
|
|
-
|
|
|
+ pbxProject.AddCapability(targetGuid, PBXCapabilityType.InAppPurchase);//内购
|
|
|
+ pbxProject.AddCapability(targetGuid, PBXCapabilityType.SignInWithApple);//苹果登录
|
|
|
|
|
|
- //AddFrameworkToProject(pbxProject, unityFmwkGUid, new string[] { "Accelerate.framework" },false);
|
|
|
+ AddFrameworkToProject(pbxProject, targetGuid, new string[] { "libz.dylib", "libc++.dylib", "AdSupport.framework", "AuthenticationServices.framework", "Accelerate.framework" }, false);
|
|
|
+ AddFrameworkToProject(pbxProject, unityFmwkGUid, new string[] { "Accelerate.framework" }, false);
|
|
|
|
|
|
- //pbxProject.AddAssetTagToDefaultInstall
|
|
|
pbxProject.WriteToFile(pbxprojPath);
|
|
|
EditorUtility.DisplayProgressBar("修改XCodeProject", "修改project.pbxproj完成", 0.25f);
|
|
|
|
|
|
string plistPath = Path.Combine(outPath, "Info.plist");
|
|
|
PlistDocument plistDocument = new PlistDocument();
|
|
|
plistDocument.ReadFromFile(plistPath);
|
|
|
-
|
|
|
-
|
|
|
- PlistCreateArray(plistDocument, "LSApplicationQueriesSchemes", new string[] { "fbauth2", "fbapi", "fb-messenger-share-api", "fbshareextension", "fb-messenger-api"});
|
|
|
-
|
|
|
- //PlistCreateArray(plistDocument, "Queried URL Schemes", new string[] { "vk", "vk-share", "vkauthorize" });
|
|
|
- PlistCreateDict(plistDocument, "NSAppTransportSecurity", new Dictionary<string, DictItem>() { { "NSAllowsArbitraryLoads", new DictItem("bool",true)} });
|
|
|
-
|
|
|
- //Facebook AppID IOS: 1734387583815032
|
|
|
- PlistCreateDict(plistDocument,"",new Dictionary<string, DictItem>()
|
|
|
- {
|
|
|
- { "xuanyou_GameId", new DictItem("string", "127") },
|
|
|
- { "FacebookAppID", new DictItem("string", "849135470863608") },
|
|
|
- { "FacebookDisplayName", new DictItem("string", "FacebookDisplayName") },
|
|
|
- { "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") },
|
|
|
- },true);
|
|
|
-
|
|
|
- PlistElementDict dict = PlistCreateDict(plistDocument, "SPAdjustConfig", new Dictionary<string, DictItem>()
|
|
|
- {
|
|
|
- { "appToken", new DictItem("string","zg6ixp19pdz4")},
|
|
|
- });
|
|
|
-
|
|
|
- PlistCreateDict(plistDocument, "eventTokens", new Dictionary<string, DictItem>()
|
|
|
- {
|
|
|
- { "activeEventToken", new DictItem("string","kky0yu")},
|
|
|
- { "createRoleToken", new DictItem("string","1p4znl")},
|
|
|
- { "firstPayEventToken", new DictItem("string","p6p840")},
|
|
|
- { "noviceGuideEventToken", new DictItem("string","21l1no")},
|
|
|
- { "payEventToken", new DictItem("string","ot7zkz")},
|
|
|
- { "registerEventToken", new DictItem("string","6s22py")},
|
|
|
- },false, dict);
|
|
|
-
|
|
|
-
|
|
|
- PlistAddUrlType(plistDocument, null, "facebook", "Editor", "fb849135470863608");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //plistDocument.root.SetString("FacebookUrlSchemeSuffix", "3db62ef3789f3752a4a6d1b7ffc6f922");
|
|
|
+ /* FacebookAppID:facebook 后台应用参数
|
|
|
+ * FacebookUrlSchemeSuffix 应用参数后缀,后缀仅可使用字母字符。(可不设置,当多应用共用一个 appid 时需添加,可避免 FB 登录成功后返回到其他应用)
|
|
|
+ * FacebookDisplayNam:facebook 后台配置的应用名称{游戏名称};
|
|
|
+ * FacebookClientToken:在 facebook 后台应用设置->高级->客户端口令查看;
|
|
|
+ * LSApplicationQueriesSchemes:Facebook 相关白名单。*/
|
|
|
+
|
|
|
+ plistDocument.root.SetString("FacebookAppID", "743858834901692");
|
|
|
+
|
|
|
+ plistDocument.root.SetString("FacebookDisplayNam", "萌新冒險家");
|
|
|
+ plistDocument.root.SetString("FacebookClientToken", "0b39acbe80e234d4b9691451af1a4412");
|
|
|
+ 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.WriteToFile(plistPath);
|