Skip to content

Commit

Permalink
fix bugs for Apple plugins. Framework and Library cannot be embeded. a…
Browse files Browse the repository at this point in the history
  • Loading branch information
botaohu committed Nov 10, 2023
1 parent dd0c791 commit 2ca8a90
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public static string GetPluginLibraryPathForBuildTarget(string libraryName, Buil
return string.Empty;
}

string[] results = AssetDatabase.FindAssets(libraryName);
string libraryNameWithoutExtension = Path.GetFileNameWithoutExtension(libraryName);
string[] results = AssetDatabase.FindAssets(libraryNameWithoutExtension);

foreach (string currGUID in results)
{
string libraryPath = AssetDatabase.GUIDToAssetPath(currGUID);
Expand Down Expand Up @@ -136,7 +138,7 @@ public static void CopyAndEmbed(string source, BuildTarget buildTarget, string p
{
var expectedInstallPath = source.Substring(source.LastIndexOf(searchString) + searchString.Length);
Debug.Log($"CopyAndEmbed - Expected install path for {frameworkName}: {expectedInstallPath}");
fileGuid = pbxProject.FindFileGuidByProjectPath(Path.Combine("Frameworks", expectedInstallPath));
fileGuid = pbxProject.FindFileGuidByProjectPath(Path.Combine(frameworkName.EndsWith(".a") ? "Libraries" : "Frameworks", expectedInstallPath));
if (string.IsNullOrEmpty(fileGuid))
{
fileGuid = pbxProject.FindFileGuidByProjectPath(Path.Combine("Libraries", expectedInstallPath));
Expand Down

0 comments on commit 2ca8a90

Please sign in to comment.