I wrote in an article that I hope you don’t cheat the App Store Review Team, but after the recent Uber Review incident, and what happened to me personally, the Review Team didn’t answer my long and detailed defense and postponed my App Review indefinitely, I completely lost respect for the team, and as an individual developer with limited abilities, I chose to cheat the review team through certain technical means.

  • Review team based in North America, if your app
  • You do not need to support North America and have access to geographical location, so you can directly switch by geographical location
  • Judging each other’s location from the system’s time zone has proved impossible
  • Prejudge the audit time and carry out the hard-coded switch, which may lead to the project being on-line when the audit is fast, but it cannot be released to users (the audit switch is still on, and users cannot get the function that is not allowed to pass the audit).

Here is a quick way to build a dynamic audit switch for apps that have no background available:

  1. Create a public GitHub Repo. It doesn’t matter whether there’s anything in the repository or not. The address of the warehouse (such as www.github.com/yourName/repoName) whether can access
  2. If your app cannot access the host www.github.com (e.g. offline), or if you can access the host and your warehouse address is successfully accessed, you are in the process of auditing. You can turn off some functions that may cause your app to be rejected. If GitHub is accessible but your repository is not, you have deleted the repository after approval, and the app in the user’s hand can unlock those specific functions (www.github.com is not currently blocked, but www.gist.github.com is blocked, That’s why we build a new repository instead of a new GIST.)
  3. Because the app may be updated, you cannot disable the functions in the previous version of the app just because the next version of the app is being reviewed. Therefore, it is better to establish a mapping between the new warehouse and the version number. For example, an app named Happy has uploaded the build of version 0.0.1. The repository name could be happy001, and the next version would be happy002.
  4. It is not a good solution that users need to visit Github every time to unlock normal functions. A relatively loose review time can be estimated. For example, it is estimated that the APP will pass the review after 10 days, so it can be hard-coded. Unlock features that could lead to rejection.
  5. The method introduced above, can not use, can use less, use less, but also need to assess the risk oh ~

Let’s use Swift +AlamofireProvide a code sample

Import UIKit import Alamofire class Cheater {// Auditing switches automatically configure class funcautoConfig() {
        Alamofire.request("www.github.com/yourName/repoName")
            .validate().responseData { response in
            switch response.result {
            case .success:
                print("repo exist")
                setIsOff(0)
            case .failure(let error):
                print(error)
                setIsOff(1)
            }
        }
    }

    class func setIsOff(_ value:Int) {
        if value == 1 {
            print("Approved")}else {
            print("Not approved")
        }
        UserDefaults.standard.set(value, forKey: "wbdswitch")
    }

    class func isOff() -> Bool {
        if dateIsAfter(20171115) {
            return true
        }
        let num = UserDefaults.standard.integer(forKey: "wbdswitch")
        return (num == 1)
    }
}

fileprivate func dateIsAfter(_ dateNum: Int) -> Bool {
    let formatter = DateFormatter()
    formatter.dateFormat = "YYYYMMdd"
    formatter.timeZone = TimeZone(abbreviation: "CHN")
    if let current = Int(formatter.string(from: Date())), current >= dateNum {
        return true
    }else {
        return false}}Copy the code

The code above, can realize the function of the switch by using the www.github.com/yourName/repoName address, and date later than November 15, 2017, when can unlock function directly. You can put the features that might cause your App to be rejected in the following code block:

if Cheater.isOff() {
    print("The audit has been approved")}Copy the code

And through the

Cheater.autoConfig()Copy the code

To configure the switch, you can put it in an AppDelegate or some other selector.