Search code examples
iosgpsuiimagepickercontrollercllocationmanagergeotagging

Geo tagging in application involving the standard iOS UIImagePickerController


Here is the set up:

I am making an application 'X'. This application allows a person to upload their location. Their location can be turned off in Setting > Location > 'X' for their privacy. I also implement UIImagePickerController which allows users to take pictures and upload to the server.

The question:

Would geo-tagging be enabled for App 'X' pictures following these scenarios:

1.) geo-tagging on iOS camera app is enable and App 'X' location is disabled.

2.) geo-tagging on iOS camera app is disable and App 'X' location is enabled.

Follow up question: if geo-tagging is handled by the iOS camera app, is there a way to prevent users' location to show up in the picture taken by app 'X' camera?

Thank you.


Solution

  • Geo-tagging in the camera app is independent of geo-tagging when using UIImagePickerController. Even more importantly, UIImagePickerController does not add location data to images or videos shot using it - you must do that yourself.

    So to take your questions:

    1. geo-tagging on iOS camera app is enable and App 'X' location is disabled. -- As I noted above, location services for the Camera app apply only to that specific app, not to apps that use the UIImagePickerController. So this questions shortens to "App X location is disabled". With your app's location services disabled, you will not be able to get location data to add to pictures taken with UIImagePickerController in your app.

    2. geo-tagging on iOS camera app is disable and App 'X' location is enabled. -- Same thing here. The setting of location services for the Camera app is immaterial to you. This question shortens to "App X location is enabled". Now with location services enabled for your app, UIImagePickerController will still not add GPS coordinates to images or videos shot with it, but at least you app can use location services to get those GPS coordinates and add them yourself to the stuff you get back from UIImagePickerController.