Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/98.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios GPS坐标不在UIImagePickerControllerDiametaData中_Ios_Objective C_Gps_Uiimage - Fatal编程技术网

Ios GPS坐标不在UIImagePickerControllerDiametaData中

Ios GPS坐标不在UIImagePickerControllerDiametaData中,ios,objective-c,gps,uiimage,Ios,Objective C,Gps,Uiimage,我试图从相机点击的图像元数据中获取位置 - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSDictionary *metadata = [info objectForKey: UIImagePickerControllerMediaMetadata]; NSLog(@"%@",metadata)

我试图从相机点击的图像元数据中获取位置

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    NSDictionary *metadata = [info objectForKey: UIImagePickerControllerMediaMetadata];
    NSLog(@"%@",metadata);


}
我得到的日志是

但是没有gps坐标。
注意-我班上没有核心位置经理。我不确定是否需要。我是否必须使用核心定位服务以编程方式将GPS坐标添加到图像中

注意-我没有在元数据中附加gps坐标,我想如果我的相机启用了定位服务,那么它会自动在我的应用程序中添加位置。gps坐标会显示在预览中吗?实际上,我没有在相册中保存此图像。我想知道,当摄像头从我的应用程序上启动时,iOS从未请求允许我的应用程序使用我的位置。我想我必须通过编程在图像的元数据中添加GPS坐标,是的,如果我从我的相机相册照片中记录照片,那么它会在日志中显示GPS坐标
{
DPIHeight = 72;
DPIWidth = 72;
Orientation = 6;
"{Exif}" =     {
    ApertureValue = "2.526068811667588";
    BrightnessValue = "1.530886431890497";
    ColorSpace = 1;
    DateTimeDigitized = "2013:01:11 14:58:42";
    DateTimeOriginal = "2013:01:11 14:58:42";
    ExposureMode = 0;
    ExposureProgram = 2;
    ExposureTime = "0.0303030303030303";
    FNumber = "2.4";
    Flash = 32;
    FocalLenIn35mmFilm = 35;
    FocalLength = "1.85";
    ISOSpeedRatings =         (
        320
    );
    MeteringMode = 5;
    PixelXDimension = 640;
    PixelYDimension = 480;
    SceneType = 1;
    SensingMethod = 2;
    ShutterSpeedValue = "5.058893689053568";
    WhiteBalance = 0;
};
"{TIFF}" =     {
    DateTime = "2013:01:11 14:58:42";
    Make = Apple;
    Model = "iPad 2";
    Software = "6.0";
    XResolution = 72;
    YResolution = 72;
};
}