How does the process of "asking if user wants to use Location Services" work?
I read here that a dialog at the installation appears, which asks the user if Location Services should be allowed or not. Does it mean that there is nothing to do for the developer, because the user can change this behavior in settings? So there is no "asking dialog" to implement and no storing in system settings? Does the app need a settings menu where this behavior can be changed?
What is if I want such a settings menu in my app?
The only thing the developer has to be aware of is to check in his code if it is allowed or not? See here.
Sounds reasonable isn't it ? Yes, that's it. No dialog to implement yourself, iOS manages that for you.
The user can change the settings in Settings/General/Location Service.
Related
I am working in iPhone application, Using CLLocationManager to develop my application, when I run the application and its show one alert view like "Would like to use Your current location".
Then prees Ok to continue it.
But I don't want to show an alert view, is it possible to let the app track the user's location without a prompt?
Thanks in advance
This alert view is mandatory and there is no way to avoid it, unless you somehow create your own location tracking client, however any access of location without a prompt is prohibited by the guidelines and Apple will reject your app.
The reason is so users are aware that you are tracking your location -- security and preference.
Why would you want to avoid the alert view in the first place?
This dialog is promtped by the system for privacy and security reasons. If you somehow manage to avoid this and access location data, your app will be surely rejected during the App Store Approval Process. Why do you want to get rid of it?
No, I am 100% sure it's not possible to prevent this alert view
but I think when you click on Don't allow then your CLLocationManager is stop but you can again give it to allow from iphone setting
Is there any way I can read settings for iPhone preferences. I wanted to read whether the push notification flag is on or not. Based on this setting, I wanted to take some action in my native application. Please guide.
You can read settings for your application using NSUserDefaults. If you are asking if you can read whether push notifications are on globally, then no, I don't think you can. If your application asks to use them, it will ask the user if they want to turn them back on, but that is all you can do.
I currently have an application that requires the user to maintain a VPN tunnel. On load I check if the VPN tunnel is available.
I am wondering if there is any way for me to display an UIAlertView which on clicking "OK" takes the user to the iPhone main settings screen, so they can turn on VPN.
I know how to store app specific settings and that seem to be the most common articles out there, but is there any way to get your app to redirect the user to the main iPhone settings page?
As said, there's no way to do this currently. You'll have to create your own settings screen inside your app.
See a similar thread here:
How do I open the Settings application from my application?
iPhone has it's own NSURL protocols for apps, such as youtube:, mail:, etc. Judging by the "Airplane Mode" alert, there is clearly one for the Settings app. I imagine it is open, but don't know what the syntax would be off the top of my head. Check the docs about the protocols.
I'm experiencing an issue with how iOS 4 manage Location Service. Previously, when the location service is disabled, any application that uses location service will prompt the user to turn it on. However, in iOS 4, it didn't prompt that dialog box and just stays quiet. Is there a way to call the default dialog box which ask the user to turn on the location service, or did they remove that and requires the developers to create their own dialog box?
If the user doesn't want any apps to know their location, you shouldn't nag them. The user can also disable location services for specific apps.
There is a way to detect this behavior with Javascript in the browser - the error returned has a different code and message - so I imagine that there's a way to do this with an actual app as well.
Not an Obj-C coder, though, so can't actually help out with details. :)
I'm working on giving our users context-specific PUSH notification settings, similar to what Facebook has in their settings menu.
As far as I can tell though, there's no way to actually notify our server of these changes until the user actually launches the app.
Is this correct? Is there any mechanism provided for immediately alerting our servers to a settings change?
That's correct: you can't detect changes made in the settings app until the next time your app launches.
The closest option to what you're describing would be to put the settings in your app somewhere and notify the server from there.