Tutorial iOS Mod Menu Theos NIC Template - Full Guide To Create Own MM for iOS!

G-Bo ッ

Administrator
Original poster
Staff member
Administrator
Mar 22, 2017
8,680
339,200
2,350
Behind you.
platinmods.com
155241



Foreword: The credits for that menu are going fully to joeyjurjens (and the people he credited for parts of it)!
You can find the original source here: joeyjurjens/iOS-Mod-Menu-Template-for-Theos


Sample UI of the Menu:

SDBZUUm.png


Features:
  • Customizable UI
  • Customizable menu & button image icon
  • 4 types of switches:
    • Offset Patcher Switch
    • Empty Switch
    • Textfield Switch
    • Slider Switch
  • Backend Offset Patcher Switch is based on KittyMemory
    • Original bytes are not required
    • Supports MSHookMemory
    • Write unlimited bytes to a offset
  • Open Source Menu


Installation:
You can download the template here: Latest Release.
Also follow the instructions below otherwise you will run into errors!


iOS:
  1. In the makefile on line 22, you've to set the path to your SDK. This menu has been tested with the "iPhoneOS11.2.sdk" SDK from theos/sdks
  2. I use initializer_list in this project, iOS doesn't have this included by itself. You can download it here, save it as "initializer_list" and copy the file to: "$THEOS/sdks/iPhoneOS11.2.sdk/usr/include/c++/4.2.1/"
MacOS:
  1. Install xCode if you haven't already.
  2. In the Makefile of the project, change "MOBILE_THEOS=1" to "MOBILE_THEOS=0" on line 19 of the makefile.


Usage:
Changing the menu images

Inside the tweak.xm, you'll setup the menu under the function "setupMenu". Here you'll see two options under the menu: menuIcon & menuButton, those require a base64 image string. In order to get a base64 string from the image, upload the image here: Image to Base64 Converter - Encode Images to Base64 - Online - Browserling Web Developer Tools

Images 50x50 are recommended, you can get a sample of my images by copying the standard(in tweak.xm) base64 string & use this website to show the picture: Base64 to Image | Base64 Decode | Base64 Converter | Base64

Setting a framework as executable You can set this in the function setupMenu() inside Tweak.xm

Objective-C:
[menu setFrameworkName:"FrameworkName"];


Patching a offset without switch:

Objective-C:
patchOffset(0x1002DB3C8, "0xC0035FD6");
patchOffset(0x10020D2D4, "0x00008052C0035FD6");

// You can write as many bytes as you want to an offset
patchOffset(0x10020D3A8, "0x00F0271E0008201EC0035FD6");


Offset Patcher Switch:

Objective-C:
[switches addOffsetSwitch:@"One Hit Kill"
            description:@"Enemy will die instantly"
              offsets:{0x1001BB2C0, 0x1002CB3B0, 0x1002CB3B8}
                bytes:{"0x00E0BF12C0035FD6", "0xC0035FD6", "0x00F0271E0008201EC0035FD6"}];


Empty Switch:

Objective-C:
[switches addSwitch:@"Masskill"
            description:@"Teleport all enemies to you without them knowing"];


Textfield Switch:

Objective-C:
[switches addTextfieldSwitch:@"Custom Gold"
            description:@"Here you can enter your own gold amount"
              inputBorderColor:UIColorFromHex(0xBD0000)];


Slider Switch:

Objective-C:
[switches addSliderSwitch:@"Custom Move Speed"
            description:@"Set your custom move speed"
              minimumValue:0
                maximumValue:10
                  sliderColor:UIColorFromHex(0xBD0000)];


Checking if a switch is on:

Objective-C:
bool isOn = [switches isSwitchOn:@"Switch Name Goes Here"];

if(isOn) {
  //Do stuff
}

//Or check directly:
if([switches isSwitchOn:@"Switch Name Goes Here"]) {
    // Do stuff
}


Getting textfield or slider value:

Objective-C:
int userValue = [[switches getValueFromSwitch:@"Switch Name Goes Here"] intValue];
float userValue2 = [[switches getValueFromSwitch:@"Switch Name Goes Here"] floatValue];


Credits:

 
Last edited:
Tags
ios ios menu pmt ios menu