iOS逆向之hook控制定位开关

作者: 伦_伦 | 来源:发表于2017-08-12 15:57 被阅读83次

1、hook SpringBorad

我们还需要写两个头文件骗过编译器,并在tweak.xm中导入。

// CLLocationManager.h

@interface CLLocationManager

+(id)sharedManager;

+(BOOL)locationServicesEnabled;

+(void)setLocationServicesEnabled:

(BOOL)enabled;

@end

判断是否打开定位

[[CLLocationManager sharedManager]locationServicesEnabled]

打开定位

[CLLocationManager setLocationServicesEnabled: YES]

关闭定位

[CLLocationManager setLocationServicesEnabled: NO]

相关文章

网友评论

    本文标题:iOS逆向之hook控制定位开关

    本文链接:https://www.haomeiwen.com/subject/blrjrxtx.html