撰写 iOS 应用评论以停用一天的广告 Swift

Write an iOS App review to disable ads for a day with Swift

我有一个 "Rate App" 弹出窗口,我想知道是否有一种方法可以让我在用户点击 "Rate" 时停用一天的广告。它将激励用户对应用程序进行评分。这是否违反 Apple 的服务条款?

这是我在 GameViewController 中的代码

  func rateMe() {
    var neverRate = NSUserDefaults.standardUserDefaults().boolForKey("neverRate")
    var numLaunches = NSUserDefaults.standardUserDefaults().integerForKey("numLaunches") + 1

    if (!neverRate && (numLaunches == iMinSessions || numLaunches >= (iMinSessions + iTryAgainSessions + 1)))
    {
        showRateMe()
        numLaunches = iMinSessions + 1
    }
    NSUserDefaults.standardUserDefaults().setInteger(numLaunches, forKey: "numLaunches")
}
func showRateMe() {
    var alert = UIAlertController(title: "Rate Us", message: "Thanks for using Blocked", preferredStyle: UIAlertControllerStyle.Alert)
    alert.addAction(UIAlertAction(title: "Rate Blocked", style: UIAlertActionStyle.Default, handler: { alertAction in
        UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=<iTUNES CONNECT APP ID>")!)
        alert.dismissViewControllerAnimated(true, completion: nil)
    }))
    alert.addAction(UIAlertAction(title: "No Thanks", style: UIAlertActionStyle.Default, handler: { alertAction in
        NSUserDefaults.standardUserDefaults().setBool(true, forKey: "neverRate")
        alert.dismissViewControllerAnimated(true, completion: nil)
    }))
    alert.addAction(UIAlertAction(title: "Maybe Later", style: UIAlertActionStyle.Default, handler: { alertAction in
        alert.dismissViewControllerAnimated(true, completion: nil)
    }))
    self.presentViewController(alert, animated: true, completion: nil)
}

我在 GameOverScene 中使用以下代码调用它:

 let controller = self.view?.window?.rootViewController as! GameViewController
        if adLoaded == false {
        controller.showRateMe()
        }

如能提供有关如何实现此功能的任何帮助,我们将不胜感激!

编辑: 我在想只是做一个 bool,然后如果他们点击 rate app 就将其设置为 true。然后有一个仅在 bool 为 true 时才启动的计时器,它是一个 1 天的计时器,运行一个将 bool 设置为 false 的函数。如果 bool 为 false,则它将显示广告。

这行得通吗?

来自App Store Review Guidelines

Developers who attempt to manipulate or cheat the user reviews or chart ranking in the App Store with fake or paid reviews, or any other inappropriate methods will be removed from the iOS Developer Program

我认为通过撰写评论让用户移除广告属于付费评论的范畴。 我也找不到检测 AppStore 评论的方法。