|
|
@@ -66,6 +66,16 @@ namespace Pack
|
|
|
return buildOptions;
|
|
|
}
|
|
|
|
|
|
+ private void CopymmFile(string[] fs,string topath)
|
|
|
+ {
|
|
|
+ string path = Application.dataPath + PackConstant.BuildSharedResourcePath + "/Plugins/Special/iOS/";
|
|
|
+ string outPath = GetBuildOutputPath();
|
|
|
+ foreach (var item in fs)
|
|
|
+ {
|
|
|
+ File.Copy(path + item, Path.Combine(outPath,topath+ "/"+item), true);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
protected override void BuildAppCompleted(BuildOptions buildOptions)
|
|
|
{
|
|
|
base.BuildAppCompleted(buildOptions);
|
|
|
@@ -98,10 +108,20 @@ namespace Pack
|
|
|
}
|
|
|
|
|
|
// 为了过审核,需要删除OpenUrl
|
|
|
- File.Copy(Application.dataPath + PackConstant.BuildSharedResourcePath + "/Plugins/Special/iOS/libiPhone-lib.a", Path.Combine(outPath, "Libraries/libiPhone-lib.a"), true);
|
|
|
+ //File.Copy(Application.dataPath + PackConstant.BuildSharedResourcePath + "/Plugins/Special/iOS/libiPhone-lib.a", Path.Combine(outPath, "Libraries/libiPhone-lib.a"), true);
|
|
|
+
|
|
|
+ CopymmFile(new string[] { "LuLuConnector.h", "LuLuConnector.mm" }, "Classes");
|
|
|
ChangeXCodeProject(buildOptions);
|
|
|
}
|
|
|
-
|
|
|
+#if UNITY_IOS
|
|
|
+ private void AddFrameworkToProject(PBXProject pro, string target, string[] libs, bool weak)
|
|
|
+ {
|
|
|
+ foreach (var item in libs)
|
|
|
+ {
|
|
|
+ pro.AddFrameworkToProject(target,item,weak);
|
|
|
+ }
|
|
|
+ }
|
|
|
+#endif
|
|
|
protected void ChangeXCodeProject(BuildOptions buildOptions)
|
|
|
{
|
|
|
#if UNITY_IOS
|
|
|
@@ -122,6 +142,12 @@ namespace Pack
|
|
|
pbxProject.AddBuildProperty(targetGuid, "OTHER_LDFLAGS", "-ObjC -lz");
|
|
|
|
|
|
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.AddBuildProperty(targetGuid, "Runpath Search Path", "/usr/lib/swift");
|
|
|
+ //AdSupport.framework AuthenticationServices.framework, Accelerate.framework
|
|
|
+
|
|
|
+ AddFrameworkToProject(pbxProject, targetGuid,new string[] { "libz.dylib" , "libc++.dylib" , "AdSupport.framework" , "AuthenticationServices.framework", "Accelerate.framework" },false);
|
|
|
if (plugins.Contains("Bugly"))
|
|
|
{
|
|
|
pbxProject.AddFrameworkToProject(targetGuid, "libz.dylib", false);
|