Can an app suppress iOS's multitasking gestures? - ios

Is there a way to suppress gesture recognition? What inspires me to ask this question is watching my grand-daughter, who is a toddler, using an iPad. Quite often, she will accidentally invoke a gesture recognizer that switches apps. An example of this would be the four finger gesture where you can slide an app out of the way.
For a "child proof" app, is it possible to suppress these? Failing that, is it possible to suppress switching to another app? At first thought, that seems out of scope of an app, but maybe there is a way to do it.

You don't need to do it in your app, because it is an accessibility feature of iOS 6. It is called "Guided Access" and you can enable it in Settings -> General -> Accessibility in the Learning section.

I had the same requirement, but you cannot override the gesture recognition. It takes priority over your app.
Actually I wanted to do an app for my baby and had the same requirement!, but you cannot disable the gesture recognition on a non jail broken device ;(

No, but you can turn off it in settings manually. Go to settings> general> Multitasking gestures. I dont think we can control this via coding for normal apps, but you can inform the user to disable it here through an alert before using the app. That is the most appropriate way available now.

Related

How can I programmatically disable iphone home button in swift 4?

I am going to develop an application for kids. That I needed is I have to lock the home button permanently for this particular application but I didn't get any solution for this.
For kids, there is a feature in the iPhone setting called "Guided Access" this setting lock the phone with one app. This could be helpful for you. You can mention this in your app.
You can use this API to do programmatically. It was introduced in WWDC 2017. For more information how to use API and lock in a specific way. Please check this video. For doing programmatically without any device management it has been explained at 15:40th minute.

Check programmatically if the zoom function is activated on the Apple device

I need to know if the zoom function is activated on the Apple devices. This because in my App "AAccompanist" you can press up to 10 buttons simultaneously (e.g. to play chords). I am also interested, if the zoom function can be deactivated in the App programmatically.
Thanks for helping me.
Apple technical support wrote me, that this is not possible and so I wrote a Bug Report. Now I hope of a feedback from Apple.
If I put this line im my code, the user will be advertised about a possible conflict between the App and the multi finger gestures enabled:
UIAccessibilityRegisterGestureConflictWithZoom();
But the question pop up window is only shown once. When the user switches on again later the multi finger features, then no more warning will be displayed.

How can I "mock" the UI of an iOS app?

I am trying to take screenshots of my iOS app. Before taking a screenshot, I need to get the app to an appropriate state. To get to an appropriate state, a lot of swiping is required.
This would have been fine if I have actual devices, but I don't. So I need to perform swipes on a simulator using a trackpad. I find this very hard, and sometimes I can't swipe properly so the gesture is not recognised.
I thought of using the UI Testing library to programmatically perform swipes. However, my app is actually a game, and random events happen. Writing code to handle these random events would not be worth the time. It would be best if I am in control of the swiping.
I have also thought of adding buttons on the UI of the app. When they are pressed a swipe is simulated. Then I can just click those buttons instead of swiping with my trackpad, which is way easier. However, these buttons will then appear on the screenshot, which I obviously don't want users to see.
Also note that I can't use a tap gesture recogniser as a replacement for the swipe gesture recognisers, because I need to detect swipes in all four directions and do different things depending on the direction.
Essentially, how can I perform a "swipe" more easily on the simulator? It would be great if I can do this by pressing keys on my keyboard, or maybe there is a feature in Xcode that allows me to do this which I am not aware of?
I suggest you automate the UI test.
Recording a test from live actions is a standard Xcode UI test feature. Fastlane is the icing on the cake to automate the capture of screenshots too.
Fastlane has the tools to automatically run a UI test and capture screenshots in all device resolutions. You can even record the actions by recording a UI test and play it back.
Check it out here:
Fastlane Screenshot
Even if you do not wish to use Fastlane, you can record the gestures in a unit test and have it pause.

Disable ipad/iphone global gestures using Swift

I am building an app which will be displayed on an iPad. It will be an app for customers in the shop who will be able to leave their contact data. I am going to put an iPad to a frame so they won't be able to press home, lock buttons. Just the screen.
My question is: is there any way to prevent them from closing my app by a gesture? (fingers going closer to each other) or a gesture of switching apps? (3 fingers swipe left/right)
I suppose I can set it in settings, but I really need it to be set in the code.
Does iOS system provides that feature (disabling system gestures programically?)
Thank you

Ipad disable default multi gestures on my app

I want to develop an ipad app for babies, i have noticed that when a baby uses an ipad, she will use many fingers, making the gestures for the ipad activate, like switch activities, check springboard, or close activity, or notifications
How can i disable this gestures in my app? (then i will implement my own gestures)
So is possible to disable the default gestures?
Thanks!
Disabling the default gestures is not possible, you can only disable them from settings but still you can make up your own gestures
But keep in mind that system global gestures will have higher priority on your own gestures

Resources