Requires C++11 or above.
See how to use KittyMemory in Tweak.mm.
git clone --recursive https://github.com/MJx0/KittyMemory.git
- In your tweak Makefile somewhere at top, define:
KITTYMEMORY_PATH = path/to/KittyMemory
KITTYMEMORY_SRC = $(wildcard $(KITTYMEMORY_PATH)/*.cpp)
- Add KittyMemory source files to your tweak files:
$(TWEAK_NAME)_FILES = Tweak.mm $(KITTYMEMORY_SRC)
- Finally add keystone static lib to your tweak obj files:
$(TWEAK_NAME)_OBJ_FILES = $(KITTYMEMORY_PATH)/Deps/Keystone/libs-ios/$(THEOS_CURRENT_ARCH)/libkeystone.a
If you don't want to link keystone and use MemoryPatch::createWithAsm then add definition kNO_KEYSTONE to your cpp flags:
$(TWEAK_NAME)_CCFLAGS += -DkNO_KEYSTONE
You can check example here Makefile.