I like to do a tutorial that ask user have to press the 'Always Allow' button in the Location Permission request.
In my opinion, use a ViewController and add a UIAlertController as a subView in it, and then add another CAShapeLayer to create a white rectangle to highlight the 'Always Allow' UIAlertAction.
My problem is that I can't locate the 'Always Allow' UIAlertAction.
I need the CGPoint of this UIAlertAction. How to get it?
Update:This is not a real permission alert, I think many people misunderstanding it. In iOS, when a permission alert popup, user sometimes choose any one without reading the message on it. Because our hardware product needs location update in background, we hope user have to choose 'Always' location option, this is why do that. We want to do a guide to teach people that a alert page will display at next step and please choose the correct one. After pressing the upper right corner button, the real permission will popup. I think it's a good way to guide user.
The Right Way To Ask Users For iOS Permissions
Any suggestions for it? Thanks.
The "Allow to use location" alert is provided by the system which displays the UI in another process.
This is bad UX.
Apple will reject your app for doing this.
Related
I'm making an app with sensitive info for user.
I implemented face id and touch id, but the face id is very fast and I want to make sure the user did not push the button in my app by mistake.
For this I wanted to implement the double tap on the side button as it happens in the app store.
I read Apple's documentation on the face id, LocalAuthentication, and LAContext but did not find anything about it? Is there any way to get this diclaimer or to detect the double tap on the side button?
No, you can’t catch a double press of the side button. You need to make your own custom UI that confirms after successfully using Face ID, but before taking the action.
If you want something simple and intuitive, use UIAlertController with the action sheet style.
I work for a roadside service and I have an app I made that will text me the user's location, that way I can find them easier. Right now I have it where you click the location button, it brings up a text message view with my number and their location in the body already set. All they have to do is send the text message. But as we all know, when something what may seem easy to us, it can be hard to do for others, especially for the elderly and technically challenged. So a lot of times I have to tell them how to do it, still easier than telling them how to share their location through Apple Maps.
So I was wondering if there was a way that I could put a UIAlertView that says "Share your location with .... through text message?". And if they hit yes or send, it will send the text for them. I know Apple won't let you send SMS without the user so you can't spam their contacts, but what if they give you permission through a UIAlertView?
Apple does not allow workarounds like this for suppressing the screen for SMS sending.
The most you can do is displaying an alert view that describes what the user should do on the message sending screen (pressing the round button in the bottom right corner etc.)
The first screen of my app is a MapView so when the user opens it up for the first time it prompts for Location Services. The issue is that immediately after the prompt comes up asking for location access it gets hidden (fades into the background) like some subview came over top of it.
Does anyone have a fix for this?
It sounds like you are either proceeding with another prompt for location services before the confirmation is given, or else you are on iOS 8 and prompting for location services (which is now asynchronous) and then going ahead and using them before this can complete.
In one of my app I'm using Location Services. I'm throwing a normal alert view whenever the location services are off like "Enable Your Location Services" with "OK" button when I open my app. But I don't want this. Rather I need to show the alert view as "Turn on Location Services to Allow Your_App_Name to Determine Your Location" with "Settings" and "Cancel" button as shown in the image. Give me the suggestions with a sample code, Thanks.
You should just pop up an UIAlertView telling the user that needs to enable Location Services.
If you want to be more precise, you can always create a new View explaining the user how to enable location Services using graphical content, that makes it so much easier for the user.
You cannot open the Settings page from your app, and if you could, your app would be rejected on the app store.
Our app uses location services, and registers in the normal way. We have an issue on 1 (!) iPhone where it's not showing in the Location Services, no matter what we do. The question is, does anyone know if this is a bug in iOS, or could there be something we're not doing?
Any thoughts welcome.
The app needs to trigger location settings to appear open up Facebook on ur phone click on the top left corner then press on nearby and allow it once that is done Facebook will appear under location settings
The best way to trigger facebook location services is to go to settings in your facebook app, next go to events. In events you will find a setting icon you need to click that. it will popup location permissions. Select while using.
If you can't find the setting icon in events tab, try to create a new event and it will ask you for location.