8

How can I simulate the home button press event in iOS 7? I tried, but it only worked at the home screen but not inside the other apps.The problem is mainly about the port, it looks like that if I got the task port of SpringBoard, it works, otherwise not.But how can I get the task port of SpringBoard no matter at the home screen or inside others apps?Thank you!

Suge
  • 2,808
  • 3
  • 48
  • 79
  • Might look here! http://stackoverflow.com/questions/20998318/simulate-all-physical-buttons-like-the-pressure-on-the-home-button-on-ios-7-jai – trumpetlicks Mar 06 '14 at 14:20

2 Answers2

8
[[%c(SBUIController) sharedInstance]clickedMenuButton]; //One tap

[[SBUIController sharedInstance] handleMenuDoubleTap]; //Double tap

[[%c(SBUserAgent) sharedUserAgent] lockAndDimDevice] //Lock button
Segev
  • 19,035
  • 12
  • 80
  • 152
  • thank you, but can I simulate home button down and up events separately, and how can I simulate volume button click events? – Suge Mar 07 '14 at 05:36
  • 4
    @Suge Not that I know of and That's a different question from the initial post. Ask it separately. – Segev Mar 07 '14 at 05:54
  • Thank you, may be I can use `IOHIDEventSystem` to achieve this, but can you take a look at this http://stackoverflow.com/questions/22243657/how-to-get-task-port-of-sbapplication-in-ios-7-jailbroken, I'll very appreciate it. – Suge Mar 07 '14 at 07:07
0

Kindly check these below links:

1) http://iphonedevwiki.net/index.php/SBApplication

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

3) https://github.com/MP0w/iOS-Headers/blob/6e220684809a8e581357c1622efcc002a1df5014/iOS7/PrivateFrameworks/BiometricKit/BiometricKit.h#L68

Hopefully these links help you in resloving your problem. Cheers :)

Community
  • 1
  • 1
Irfan
  • 4,301
  • 6
  • 29
  • 46
  • Your second link is nothing more than what the first answer posted here describes. Please, don't post redundant information. Thanks. – Nate Mar 13 '14 at 20:21
  • @Nate yes your right, I just add link of that post that it may help Suge to figure out his problem by reading the complete post and discussion there. Thanks – Irfan Mar 14 '14 at 04:17