Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample project not loading photos on iOS 4.2.1 #1

Closed
djrossi opened this issue Dec 2, 2010 · 4 comments
Closed

Sample project not loading photos on iOS 4.2.1 #1

djrossi opened this issue Dec 2, 2010 · 4 comments

Comments

@djrossi
Copy link

djrossi commented Dec 2, 2010

The navigation bar continues to say "Loading..." and it never retrieves the photos from the library. It works fine in the simulator.

@djrossi
Copy link
Author

djrossi commented Dec 2, 2010

I just found out that you need to enable location services to access the user's photo library. After enabling core location, all of the photos loaded as expected.

@mike-bytes
Copy link

I'm having the same problem even after enabling location services (Settings->General->Location Services->On) on my iOS 4.2.1 device. Anyone find an alternative solution to this?

@djrossi
Copy link
Author

djrossi commented Jan 11, 2011

You have to enable location services for your application, and ask for permission from the user. Enable location services in the settings application will not solve it.

@mike-bytes
Copy link

Thanks for the reply. I googled for a while and found the reason: it appears that [ALAssetsLibrary enumerateGroupsWithTypes:] fails if it is executed on a thread that is not the main thread. Enclosing the function in dispatch_async(dispatch_get_main_queue() seems to solve the bug.

The details are documented here:
https://devforums.apple.com/message/323036#323036
and
http://stackoverflow.com/questions/4200552/assets-library-framework-not-working-correctly-on-4-0-and-4-2

@RuiAAPeres RuiAAPeres mentioned this issue Oct 14, 2011
jvanmetre pushed a commit that referenced this issue Oct 21, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants