我正在查看其他人编写的没有文档的代码,为什么这段代码与65535进行比较?
class func canMakePhoneCall() -> Bool
{
guard let URL = URL(string: "tel://") else {
return false
}
let canOpenURL = UIApplication.shared.canOpenURL(URL)
if canOpenURL == false
{
return false
}
let mobileNetworkCode = CTTelephonyNetworkInfo().subscriberCellularProvider?.mobileNetworkCode
let isInvalidNetworkCode = mobileNetworkCode == nil
|| mobileNetworkCode?.characters.count == 0
|| mobileNetworkCode == "65535"
return isInvalidNetworkCode == false
}