Applications made for kids very often contain screens that are designed for adults, e.g. in app purchases, feedback forms, etc. Apple requires those screens to be protected by Parental Gate.
From AppStore review guidelines:
24.3 Apps in the Kids Category must get parental permission or use a parental gate before allowing the user to link out of the app or engage in commerce
Math | Slide | Custom |
---|---|---|
Swift Package Manager: You can use The Swift Package Manager to install ParentalGate by adding the proper description to your Package.swift file:
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(url: "https://github.com/hossinasaadi/ParentalGate"),
]
)
Usage :
types : .math
,.slide
,.custom
ParentalGate(isPresent: .constant(true), style: .math) {
// Solved
} dismiss: {
// Canceled
}
custom usage :
ParentalGate(isPresent: $isPresent, style: .custom) {
isPresent = false
text = "Solved!"
} dismiss: {
isPresent = false
text = "Canceled,Click Here again!"
}.customGate { ParentalGate in
CustomGate(solved: ParentalGate.solved, dismiss:ParentalGate.dismiss)
}
// CustomGate should use GateProtocol as well
feel free to contribute ❤️