在连接到IPv6的运行iOS 9.3.5的iPad和iPhone上应用程序崩溃
我对应用商店评论有问题。我从应用商店收到这些消息。 第一次审查 “当我们输入Instagram帐户信息时,您的应用程序在运行iOS 9.3.5并连接到IPv6网络的iPad和iPhone上崩溃。” 第二次审查 “当我们输入Instagram帐户信息时,您的应用程序在运行iOS 9.3.5并连接到IPv6网络的iPad和iPhone上崩溃。 使用应用程序时发生此情况:脱机“ 在我的应用程序中,我使用Alamofire和Alamofire对象映射器。我在uiwebview中发送请求,然后等待获取带有访问令牌的url,然后用MagicalRecords保存核心数据。在我的设备上,我没有崩溃 所以我的代码中处理访问令牌上的url的部分在连接到IPv6的运行iOS 9.3.5的iPad和iPhone上应用程序崩溃,ios,swift,core-data,alamofire,magicalrecord,Ios,Swift,Core Data,Alamofire,Magicalrecord,我对应用商店评论有问题。我从应用商店收到这些消息。 第一次审查 “当我们输入Instagram帐户信息时,您的应用程序在运行iOS 9.3.5并连接到IPv6网络的iPad和iPhone上崩溃。” 第二次审查 “当我们输入Instagram帐户信息时,您的应用程序在运行iOS 9.3.5并连接到IPv6网络的iPad和iPhone上崩溃。 使用应用程序时发生此情况:脱机“ 在我的应用程序中,我使用Alamofire和Alamofire对象映射器。我在uiwebview中发送请求,然后等待获取带有
guard let url = url else {
return nil
}
if !isRedirectURL(url) {
return nil
}
let components = url.absoluteString.componentsSeparatedByString("=")
if components.count == 2 {
return components.last
}
else {
return nil
}
所以我检查url是重定向还是否,appRedirectURL-它是Instagram Api的重定向url
guard let appRedirectURL = NSURL(string: appRedirectURL) else {
return false
}
//check if both urls have host
guard let host = appRedirectURL.host, urlHost = url.host else {
return false
}
return appRedirectURL.scheme == url.scheme && host == urlHost
节省
起初,我尝试使用教程在我的mac上设置ipv6
但就我而言,我是这样做的:
func updateInstagramAccount(account: InstagramUser, completion: CoreDataSuccessBlock?) {
CoreDataManager.sharedInstance.save({ (savingContext) in
if let objectId = account.objectId, instagramAccount = InstagramAccount.createIfNeededWhereKey(InstagramAccount.Attributes.instagramId, equalTo: objectId, context: savingContext) as? InstagramAccount {
instagramAccount.username = account.username
instagramAccount.fullName = account.fullName
instagramAccount.profilePictureURLPath = account.profilePictureURL?.absoluteString
instagramAccount.website = account.website?.absoluteString
instagramAccount.bio = account.bio
instagramAccount.customizedBio = account.bio
if let follows = account.counts?.follows, followedBy = account.counts?.followedBy, media = account.counts?.media {
instagramAccount.followsCount = Int16(follows)
instagramAccount.followedByCount = Int16(followedBy)
instagramAccount.mediaCount = Int16(media)
}
instagramAccount.objectId = account.objectId
}
}) { (success, error) in
completion?(success, error)
}
}
我知道ipv6对InstagramUser对象的映射是错误的,但我不知道具体情况,也无法检查
你能问下几个问题吗
在ipv6上,可能会出现以下情况:我将获得不同的url?ipv6信息是一种误导。实际问题是,正如第二次审查的消息中所述,使用你的应用程序“离线”。是的,我在“离线”中尝试过,我关闭了3g、wifi并设置了机场模式,结果uiwebview无法加载授权url,但应用程序中没有崩溃。嘿,你是否发现了这个问题,因为我的应用程序也被拒绝了。IPv6信息是一个骗局。实际的问题是使用你的应用程序“离线”,如关于第二次审查的消息中所述。是的,我在“离线”中尝试过,我关闭了3g、wifi并设置了机场模式,结果uiwebview无法加载授权url,但应用程序中没有崩溃。嘿,你确定了这个问题,因为我的应用程序也被拒绝了。