Skip to content

IOS support - #85

Merged
inmny merged 3 commits into
WorldBoxOpenMods:masterfrom
MelvinShwuaner:master
Oct 22, 2026
Merged

inmny merged 3 commits into
WorldBoxOpenMods:masterfrom
MelvinShwuaner:master

Conversation

@MelvinShwuaner

@MelvinShwuaner MelvinShwuaner commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

i added ios support. we had to change monomod to work with IOS. on IOS, monomod uses internal calls, which call into our modified version of mono (il2cpp2mono), which processes the detours.

@inmny

inmny commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

what's changed in MonoMod.*.dll?

@MelvinShwuaner

MelvinShwuaner commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

what's changed in MonoMod.*.dll?

on IOS, we made it use the new class DetourNativeIOSPlatform. our custom mono IOS fork adds the icalls:

  •   mono_add_internal_call ("MonoMod.RuntimeDetour.Platforms.DetourNativeIOSPlatform::NativeApply", mono_ios_jit_detour_apply);     
    
  •   mono_add_internal_call ("MonoMod.RuntimeDetour.Platforms.DetourNativeIOSPlatform::NativeBackup", mono_ios_jit_detour_backup);
    
  •   mono_add_internal_call ("MonoMod.RuntimeDetour.Platforms.DetourNativeIOSPlatform::NativeRestore", mono_ios_jit_detour_restore);
    
  •   mono_add_internal_call ("MonoMod.RuntimeDetour.Platforms.DetourNativeIOSPlatform::NativeFlush", mono_ios_jit_detour_flush);
    
  •   mono_add_internal_call ("MonoMod.RuntimeDetour.Platforms.DetourNativeIOSPlatform::NativeValidate", mono_ios_jit_detour_validate);
    

these icalls take care of monomod's detours. as when editing the executable pages you need to call in the JIT enabler code first

@MelvinShwuaner

MelvinShwuaner commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

we're going to make these icalls in their own assembly next time, but for now we can just use this simple fix

@MelvinShwuaner

Copy link
Copy Markdown
Contributor Author

alright if you dont want to change monomod, we can implement the detour patcher in neomodloader and set monomods DetourHelper._Native to it.

@inmny
inmny merged commit 36a891b into WorldBoxOpenMods:master Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants