美文网首页
iOS-应用提交被拒原因(更新按钮、微信登陆)

iOS-应用提交被拒原因(更新按钮、微信登陆)

作者: Salad可乐 | 来源:发表于2016-08-29 10:52 被阅读1387次

    1.不得包含更新按钮

    Design Preamble
    Your app includes an update button or alerts the user to update the app. To avoid user confusion, app version updates must utilize the iOS built-in update mechanism.
    We've attached screenshot(s) for your reference.
    Next Steps
    Please remove the update feature from your app. To distribute a new version of your app, upload the new app binary version into the same iTunes Connect record you created for the app's previous version. Updated versions keep the same Apple ID, iTunes Connect ID (SKU), and bundle ID as the original version, and are available free to customers who purchased a previous version.

    神奇的是,这个更新功能在之前的版本就有,并不是这次提交才加上去的。而之前都审核通过了,这次才给退回来。感觉每个审核人员的标准不一样,又或者是某些员工偷懒。。

    解决办法:

    将更新按钮去掉,改成弹窗式提醒更新。
    在合适的地方加入这个业务逻辑,判断本地的版本号和APP Store上的版本号,若APP Store的版本更高则弹出提示框提醒更新。
    这样做的好处是审核人员审核时永远不会弹出该弹窗,审核通过后用户使用提醒更新的功能是正常的。

    Swift代码:
    func remindUserToUpdate() {
            let localVersion = NSBundle.mainBundle().infoDictionary!["CFBundleShortVersionString"] as! String
            let URL = "http://itunes.apple.com/cn/lookup?id=\(APP_ID)" //APP_ID对应应用的apple id
            HTTPTool.GET(URLString: URL, parameters: parameter, success:{ (responseObject) in
                let results = responseObject["results"] as! NSArray
                let newestVersion = (results[0] as! NSDictionary)["version"] as? String
                if newestVersion != nil {
                    //比较两个版本号
                    if (localVersion! as NSString).compare(newestVersion!) == .OrderedAscending {
                        let alertVC = UIAlertController.init(title: "升级提示", message: "您的当前版本为V\(localVersion),发现新版本V\(newestVersion!),是否现在下载新版本?", preferredStyle: .Alert)
                        let cancelAction = UIAlertAction.init(title: "下次再说", style: .Cancel, handler: nil)
                        let okAction = UIAlertAction.init(title: "现在升级", style: .Default, handler: { (action) in
                            let url = NSURL.init(string: "itms://itunes.apple.com/cn/app/he-bi/id\(APP_ID)?mt=8")
                            UIApplication.sharedApplication().openURL(url!)
                        })
                        alertVC.addAction(cancelAction)
                        alertVC.addAction(okAction)
                        self.presentViewController(alertVC, animated: true, completion: nil)
                    }
                }
                }, failure: { (error) in
                    debugLog("获取版本信息失败\(error)")
            })
        }
    

    2.微信第三方登陆

    We were required to install WeChat before we could sign in with WeChat mechanism. Users should be able to sign in and access their account, without requiring additional applications to be installed.
    Next Steps
    If you choose to allow users to sign in via WeChat, please use methods that can authenticate users from within your app, such as a native web-view.

    这个可以说是非常普遍的被拒原因,一般有第三方登陆的如果不注意这个问题都会被拒。苹果要求没有安装微信的用户也一样可以使用微信登陆(通过WebView的方式)

    解决办法:

    因为这个问题的普遍性,实际上微信已经开发出了新的API可以解决这个问题,但是在官网上并没有说明这个新的API。
    新的接口在WXApi.h中可以查看,具体如下:

    /*! @brief 发送Auth请求到微信,支持用户没安装微信,等待微信返回onResp
     *
     * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持SendAuthReq类型。
     * @param req 具体的发送请求,在调用函数后,请自己释放。
     * @param viewController 当前界面对象。
     * @param delegate  WXApiDelegate对象,用来接收微信触发的消息。
     * @return 成功返回YES,失败返回NO。
     */
    +(BOOL) sendAuthReq:(SendAuthReq*) req viewController : (UIViewController*) viewController delegate:(id<WXApiDelegate>) delegate;
    

    使用了这个接口后,在没有安装微信的iPhone上点击微信登陆会拉起网页(使用手机验证码登陆):


    注意:

    如果你的是IPhone应用,那么以上所说的接口可以很好解决微信登陆的问题。但是如果你的是IPhone/IPad应用,那么就该换另外一个解决办法了。因为该接口只支持IPhone,IPad无法接收短信,所以没办法实现验证码登陆的功能。

    这时候只能用最原始的办法去解决了:判断应用是否安装微信,没安装则隐藏掉微信登陆按钮。

    以上解决办法均可通过苹果审核并上架,亲测。

    相关文章

      网友评论

          本文标题:iOS-应用提交被拒原因(更新按钮、微信登陆)

          本文链接:https://www.haomeiwen.com/subject/iwjzsttx.html