How to disable the home indicator of iOS in Expo? - ios

I am using expo SDK 46. I would like to make the home indicator inactive or hide it. In my case, just one gesture movement closes the application. I want to make it harder for users since they can accidentally send the app to the background. As far as I see, we need two separate gesture movements to send the game to the background. An example game is Pokemon Unite. So, it should be possible.
I am already using expo-status-bar to hide the Status bar, and it seems it is not affecting the home indicator.
Any help is appreciated.

Related

iOS Multitask App Switcher Custom Image

im developing an iOS App and i would like it to behave like PayPal when the user double taps the home button.
For those who dont know the PayPal app displays a custom image when the app is displayed on the multitask switcher but it doesnt when a notification arrives or when the user pulls the notifications bar.
My issue comes when implementing this, im using the event applicationWillResignActive to display my custom image (as applicationEnteredBackground is not called for this). But this method is called on events on which i dont want the app to display the image (such as notifications, calls, pulling the top bar, etc).
Is there any way of setting this image only when the home button is double tapped?
Thank you!
From what I see, PayPal doesn't cover the viewport with a custom image immediately – when I double tap the Home button, it remains rendered normally until I do something else – but most probably on applicationDidEnterBackground:. After switching to Home screen or another application, the PayPal preview becomes covered.
On the other hand, my mobile banking application does that immediately when applicationWillResignActive: is triggered.
These are AFAIK the only two approaches you can achieve.

How can I detect from iOS Keyboard extension if user scrolled up the Control Center?

I develop an iOS Keyboard extension, and I'm using scroll gestures on keyboard. Sometimes when using the keyboard I scroll up the control center and my keyboard stops working fine. Is there any way to detect if control center become visible, or invisible?
You can't do it directly. The most you can know is that your app was deactivated and then activated again. It could be because of the control center, it could be because of the notification center, it could be because a phone call came in, it could be because the user went into the app switcher and came back again...
Here is the possible work around you can try:
It is the UIWindow subclass to enable behavior like adaptive round-corners & detecting when Control Center is opened. This UIWindow subclass does probably the thing you want. You simply subscribe to an NSNotification and can react to the user opening Control Center. Detailed instructions and setup on Github
https://github.com/aaronabentheuer/AAWindow
[AAWindow: The way this is accomplished is by using a combination of NSTimer and overwriting sendEvent in UIWindow to receive all touches without blocking them. So you basically receive all touches check if they are near the lower edge of the screen, if yes set a timer for a half a second and if during this timer is running applicationWillResignActive is called you can be almost certain that ControlCenter is opened. The time has to vary if there's no statusbar, because then the app is in fullscreen and it can take the user up to 3 seconds to launch Control Center.]
Hope it would help you figure out the exact solution to your problem.

iOS Swift Briefly Display Info

I want to have some information drop down from the top of a view, stay on the screen for a second or two, and then go back up out of the view. I have search for displaying notifications and/or banners. All I get is either push notifications (which I don't need to use) or iAds banners.
I'm working on a barcode scanning app and I want to briefly show the value of the barcode shown without requiring the user to tap on anything. How can I accomplish this?
Don't use notifications and banners, because that might not work: the user can turn them off. In any case this is not a notification of anything, so it's a misuse of notifications.
Just do what you described, yourself: animate a view onto the screen, and then (in the animation's completion handler) use delayed performance to animate the view right back off the screen after a short delay.
You should use a view which manages its own state (INCOMING, STAY PUT, OUTGOING). This way you can reduce the memory footprint and many other bugs in the process. I coded something for a similar process. Check it out

How to disable notification center on iOS using private API?

I have an app which is in foreground and I want to disable notification center UI in it (so a user can't open it). And I am looking for an API (or at least direction of search) to disable notification center UI or prevent a user from opening it.
Couple of important notes:
I am looking for a way to disable it completely within an app.
Just setting status bar to hidden and moving it to the left doesn't work for me. It still could be accessed.
I want just to disable it and don't modify any behavior.
So, kiosk mode does't work for me either.
Private API (not jailbreak tweaks) are fine.

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!

Resources