Few days ago I wrote a tweak that hooks ASIdentifierManager advertisingIdentifier
Here is my Tweak.xm
:
#import <AdSupport/ASIdentifierManager.h>
%hook ASIdentifierManager
-(NSUUID*)advertisingIdentifier
{
//id result = %orig;
//%log;
NSUUID *x = [[NSUUID alloc] initWithUUIDString:@"11111111-1111-1111-1111-111111111111"];
return x;
}
%end
And it works fine on my iphone 5s, but not on my iPad. Probably the problem us that on my iPad i only installed openssh after jailbreak and on my iphone i've lots of stuff installed.
Here is my Makefile
export SDKVERSION=7.1
export ARCHS = armv7 armv7s arm64
export TARGET = iphone:clang:7.1:7.0
export THEOS_DEVICE_IP=192.168.1.121
include theos/makefiles/common.mk
TWEAK_NAME = iHabrTweak
ARCHS = armv7 armv7s arm64
iHabrTweak_FILES = Tweak.xm
iHabrTweak_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk
My plist
{ Filter = { Bundles = ( "com.apple.UIKit" ); }; }