2.5.1 - Performance - Software R

2018-08-29  本文已影响0人  爱敲代码的小鱼儿

被拒时间:2018年8月29日 上午12:13

问题:2. 5 Performance: Software Requirements

Guideline 2.5.1 - Performance - Software Requirements

Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

Next Steps

To resolve this issue, please revise your app to provide the associated functionality using public APIs or remove the functionality using the "prefs:root" or "App-Prefs:root" URL scheme.

If there are no alternatives for providing the functionality your app requires, you can file an enhancement request.

解决办法:使用私有api导致被拒,找到”prefs:root”,用相应方法换掉,再重新打包上传即可

这是解决之前的代码:(跳转至系统的设置WiFi页面)

+(void)appToSystemSettingsWithFromController:(UIViewController *)vcName{

                 NSURL *url = [NSURL URLWithString:@"App-Prefs:root=WIFI"];

           if ([[UIDevice currentDevice].systemVersion doubleValue]< 10.0){//

                      if([[UIApplication sharedApplication]canOpenURL:url]){

                              [[UIApplication sharedApplication]openURL:url];

          }  }else {// >= iOS10.0

                    if([[UIApplication sharedApplication]canOpenURL:url]){

                        [[UIApplication sharedApplication]openURL:url options:@{} completionHandler:^(BOOL success){ }];

          } } }

这是解决之后的代码:(跳转至系统的设置WiFi页面)

+(void)appToSystemSettingsWithFromController:(UIViewController*)vcName{

               if([[UIDevicecurrentDevice].systemVersiondoubleValue] < 10.0) {//

                         if( [[UIApplicationsharedApplication]canOpenURL:      [NSURLURLWithString:UIApplicationOpenSettingsURLString]] ) { 

                           [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:UIApplicationOpenSettingsURLString]]; }

             }else{// >= iOS10.0

                     if( [[UIApplicationsharedApplication]canOpenURL:      [NSURLURLWithString:UIApplicationOpenSettingsURLString]] ) {

                         [[UIApplicationsharedApplication] openURL:[NSURLURLWithString:UIApplicationOpenSettingsURLString] options:@{}completionHandler:^(BOOLsuccess) {}];

}}}

上一篇下一篇

猜你喜欢

热点阅读