Apple ios App因不支持ipv6的URL而被拒绝,

时间:2017-03-04 08:33:15

标签: ios objective-c app-store ipv6

- (void) userAuthenticateWithEmail:(NSString *)email Password:(NSString *)password UserType:(NSString *)userType token:(NSString *)token UDIDNumber:(NSString *)UDIDNumber :(void (^)(NSDictionary*))completionBlock
{
 NSString *urlStr = [[DELEGATE url] stringByAppendingString:[NSString stringWithFormat:@"customerlogin?email=%@&password=%@&user_type=%@&token=%@&imei=%@",email,password,userType,token,UDIDNumber]];

[self executeRequestWithUrl:[NSURL URLWithString:urlStr] GET:YES :^(NSDictionary *responseDict) {
    completionBlock(responseDict);
}];

}


-(void)executeRequestWithUrl:(NSURL*)url GET:(BOOL)GET :(void (^)(NSDictionary*))completionBlock
{
NSMutableURLRequest *request = [NSMutableURLRequest        requestWithURL:url];
[request setCachePolicy:NSURLRequestReloadIgnoringCacheData];
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];

NSLog(@"reuest %@",request.description);
NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
NSURLSession *session = [NSURLSession sessionWithConfiguration:config];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
                                        completionHandler:^(NSData *data, NSURLResponse *serverResponse, NSError *error) {

                                            NSData *responseData = data;
                                            if (error)
                                            {
                                                completionBlock([NSDictionary dictionaryWithObjectsAndKeys:[error description],@"error", nil]);
                                            }
                                            if (responseData != nil)
                                            {
                                                NSMutableDictionary *returnedDict = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingAllowFragments error:&error];

                                                NSLog(@"returnedDict -->>%@",returnedDict);
                                                completionBlock(returnedDict);
                                            }
                                        }];
[task resume];

}`Image_Screenshot_Here我正在使用NSURLSession进行POSt和GET请求,附加错误的屏幕截图错误Domain = NSURLErrorDomain Code = -1002“”不支持的URL“UserInfo = {NslocalizedDescription = unsupported url} Domain = kCFErrorDomainCFNetwork Code = -1002“null”}}

来自Apple Review Team的消息如下 - 我们在连接到IPv6网络的Wi-Fi上运行iOS 10.2.1的iPhone上查看了应用中的一个或多个错误。

具体而言,启动后会显示错误消息。请参阅随附的屏幕截图。

后续步骤

请在连接到IPv6网络(所有应用必须支持IPv6)的设备上运行您的应用以识别任何问题,然后修改并重新提交您的应用以供审核。

如果我们误解了您应用的预期行为,请在解决方案中心回复此消息,以提供有关这些功能如何运作的信息。

对于新应用,请从设备卸载所有以前版本的应用,然后安装并按照步骤重现该问题。有关更新,请将新版本安装为先前版本的更新,然后按照步骤重现该问题。

资源

有关支持IPv6网络的信息,请参阅支持IPv6 DNS64 / NAT64网络和关于网络。

我从苹果苹果审核小组收到此错误警告,屏幕截图显示来自苹果的错误

3 个答案:

答案 0 :(得分:1)

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>YourLiveUrl</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSExceptionMinimumTLSVersion</key>
            <string>TLSv1.2</string>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <true/>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSRequiresCertificateTransparency</key>
            <false/>
            <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
            <false/>
            <key>NSThirdPartyExceptionMinimumTLSVersion</key>
            <string>TLSv1.2</string>
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <true/>
        </dict>
    </dict>

我们遇到过两次App拒绝问题。 在info.plist文件中添加以上行并设置YourLiveUrl名称示例:app.xyz.in。和 您的服务器应兼容ipv6。 你的问题将得到解决。

答案 1 :(得分:0)

我们遇到了同样的问题。我们已经使我们的服务器获得数据ipv6兼容,这对我们有用。

答案 2 :(得分:0)

我同意swift_guru。看来你的服务器不兼容ipv6。确保您已根据Apple文档设置了仅具有ipv6环境,然后通过Web连接您的服务器并检查您的服务器兼容性。

相关问题