@@ -30,9 +30,12 @@ private void OnBuildError(string condition, string stacktrace, LogType type)
30
30
/// <summary>
31
31
/// Postprocess the iOS Build
32
32
/// </summary>
33
- public static void PostprocessIOSBuild ( string outputPath )
33
+ public static void PostprocessIOSBuild ( BuildTarget buildTarget , string outputPath )
34
34
{
35
35
string projPath = PBXProject . GetPBXProjectPath ( outputPath ) ;
36
+ #if UNITY_VISIONOS
37
+ projPath = projPath . Replace ( "Unity-iPhone" , "Unity-VisionOS" ) ;
38
+ #endif
36
39
PBXProject project = new PBXProject ( ) ;
37
40
project . ReadFromFile ( projPath ) ;
38
41
@@ -46,7 +49,7 @@ public static void PostprocessIOSBuild(string outputPath)
46
49
project . AddFrameworkToProject ( targetGuid , "Accelerate.framework" , false ) ;
47
50
48
51
// Remove libundreamai_ios.a from Embed Frameworks
49
- string libraryFile = Path . Combine ( "Libraries" , LLMBuilder . PluginLibraryDir ( "iOS" , true ) , "libundreamai_ios .a") ;
52
+ string libraryFile = Path . Combine ( "Libraries" , LLMBuilder . PluginLibraryDir ( buildTarget . ToString ( ) , true ) , $ "libundreamai_ { buildTarget . ToString ( ) . ToLower ( ) } .a") ;
50
53
string fileGuid = project . FindFileGuidByProjectPath ( libraryFile ) ;
51
54
if ( string . IsNullOrEmpty ( fileGuid ) ) Debug . LogError ( $ "Library file { libraryFile } not found in project") ;
52
55
else
@@ -71,7 +74,7 @@ public static void PostprocessIOSBuild(string outputPath)
71
74
public void OnPostprocessBuild ( BuildReport report )
72
75
{
73
76
#if UNITY_IOS || UNITY_VISIONOS
74
- AddAccelerate ( report . summary . outputPath ) ;
77
+ PostprocessIOSBuild ( report . summary . platform , report . summary . outputPath ) ;
75
78
#endif
76
79
BuildCompleted ( ) ;
77
80
}
0 commit comments