You've already forked Commercialization.topon
update 2.1.3
This commit is contained in:
@@ -24,6 +24,7 @@ namespace AnyThink.Scripts.Editor
|
||||
|
||||
public class TopOnPostProcessBuildiOS
|
||||
{
|
||||
private static string mBuildPath;
|
||||
|
||||
private static readonly List<string> AtsRequiringNetworks = new List<string>
|
||||
{
|
||||
@@ -47,14 +48,53 @@ namespace AnyThink.Scripts.Editor
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "StartAppSDK/StartApp.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "BigoADS/BigoADS/BigoADS.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "BigoADS/BigoADS/OMSDK_Bigosg.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "HyBid/PubnativeLite/PubnativeLite/OMSDK-1.3.29/OMSDK_Pubnativenet.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "Fyber_Marketplace_SDK/IASDKCore/IASDKCore.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "InMobiSDK/InMobiSDK.xcframework"));
|
||||
|
||||
//pubnative
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "ATOM-Standalone/ATOM.xcframework"));
|
||||
string pubNativePath = Path.Combine(mBuildPath, "Pods/HyBid/PubnativeLite/PubnativeLite");
|
||||
if (Directory.Exists(pubNativePath)) {
|
||||
// 获取所有以"OMSDK-"开头的子目录
|
||||
string[] subDirectories = Directory.GetDirectories(pubNativePath, "OMSDK-*");
|
||||
if (subDirectories.Length > 0) {
|
||||
string versionDirectory= subDirectories[0];
|
||||
string versionDirectoryName = Path.GetFileName(versionDirectory);
|
||||
// ATLog.logError("DynamicLibraryPathsToEmbed() >>> pubNative versionDirectoryName: " + versionDirectoryName);
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "HyBid/PubnativeLite/PubnativeLite/" + versionDirectoryName + "/OMSDK_Pubnativenet.xcframework"));
|
||||
}
|
||||
}
|
||||
//applovin
|
||||
string applovinPath = Path.Combine(mBuildPath, "Pods/AppLovinSDK");
|
||||
if (Directory.Exists(applovinPath)) {
|
||||
// 获取所有以"applovin-ios-sdk-"开头的子目录
|
||||
string[] applovinSubDirectories = Directory.GetDirectories(applovinPath, "applovin-ios-sdk-*");
|
||||
if (applovinSubDirectories.Length > 0) {
|
||||
string applovinVersionDirectory = applovinSubDirectories[0];
|
||||
string applovinVersionDirectoryName = Path.GetFileName(applovinVersionDirectory);
|
||||
// ATLog.logError("DynamicLibraryPathsToEmbed() >>> applovinVersionDirectoryName: " + applovinVersionDirectoryName);
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "AppLovinSDK/" + applovinVersionDirectoryName + "/AppLovinSDK.xcframework"));
|
||||
}
|
||||
}
|
||||
|
||||
return dynamicLibraryPathsToEmbed;
|
||||
}
|
||||
}
|
||||
|
||||
//读取本地已安装network的版本号:network_data.json
|
||||
// private static string getNetworkVersion(string networkDataJsonFilePath)
|
||||
// {
|
||||
// if (!File.Exists(networkDataJsonFilePath)) {
|
||||
// return "";
|
||||
// }
|
||||
// string jsonData = File.ReadAllText(networkDataJsonFilePath);
|
||||
// var networkLocalData = JsonUtility.FromJson<NetworkLocalData>(a_json);
|
||||
// if (networkLocalData != null) {
|
||||
// return networkLocalData.version;
|
||||
// }
|
||||
// retrun "";
|
||||
// }
|
||||
|
||||
private static List<string> BunldePathsToAdd {
|
||||
get {
|
||||
|
||||
@@ -134,6 +174,8 @@ namespace AnyThink.Scripts.Editor
|
||||
|
||||
private static void EmbedDynamicLibrariesIfNeeded(string buildPath, PBXProject project, string targetGuid)
|
||||
{
|
||||
mBuildPath = buildPath;
|
||||
ATLog.log("EmbedDynamicLibrariesIfNeeded() >>> buildPath: " + buildPath);
|
||||
var dynamicLibraryPathsPresentInProject = DynamicLibraryPathsToEmbed.Where(dynamicLibraryPath => Directory.Exists(Path.Combine(buildPath, dynamicLibraryPath))).ToList();
|
||||
if (dynamicLibraryPathsPresentInProject.Count <= 0) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user