Latest 1.0
Homepage https://github.com/owlcoding/PMParentalGate
License Apache License
Platforms ios 6.0, requires ARC
Authors

Since the introduction of special ‘Kids’ category in the App Store, Apple has enforced developers to perform a good practice – guarding anything that’s not targeted for the kids by the ‘Parental Gate’. This means that any links to other apps, or to App Store ratings or any In-App purchases should be guarded from the kid’s access.

One of the ways to perform this task is to ask the user to perform some kind of operation that, in general, the kid can not do (we’re talking about quite small kids here) – like triple-tapping the button instead of a single tap, or solving a simple math equation…

This control allows for a simple, one-line "equation" gate.

This is released as-is under the terms of MIT License.

Installation

You can use CocoaPods to install the PMParentalGate. Add the following line to your Podfile:

 pod 'PMParentalGate'

Or you can just drop the content of the Classes/ directory into your Xcode project.

Usage

An example use of the gate to restrict the In-App purchase:

[[PMParentalGateQuestion sharedGate] presentGateWithText:nil timeout:10 finishedBlock:^(BOOL allowPass, GateResult result) {
    if (allowPass) {
        [Flurry logEvent:@"unlockAllPressed" withParameters:@{@"moduleId": self.quiz.purchaseID}];
        [MBProgressHUD showHUDAddedTo:self.view animated:YES];
        [[InAppPurchaseHelper sharedInstance] buyProductWithId:@"fullpro"];
    }
}];

Screenshots

Parental Gate question

Parental Gate Result

Author

If you wish to contact me, email at: [email protected]

Latest podspec

{
    "name": "PMParentalGate",
    "version": "1.0",
    "summary": "A drop-in class for iOS applications that allow to add a parental-gate to the app",
    "description": "                    SimpleAudioPlayern                    =================nnAn example use of the gate to restrict the In-App purchase: nn    [[PMParentalGateQuestion sharedGate] presentGateWithText:nil timeout:10 finishedBlock:^(BOOL allowPass, GateResult result) {n        if (allowPass) {n            [[InAppPurchaseHelper sharedInstance] buyProductWithId:@"fullpro"];n        }n    }];n",
    "homepage": "https://github.com/owlcoding/PMParentalGate",
    "license": "Apache License",
    "authors": {
        "Pawel 'Kender' Maczewski": "[email protected]"
    },
    "source": {
        "git": "https://github.com/owlcoding/PMParentalGate.git",
        "tag": "1.0"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "Classes/*"
}

Pin It on Pinterest

Share This