- Get Device's Movie Rating Restriction Setting (Raw Value or Text Value)
- Get the raw value of a supplied Movie Rating (currently supports US ratings ONLY)
- Determine if supplied Movie Rating is allowed by device restrictions (again, US ONLY)
ContentRestrictionsKit.Movie.getDeviceRestrictionValue()
Returns Raw value of Movie Rating Restriction on Device (Int value 0-1000)
ContentRestrictionsKit.Movie.getDeviceRestriction(country: .US)
Returns Name value of Movie Rating Restriction on Device
ContentRestrictionsKit.Movie.getRatingValue(country: .US, rating: "r") // 400
Returns raw value of supplied Movie Rating (Int value 0-1000)
ContentRestrictionsKit.Movie.ratingIsAllowed(country: .US, rating: "r") // returns Bool
Returns true/false if supplied rating is allowed by device's movie restriction rating
ContentRestrictionsKit.TVShow.getDeviceRestrictionValue()
Returns Raw value of TV Show Rating Restriction on Device (Int value 0-1000)
ContentRestrictionsKit.TVShow.getDeviceRestriction(country: .US)
Returns Name value of TV Show Rating Restriction on Device
ContentRestrictionsKit.TVShow.getRatingValue(country: .US, rating: "tvpg") // 400
Returns raw value of supplied TV Show Rating (Int value 0-1000)
ContentRestrictionsKit.TVShow.ratingIsAllowed(country: .US, rating: "tvpg") // returns Bool
Returns true/false if supplied rating is allowed by device's TV Show restriction rating
ContentRestrictionsKit.App.getDeviceRestrictionValue()
Returns Raw value of App Rating Restriction on Device (Int value 0-1000)
ContentRestrictionsKit.App.getDeviceRestriction()
Returns Name value of App Rating Restriction on Device
ContentRestrictionsKit.App.getRatingValue(rating: "12+") // 300
Returns raw value of supplied App Rating (Int value 0-1000)
ContentRestrictionsKit.App.ratingIsAllowed(rating: "12+") // returns Bool
Returns true/false if supplied rating is allowed by device's App restriction rating
ContentRestrictionsKit.Explicit.isExplicitMusicAllowed() // returns Bool
Returns true/false if Explicit Music, Podcasts, & News are allowed on the device
ContentRestrictionsKit.Explicit.isExplicitBooksAllowed() // returns Bool
Returns true/false if Explicit Books are allowed on the device
ContentRestrictionsKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ContentRestrictionsKit'
- TV Show Ratings
- App Ratings
- Explicit Books Allowed
- Explicit Music Podcasts Allowed
- Game Ratings (Mapped to closest App Rating)
(feel free to send me info on new countries, request new countries via issue or contribute via pull request. Gathering info for specific countries is very time consuming so additional countries will only be added upon request.)
- United States (US)