iOSOpenDev icon indicating copy to clipboard operation
iOSOpenDev copied to clipboard

ARC Restrictions error

Open bvoq opened this issue 11 years ago • 1 comments

The substrate.h gives me this error: ARC Restrictions: Cast of an Objective C pointer to 'char' is disallowed with ARC. The line of error: void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));

Tweak Code (simple tiny towers hack.xm): %hook TTGameData -(int) coins { return 9999999; }

%end

This would be the .mm

include <logos/logos.h>

include <substrate.h>

@class TTGameData; static int (__logos_orig$ungrouped$TTGameData$coins)(TTGameData, SEL); static int _logos_method$_ungrouped$TTGameData$coins(TTGameData*, SEL);

line 6 "/Users/Kivifreak/Desktop/Scripting/MobileSubstrate/Tiny Towers Hack/Tiny Towers Hack/Tiny_Towers_Hack.xm"

static int _logos_method$_ungrouped$TTGameData$coins(TTGameData* self, SEL _cmd) { return 9999999; }

static attribute((constructor)) void _logosLocalInit() { {Class _logos_class$_ungrouped$TTGameData = objc_getClass("TTGameData"); MSHookMessageEx(_logos_class$_ungrouped$TTGameData, @selector(coins), (IMP)&_logos_method$_ungrouped$TTGameData$coins, (IMP*)&_logos_orig$_ungrouped$TTGameData$coins);} }

line 13 "/Users/Kivifreak/Desktop/Scripting/MobileSubstrate/Tiny Towers Hack/Tiny Towers Hack/Tiny_Towers_Hack.xm"

bvoq avatar Mar 10 '13 12:03 bvoq

Bump on this one

eni9889 avatar Oct 24 '14 03:10 eni9889