Monday 15 July 2013

ios6 - How to remove location services request from PhoneGap iOS 6 app? -


I am using PhoneGrap 2.8 to create iOS 6 app I'm making it in XCode, not using the phonegap build. My app does not require location services, but uses the camera. Every time he returns from the camera, then. Make a picture (), call it an app to allow an app to use location services, if I do not say, or location services are disabled, then photos can not be found back to my app.

This also happens when I deny camera app location services in privacy settings. I also edited my config.xml and removed the cdvolocation for all the references. Navigator in my javascript code. There is no reference to geolocation.

Why is this location asking for services? Is my XCode somewhere else in the project, do I need to remove this permission, or exclude a PhoneGap module? Does iOS 6 display any app on this prompt using the camera, even if the user has already prevented the camera from using location services?

Thank you for any help.

It seems that Phonegap automatically added Exifa data to the JPG image taken with the camera The location that triggers the alertness of services, there are two ways to prevent it from happening:

1 - Specify PNG for the format of the captured photo (by default phonegap JPEG uses EXIF ​​data)

  encodingType = navigator.camera.EncodingType; Function CapturePhotite () {navigator.camera.getPicture (ParfotoDataSoot, Onfile, {Encoding Type: Encoding Type PNG, Destination Type: Destination Type.dATA_URL}); 2) If you want to use JPEG instead of PNG images, then you have to comment these lines between the lines  Cordova Lib / Classes / CDVMMMM . 312 and 322. This is the code that adds EXIF ​​data to the picture.  
  NSDictionary * Controller metadata = [information objectForca: @ "UIImagePickerControllerMediaMetadata"]; If (Admin metadata) {self.data = data; Self. Metadata = [[NSMUTABALABhAlQAlok] Init]; NSMutableDictionary * EXIFDictionary = [[Controller metadata objectForca: (NSString *) kCGImagePropertyExifDictionary] mutableCopy]; If (xiudation) [self. Metadata Set Object: XIFFONITY FORKE: (NSSTING * KCGIMS PROPERTYExfidation]; [[Self-Position Manager] start-up location]; Return; }    

No comments:

Post a Comment