Disable ipad/iphone global gestures using Swift - ios

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

Related

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.

Is possible to lock screen in browser on mobile devices?

At the moment i am developing a small web application which is based on swipe and for example when i swipe it to right on my iPad or iPod the screen also goes to right. Is it possible somehow to lock screen?
You could download the jquery Dialog plug-in, http://jqueryui.com/dialog/ and set a condition for it to pop up, and also a message stating that the screen is currently locked. This is probably one of the cleanest ways of controlling your screen in regards to users proceeding or staying.

Can an app suppress iOS's multitasking gestures?

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.

Bring previous app back to the front when user is done with my iOS app

My iOS 4/5/6 app is meant to be used briefly. I want the user to click a "Done, now go away" button which takes them back to the app they were using before mine came to the front.
Is there a way for my iOS to put itself in the background while returning the previous app to the front?
On an iPad, the user can get that effect by doing a four-finger swipe horizontally across the screen. But that gesture is not a complete solution because (a) that gesture does not work on a handheld device, and (2) not many users know of that gesture. I want to programmatically return the previous app to the front.
I want the user to click a "Done, now go away" button
That button is the Home button.
I want to programmatically return the previous app to the front.
There's no public API for switching to another app. Users have a number of options for switching between apps, though. In addition to the swipe gesture you mentioned, they can do a four-finger upward swipe to get to the list of recent apps, or double-tap the home button for the same effect, or hit the home button once to go back to Springboard. Users, not apps, are supposed to be in control of which app is in the foreground. And the way they do that should be standard from one app to another. I can understand wanting to make life easier for the user, but what you're trying to do just isn't possible with the available API.
I Don't think you can do that if the previous application is not your property or if you are not aware if a URL Scheme has been incorporated in the previous application that you know of.
Launch App Via URL Scheme!

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