iOS: How to tell which album(s) a photo belongs to - ios

How do I get the list of albums that a photo belongs to in iOS?
I'd appreciate an simple example or even just a link to documentation. I'm assuming this is simple, but my iOS skill level is very low and my google fu is failing me - I'm probably not using the right terms.
Scenario for context: The user has already synced a large collection of photos to their computer through the app. Now they're "archiving" (deleting) the oldest photos and videos to free up space. I want to allow them to preserve (not archive/delete) favorited photos and certain albums, no matter how old they are. I'm going to sort photos by date, filter out the favorited ones, filter out the ones that belong to excluded albums.

Related

Can I access the pictures of the app user?

I am building a game related with the picture of the client from his album.
I need him to authorize access his album, but can I use his pictures?
For example, imagine a game of finding errors. I use one of his pictures in my app, change 7 objects, and ask him to find the changes.
Is it possible?
The user will be able to give you access to their pictures. But in terms of identifying objects in the picture and making changes to them, you will have to code in some pretty advanced image processing functionality.

Is there a way to distinguish between the user photo stream and a shared one?

I’m trying to show Photo Streams using ALAssetsLibrary, but I haven’t find a way to know if a given ALAssetsGroup is the user photo stream (the one named “My Photo Stream”) or a shared one (arbitrary named by the user). Neither I have find how to know if the user created the shared photo stream or it was shared with him/her.
The only “clues” I have been able to find is that “My Photo Stream” is always sorted by date, but other streams might also be. The editable property is always NO for the streams I have tested with (in Photos.app you can edit shared photo streams, but not “My Photo Stream”, which is automatically managed). valueForProperty: doesn’t provided that many keys, and no key seems to provide much information (the URL looks like any other assets library URL).
I will not want to use the name (“My Photo Stream”) because our international users might have very different names, and Apple might have change it at any moment.
I also have noticed that it is always the first photo stream to be returned when enumerating the ALAssetsGroup from a library, but I haven’t found any documented evidence of this (it seems that the groups are returned in the order they were added). I have tested disabling and enabling the user photo stream from the Preferences and it keeps appearing the first… but only if it is enabled.
Other idea I haven’t tested is using + disableSharedPhotoStreamsSupport after I have enumerated the groups once, and then enumerate again, since the only photo stream left will be the user’s. But there is no + enableSharedPhotoStreamsSupport, so I will lose all the possible notification for those shared streams “forever”.
Does someone have some insight? Have someone managed to properly use the shared photo streams?

Rails current visitor count

How does one implement a current visitors count for individual pages in Rails?
For example, a property website has a list of properties and a remark that says:-
"there are 6 people currently looking at this property" for each individual listing.
I'm aware of the impressionist gem, which is able to log unique impressions for each controller. Just wondering if there is a better way than querying
impressions.where("created_at <= ?", 5.minutes.ago).count
for each object in the array.
Before you get downvoted, I'll give you an idea of how to do it
Recording visitors is in the realm of analytics, of which Google Analytics is the most popular & recognized
Analytics
Analytics systems work with 3 parts:
Capture
Processing
Display
The process of capturing & processing data is fundamentally the same -- put a JS widget on your site to send a query to the server with attached user data. Processing the data puts it into your database
Displaying The Data
The difference for many people is the display of the data they capture
Google Analytics displays the data in their dashboard
Ebay displays the data as x people bought in the past hour
You want to show the number of people viewing an item
The way to do this is to hard-code the processing aspect of the data into your app
I can't explain the exact way to do this, because it's highly dependent on your stack, but this is the general way to do it

List of Artist Name in iTunes Music Store

I want to get all artist name in iTunes.
I look this page but did not find any solution.
http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
Is it possible to get list of Artist Name in iTunes Music store?
I do not believe this is possible with the current API. You might be able to "fake" it depending on what you are trying to implement with multiple calls to search but you most likely won't be able to compose a complete list.
Keep in mind the search limit is 200 so you will probably be interested in the cache architecture at the bottom of the documentation: http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

Getting podcasts to group together

I am developing an app that creates podcasts. They are just .m4a files. However, even though I am setting the album name in the file, I cant seem to get them to group together as a podcast when I load them onto a device. I also set the artist, composer, genre, title, and a couple of other fields. They group properly in iTunes, but seem to all get lumped together in one big generic group on an iPad; the album is being ignored.
Is there a specific tag that needs to get set so iOS will group them in the Podcasts app?
Well, if you're talking about creating what amounts to a Playlist for iOS 6, the new Podcast app does not support that functionality at this time. A quick search shows lots of people complaining about this, so I would say the hope is that this functionality will become available again in a future update. I wish I had better news for you.
Some reference:
https://discussions.apple.com/thread/4312284?start=0&tstart=0
https://discussions.apple.com/thread/4262881?start=30&tstart=0

Resources