Add other libraries to iOS build

This commit is contained in:
Dan Balasescu 2025-08-17 19:19:56 +09:00
parent 12d3f7a37f
commit 11604347e1
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,9 @@ public class Program
public static unsafe void Main(string[] args)
{
NativeLibrary.SetDllImportResolver(typeof(SDL3).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3.framework/SDL3", assembly, path));
NativeLibrary.SetDllImportResolver(typeof(SDL3_image).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_image.framework/SDL3_image", assembly, path));
NativeLibrary.SetDllImportResolver(typeof(SDL3_ttf).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_ttf.framework/SDL3_ttf", assembly, path));
NativeLibrary.SetDllImportResolver(typeof(SDL3_mixer).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_mixer.framework/SDL3_mixer", assembly, path));
SDL3.SDL_RunApp(0, null, &main, IntPtr.Zero);
}

View File

@ -21,6 +21,9 @@
<ItemGroup>
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3.xcframework"/>
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_image.xcframework"/>
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_ttf.xcframework"/>
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_mixer.xcframework"/>
</ItemGroup>
</Project>