How to dismiss iOS camera Access popup? - ios

My app requests access to the iPhone/iPad camera. This results in the native iOS popup to appear, asking for user confirmation.
Is there a way in which I can dismiss this iOS popup (so before the user has made the OK / Don't Allow choice)?

For recent versions of iOS this popup automatically appears when you request write or read access for iOS Photo Library or use some of the AVFoundation framework components.
You can not dismiss it programmatically but you sure can create your own alert before showing the system one so you can have more control over what the user does.
It is the case in many 3rd party apps because when the user declines the access, it's not easy to ask them to go to settings and re-enable it from there. One of the easiest examples to implement would be something like this.

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.

Open Display & Brightness Settings on AlertView button

Is there a way to open the Settings in Display&Brightness when tapping an alertView buttons? I want the user to be redirected here in order to change its Standard/Zoom view mode.
No.
In iOS 8, there is no supported method for a third-party app to open Settings to anything other than the top level, or to their app's custom settings, if they exist.
What you see in Tinder and Facebook are system alerts that iOS presents when your app wants to use the network or location services and (cellular data or) wi-fi is turned off. This is managed by iOS, and is not something that Tinder or Facebook had to add to their app.

Prevent Google Cardboard Pairing / Startup Screen on iOS

When my google cardboard app starts up for the first time, it launches a Google page that says "Google Cardboard. Let's get you set up. Pair your phone with your viewer for the best experience."
I'd like to control this experience to show my own initial screen before the google cardboard sdk launches. One reason for this is that I want people without cardboard to be able to immediately start experiencing the app in non-cardboard mode without having to go through the pairing process.
I know I can launch the pairing / viewer profile selector later on with the cardboard.ShowSettingsDialog().
One way to do this with the current version of the SDK is to have a starter scene without a Cardboard component in it. It will not be in VR, and it won't trigger onboarding.
[edit] The function OnFocus() in CardboardiOSDevice.cs is where it decides to launch the onboarding dialog. You can suppress that by editing this function. But you may want to continue using the onboarding dialog for first time users, rather than the settings dialog, because of it walks them through the scanning process.

Performing a task through a website and going back to an iOS app

I'm developing an iOS 7+ app that I need to offer the option of navigating to a certain web page to let the users to fill in a form there, and after that to come back to the app's view where the user was.
Is it possible to programmatically open Safari with a given url? If it is, I suppose that then there is no way to automatically redirect the user to your app from there... right? Is then a UIWebView the only option? Is it possible to navigate back or dismiss the view with the UIWebView without the need of user interaction?
Thanks
You can open links in Safari as detailed in this post How to launch safari and open URL from iOS app
I don't believe you can set a 'callback' and have it return to your app on completion, as you have no control over the user once they have exited your app's sandbox.
Opening the link in UIWebView would provide control, as you can utilize the UIWebView callbacks.

Can I start iOS app by pressing home button for any times&

My question:
I have an iOS app, it is minimized, and I want it to start when user press home button three times (or, for example combination of buttons, like "HOME+Volume-" and so on). Can I make it for non-jailbroken devices, only with native iOS functions?
It's not possible to customise iOS like that.
Without jailbraking, apps can only be opened by using custom URL schemes from other apps or by normally tapping on the on the home screen. To have an app open like this you would have to modify the OS and there is no way you can do that without a jailbreak.
Standard OS functionality like pressing the home button multiple times cannot be overridden because Apple is really against modifying any part of way the user interacts with apps or the OS.
No.
Not possible without jailbreak and then it would have to be some sort of preference in the OS settings.

Resources