Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can take log of metadata with AssetsLibrary framework:</p> <pre><code>-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { ... NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType]; if ([mediaType isEqualToString:(NSString*)kUTTypeImage]) { NSURL *url = [info objectForKey:UIImagePickerControllerReferenceURL]; if (url) { ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset) { CLLocation *location = [myasset valueForProperty:ALAssetPropertyLocation]; NSLog(@"\n\n\n____________________________\n"); NSLog(@"ORIENTATION: %@\n",[myasset valueForProperty:ALAssetPropertyOrientation]); NSLog(@"LOCATION: %@\n",[myasset valueForProperty:ALAssetPropertyLocation]); NSLog(@"DATE: %@\n",[myasset valueForProperty:ALAssetPropertyDate]); NSLog(@"Duration: %@\n",[myasset valueForProperty:ALAssetPropertyDuration]); NSLog(@"TYPE: %@\n",[myasset valueForProperty:ALAssetPropertyType]); NSLog(@"\n____________________________\n\n\n"); //take coordinates only CLLocationCoordinate2D coordinate = [location coordinate]; strCoord = [NSString stringWithFormat:@"long: %f; lat: %f;", coordinate.latitude, coordinate.longitude]; NSLog(@"%@", strCoord); // location contains lat/long, timestamp, etc // extracting the image is more tricky and 5.x beta ALAssetRepresentation has bugs! }; ALAssetsLibraryAccessFailureBlock failureblock = ^(NSError *myerror) { NSLog(@"cant get image - %@", [myerror localizedDescription]); }; ALAssetsLibrary *assetsLib = [[ALAssetsLibrary alloc] init]; [assetsLib assetForURL:url resultBlock:resultblock failureBlock:failureblock]; } } ... } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload