【发布时间】:2016-10-29 00:12:42
【问题描述】:
我已经在 AppStore 中提交了我的应用,如果由于以下原因,他们会拒绝。
Hello,
Thank you for providing this information. Upon further review, we were still unable to login to the app.
Please note that apps are reviewed on an IPv6 network. Please ensure that your app supports IPv6 networks, as IPv6 compatibility is required.
For information about supporting IPv6 Networks, refer to Supporting iPv6 DNS64/NAT64 Networks.
For a networking overview, please see About Networking.
Best regards,
App Store Review
我正在使用 SOAP Envelope 服务来使用它,
这是我的代码
@property(retain,nonatomic)NSString *xmlString;
@property(nonatomic,retain)NSMutableData *webResponseData;
-(void)method_GetUpcomingLotteries
{
NSString *soapMessage = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:ns1=\"urn:Lottery.Intf-ILottery\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:enc=\"http://www.w3.org/2003/05/soap-encoding\">\n"
"<env:Body>\n"
"<ns1:GetUpcomingLotteries env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\">\n"
"<EntityID xsi:type=\"xsd:int\">2</EntityID>\n"
"<Password xsi:type=\"xsd:string\">Smart@Winners</Password>\n"
"<SortBy xsi:type=\"xsd:int\">0</SortBy>\n"
"<limit xsi:type=\"xsd:int\">0</limit>\n"
"</ns1:GetUpcomingLotteries>\n"
"</env:Body>\n"
"</env:Envelope>"];
NSURL *sRequestURL = [NSURL URLWithString:@"http://isapi.mekashron.com/soapclient/soapclient.php?"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:sRequestURL];
NSString *sMessageLength = [NSString stringWithFormat:@"%d", [soapMessage length]];
[request addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[request addValue: @"urn:Lottery.Intf-ILottery/GetUpcomingLotteries" forHTTPHeaderField:@"SOAPAction"];
[request addValue: sMessageLength forHTTPHeaderField:@"Content-Length"];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[soapMessage dataUsingEncoding:NSUTF8StringEncoding]];
NSLog(@"soapMessage===\n %@",soapMessage);
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
if( theConnection ) {
NSLog(@"hiii");
self.webResponseData = [NSMutableData data];
}else {
NSLog(@"Some error occurred in Connection");
}
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSLog(@"Received Bytes from server: %lu", (unsigned long)[self.webResponseData length]);
NSString * strXml = [[NSString alloc] initWithBytes: [self.webResponseData mutableBytes] length:[self.webResponseData length] encoding:NSUTF8StringEncoding];
NSLog(@"---- %@" ,strXml);
}
-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
[self.webResponseData setLength:0];
}
-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
[self.webResponseData appendData:data];
}
-(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
NSLog(@"Some error in your Connection. Please try again.");
}
我的问题:
1) 请告诉我我需要更改方法还是必须更改服务器端才能将我的 API 从 IPv4 传输到 IPv6?
2) 在 ios9 下使用 SOAP 方法的 IpV6 代码可以替代 NSURLConnection
【问题讨论】:
-
我并不完全 au fait 使用 IPv6,但我想这与
isapi.mekashron.com的 DNS 系统是否另外解析为 IPv6 地址有关。也许你可以调查一下? -
我不是解释的合适人选。但是,是的,我认为您的 Web 服务器需要侦听 IPv6,并且您的 DNS 服务器需要根据请求回复 IPv6 地址。我相信这些东西可以用搜索引擎来研究。
-
无论如何,你在下面有一个答案,所以我建议你检查提供的链接
:-)
标签: ios objective-c xcode soap ipv6