Skip to content

Batchhh/IOS-Il2cppResolver

Repository files navigation

IOS-IL2CPP Resolver

A run-time API resolver for IL2CPP Unity.

Environment Variables

Change in Config.h

BINARY_NAME to target the right file! Default is "UnityFramework"

WAIT_TIME_SEC

Example usage

This need to be added in your tweak.xm!

static inline const char* IL2CPP_FRAMEWORK(const char* NAME) {
        NSString *appPath = [[NSBundle mainBundle] bundlePath];
        NSString *binaryPath = [NSString stringWithFormat:@"%s", NAME];
        if ([binaryPath isEqualToString:@"UnityFramework"])
        {
            binaryPath = [appPath stringByAppendingPathComponent:@"Frameworks/UnityFramework.framework/UnityFramework"];
        }
        else
        {
            binaryPath = [appPath stringByAppendingPathComponent:binaryPath];
        }
        return [binaryPath UTF8String];
    }

INIT (IMPORTANT)

#include "IL2CPP_Resolver.hpp"

IL2CPP::Initialize(true, WAIT_TIME_SEC, IL2CPP_FRAMEWORK(BINARY_NAME) // This needs to be called once!

IL2CPP::Initialize(false, WAIT_TIME_SEC, IL2CPP_FRAMEWORK(BINARY_NAME) // This will not wait for the module. 

For more usage check the wiki

Authors

License

MIT

About

A run-time API resolver for IL2CPP Unity.

Resources

Stars

Watchers

Forks

Languages