Simulate all physical buttons like the pressure on the home button on iOS 7 (Jailbreak)

ぃ、小莉子 提交于 2019-11-29 14:23:21

问题


I'm trying to simulate the "home button pressed" on iOS 7 but the previous method used on iOS 6 doesn't work. I speak of course of a jailbroken device.

#include "GSEvent.h"

    - (void)simulateHomeButton
    {
       struct GSEventRecord record;
       memset(&record, 0, sizeof(record));
       record.type = kGSEventMenuButtonDown;
       record.timestamp = GSCurrentEventTimestamp();
       GSSendSystemEvent(&record);
       record.type = kGSEventMenuButtonUp;
       GSSendSystemEvent(&record);
    }

*UPDATE What I really need is a generic method like the old one that let me to simulate the pressure of all physical buttons


回答1:


Try this.

[[%c(SBUIController) sharedInstance]clickedMenuButton];




回答2:


I found some references to homeButtonPress in the header dumps of BiometricKit https://github.com/MP0w/iOS-Headers/blob/6e220684809a8e581357c1622efcc002a1df5014/iOS7/PrivateFrameworks/BiometricKit/BiometricKit.h#L68



来源:https://stackoverflow.com/questions/20998318/simulate-all-physical-buttons-like-the-pressure-on-the-home-button-on-ios-7-jai

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!