Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4589608
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:06:16+00:00 2026-05-21T22:06:16+00:00

Possible Duplicate: How can i avoid Location service in AlAssetLibrary? Can i retrieve files

  • 0

Possible Duplicate:
How can i avoid Location service in AlAssetLibrary? Can i retrieve files using AlAssetLibrary without using Location Service?

Hi all,
I am a newbie in iphone development and obj-c. i am using “ALAssetLibrary” in my Application to retrieve images from Photo Library.
I identified that “ALAssetPropertyLocation“Property Key only available if location services are enabled for the caller. it is the key to retrieve the location information of the asset.But i am not using “ALAssetPropertyLocation”Property.i am using only ALAssetPropertyURLs.

whenever i am trying to deploy my Application in a new device there is a message box with the message “Location Service needed..”
can i able to hide the “ALAssetPropertyLocation”Property?

I would really appreciate if someone could assist me in the correct way to approach my problem, and if possible any sample code to get my started.

Thank You In Advance 🙂

this is my Code:

//Getting image url from dictionary according to the user input
NSURL *imageurl = [dict objectForKey: [youSaid text]];   

//Getting asset from url
typedef void (^ALAssetsLibraryAssetForURLResultBlock)(ALAsset *asset);
typedef void (^ALAssetsLibraryAccessFailureBlock)(NSError *error);    
ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset)
{
    ALAssetRepresentation *rep = [myasset defaultRepresentation];
    CGImageRef iref = [rep fullResolutionImage];
    //Setting asset image to image view according to the image url
    [imageview setImage:[UIImage imageWithCGImage:iref]];        
};
ALAssetsLibraryAccessFailureBlock failureblock  = ^(NSError *myerror)
{
    NSLog(@"Error, cant get image - %@",[myerror localizedDescription]);
}; 

if(imageurl != nil)
{
ALAssetsLibrary *assetLibrary=[[ALAssetsLibrary alloc] init];
[assetLibrary assetForURL:imageurl resultBlock:resultblock    failureBlock:failureblock];      
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:06:17+00:00Added an answer on May 21, 2026 at 10:06 pm

    enabling “location services “is a requirement for using the AssetsLibrary.
    The reason is that any photos/videos in the Photo-Library might contain geodata. This data is not just available through ALAssetPropertyURLs, but also if you read out the raw data from the asset (by using the getBytes:fromOffset:length:error: Method of ALAssetsRepresentation). Cause there is no way to strip the geo metadata from the raw image data (in case location services are disabled), I guess the design decision was made to make “location services” mandatory for using the AssetsLibrary.

    This requirement might be confusing to the user. So you need to do 2 things:

    1) If the user denies access to location services, then present a clear message while your app needs this access and that the app does not actually determine the current position or any GPS/data.

    2) Display clear instructions how to enable location services, once the user has pressed “NO” on the initial dialog.

    Cheers,

    Hendrik

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Where can I get a list of all countries/cities to populate a
Possible Duplicate: Can't pass mysqli connection in session in php Many of us have
Possible Duplicate: Can I go back and edit comments on an SVN checkin? I've
Possible Duplicate: Can I set a breakpoint on 'memory access' in GDB? I want
Possible Duplicate: Can i override HOME Button on my own Home-Screen from my application?
Possible Duplicate: How can I write a Java application that can update itself at
Possible Duplicate: How can I disable the UITableView selection highlighting? I am programatically making
Possible Duplicate: How can one close html tags in vim quickly One of my
Possible Duplicate: Github: Can I see the number of downloads for a repo? Can
On the Google maps web interface if you zoom in enough you can see

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.