[英]Simulate all physical buttons like the pressure on the home button on iOS 7 (Jailbreak)
我正在嘗試模擬iOS 7上的“主頁按鈕”,但iOS 6上使用的上一個方法不起作用。 我說的是一個越獄裝置。
#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);
}
*更新我真正需要的是一種通用的方法,比如舊方法,讓我模擬所有物理按鈕的壓力
嘗試這個。
[[%c(SBUIController)sharedInstance] clickedMenuButton];
我在BiometricKit的頭轉儲中找到了一些對homeButtonPress
引用https://github.com/MP0w/iOS-Headers/blob/6e220684809a8e581357c1622efcc002a1df5014/iOS7/PrivateFrameworks/BiometricKit/BiometricKit.h#L68
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.