0
我有這個代碼從我的osx地址簿中獲取特定人員的國家。從地址簿獲取kABAddressCountryCodeKey
let address = person.value(forProperty: kABAddressProperty) as? ABMultiValue
print(((adresse?.value(at: 0) as? NSMutableDictionary)?.value(forKey: kABAddressCountryKey) as? String) ?? "No Country")
print(((adresse?.value(at: 0) as? NSMutableDictionary)?.value(forKey: kABAddressCountryCodeKey) as? String) ?? "No Country")
kABAddressCountryKey的打印結果將是完整的國家。 但我想要國家代碼密鑰。但對於第二打印結果我得到「沒有國家」
我怎麼忘了?
爲此。英語不是我的主要語言。我盡我所能... – Ghost108
我在第一篇文章中改變了它 – Ghost108