Twitter Kit RestAPI 不支持 IPv6? - 被苹果拒绝
Twitter Kit RestAPI does not support IPv6? - Rejected from Apple
我的应用因不支持 IPv6 网络而被拒绝。
这是来自 Apple 的消息:
We discovered one or more bugs in your app when reviewed on iPhone
running iOS 11 on Wi-Fi connected to an IPv6 network.
Submitting a Tweet through the app does not post it on the feed or on
the Twitter web-site.
我的应用程序非常简单,使用 RestAPI 调用发布文本。这是代码片段。
let client = TWTRAPIClient(userID: userid)
let url = "https://api.twitter.com/1.1/statuses/update.json";
let message:[String:Any] = ["status": text]
var error: NSError?
let request = client.urlRequest(withMethod: "POST", url: url, parameters: message, error: &error)
DispatchQueue.main.async {
client.sendTwitterRequest(request) { (response, data, ConnectionError) -> Void in
if let error = connectionError {
print("Error: \(error.localizedDescription)")
DispatchQueue.main.async {
completion(error)
}
} else {
DispatchQueue.main.async {
completion(nil)
}
}
}
}
有人遇到过吗?
从 Podfile 中删除 AFNetworking 解决了这个问题
我的应用因不支持 IPv6 网络而被拒绝。
这是来自 Apple 的消息:
We discovered one or more bugs in your app when reviewed on iPhone running iOS 11 on Wi-Fi connected to an IPv6 network.
Submitting a Tweet through the app does not post it on the feed or on the Twitter web-site.
我的应用程序非常简单,使用 RestAPI 调用发布文本。这是代码片段。
let client = TWTRAPIClient(userID: userid)
let url = "https://api.twitter.com/1.1/statuses/update.json";
let message:[String:Any] = ["status": text]
var error: NSError?
let request = client.urlRequest(withMethod: "POST", url: url, parameters: message, error: &error)
DispatchQueue.main.async {
client.sendTwitterRequest(request) { (response, data, ConnectionError) -> Void in
if let error = connectionError {
print("Error: \(error.localizedDescription)")
DispatchQueue.main.async {
completion(error)
}
} else {
DispatchQueue.main.async {
completion(nil)
}
}
}
}
有人遇到过吗?
从 Podfile 中删除 AFNetworking 解决了这个问题