Castro blog

The latest news for podcast lovers

Back to list

An update on Explicit Ratings

Posted by Padraig on Jan 30, 2015

After writing my post about how podcast apps handle explicit ratings, I spent some time making sure that the feature I wanted hadn’t arrived quietly in iOS 8. I admit that this is not the ideal order in which to do one’s research.

As far as I can tell, there is still nothing in the documentation, but something about the Apple Podcasts app having this support felt strange. This app used to be on the store, and I’ve heard it said that even Apple’s apps on the store do in fact have to pass app review.

I started wondering how this information might be exposed if it was available. Would Apple provide some kind of parental controls settings class that we could query? That seems a little overkill for accessing such basic data. Then I thought about how we interact with our own settings. When we provide settings through the system settings app, we access them through the NSUserDefaults API.

If the parental restrictions were accessible through this API, I was going to need to know the key so that I could look it up. I looked at the NSUserDefaults header to try to find for a way to output all current defaults.

Huh, look at that:

- (NSDictionary *)dictionaryRepresentation;

A few seconds later, boom:

(lldb) po [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]

{
 ...other stuff...
 "com.apple.content-rating.AppRating" = 1000;
 "com.apple.content-rating.ExplicitBooksAllowed" = 1;
 "com.apple.content-rating.ExplicitMusicPodcastsAllowed" = 0;
 "com.apple.content-rating.MovieRating" = 1000;
 "com.apple.content-rating.TVShowRating" = 1000;
}

(Note that this only works on the device)

In conclusion, my post yesterday was wrong: podcast apps can in fact know the value of this setting. This allows us to respect parental restrictions, without cluttering up the UI for other users. I didn’t expect this to be the first feature that we would pre-announce for Castro 2, but here we are all the same.

Thanks to Elsie and Rob from Libsyn’s “The Feed” podcast for triggering this adventure.

Sign up to stay up to date

Get the latest news on Castro product updates and new features.