Basically, we either have remote access to the iPhone or the phone is connected to a network where we can control the phone (send it messages etc.) How can I simulate a swipe without touching the actual phone? I know there are Swipe Recognizers, but I haven't found a way to HARDCODE coordinates to simulate a swipe; for example, without touching the phone, perform the swipe to unlock.
A swipe is input. You'd normally recognize the swipe, either with a gesture recognizer or by handling the touch directly, and then perform some sort of action. If you want to simulate a swipe, just perform the action that would be performed if the user made the equivalent gesture.
For example, if a swipe would normally switch to a different view, simply call the method that switches to that view. If possible, do it with animation so that the user has some visual indication of what's going on.
I'm not entirely sure that what you are trying to do is possible, unless maybe with a script in the Automation instrument. However, if the iPhone is jailbroken, you could install Veency and connect the phone through any VNC client and interact with it that way.
Related
Hi guys I've a big question.
If I have an app that could be protected by Touch ID protection, how do I have to manage the 3D Touch quick action that interests data? I've to ask fingerprint before the execution of the action, or I let the action be executed without any lock, or maybe I create an alert that tell the user 'Impossible to use quick action while Touch ID protection is actived' ?
So, I ask you the best way to manage this type of problem..code will be well accepted :)
It should be noted that
sensitive information are not to be shown when the app icon is 3D
touched.
What should happen is that you should allow the user to interact with
the 3D Touch but when the app opens the screen based on user's
selection, the app should prompt for Touch ID or passcode alert.
Unless it's verified app shouldn't function as intended since the user
is not authenticated at that point.
In case you want to stop the actions from appearing all together, then it could be done, you would
just need to change the 3D Touch actions dynamically.
Refer to this for details, there are two ways to generate action 3D Touch action items, static and dynamic. Using the dynamic one, you could achieve it.
I'm looking for my app to listen for the single tap and hold of the play/pause button on headphones for iOS devices. Currently, the behavior is to start Voice Control (on my iPhone 4).
The event list for remote control events allows for getting the double tap and hold (BeginSeekingForward) and the release (EndSeekingForward), but I'm looking for the single tap and hold which currently activates Voice Control.
Is there a way for my app to override Voice Control and listen for the single tap and hold?
You can add in a UILongPressGestureRecognizer to your UIButton and work from there.
If you want to prevent your other method from being called, you'll also need a UITapGestureRecognizer that counts taps and sets a value to true when it receives a second tap and another method (Check from your UIResponder touch* methods) for a touch release and set the value back to false.
Using that value, you can check with the UILongPressGestureRecognizer to see if the user double tapped or not.
Alternatively, you could also just have the value set to false upon a touch to the button that doesn't have a tap count of two.
Hope this helps!
EDIT: You cannot override the headphones (as far as I know) without jailbreaking the device. Normally you should never have to code for people interacting using the Apple headphones, since that would severely reduce the market and usability of your app. If someone were to forget their headphones, for example, they could not utilize your app. Its just something to think about. You don't want to limit your apps accessibility too much.
I am writing an API in C++ Builder that collects information for events on the touchpad of a windows laptop.
This is how I was doing it.
I was creating a window
when the touch pad is touched, I simply paint that information on that window in WM_PAINT event.
But now I dont want to create that window (form), i want to catch all the events, even if user is on desktop screen or on another application's window. If an application that is using my API is running in background i want to be able to get that touch even information in the code. How can I do that??
I hope you are getting my point ... actually i want to do it in a seamless way, otherwise that white form window will irritate the user.
I also want to save these events in a link list and want to return that out of the API is it possible??
I will be very thankful for your time. I really need to work it out in next few hours.
The touchpad is just a mouse like any other. It generates standard mouse events. Use a global WH_MOUSE hook via SetWindowsHookEx() to capture mouse events globally. To replay them, use mouse_event(). Alternatively, use WH_JOURNALRECORD and WH_JOURNALPLAYBACK hooks instead for capture and playback, respectively.
My game has a swipe up gesture recognition that does something. Because I use it a lot and making swipe on iPhone Simulator is not easy I want to use the real keyboard instead.
How can I capture the real keyboard (the one connected to the pc running the simulator) presses to do the thing instead of having to swipe with the mouse?
Well, I would suggest using real hardware to do this if thats the problem. But you obviously dont want to take that route OR, dont want to pay the $99 bucks yet. So I suggest creating a macro that does the mouse movement for you. You can create a macro that repeatedly does a mouse click, move and unclick (a swipe gesture). Over and over again with a pause interval inbetween. You can then set a hotkey like (CTRL + M) that will start and stop the macro. Good luck.
Hey, I was wondering if there was an event or something that can check if my user is holding down a button? (for iphone, iOS)
The Event class is TouchEvent. You'll need to toggle the touch state in a variable if you want to keep the fact someone is pressing down after the fact (of the event).
You can use MouseEvent if you need/desire a single touch point. Though you still need the variable.
You need to set Multitouch.inputMode to MultitouchInputMode.TOUCH_POINT in order to turn on touch events on the iPhone. Unfortunately, you can only test touch/gesture events on the iPhone itself. (MouseEvent and TouchEvent are virtually identical in use: MOUSE_DOWN = TOUCH_BEGIN, MOUSE_MOVE = TOUCH_MOVE, TOUCH_END = MOUSE_UP. The main difference is that you can only have one "mouse" yet multiple touches.)
Personally, I use MouseEvent to test on the machine, with an if-then setting up TouchEvent listeners if Multitouch.supportsTouchEvents is true (which it only is on the iPhone/Android).
If the button is a Cocoa Touch UIButton, you can easily connect a number of its gesture events from Interface builder to code Xcode IBActions (where you write the appropriate methods).
How your project would connect to flash, I am not sure. Give us more details and perhaps someone can better help. ;)