我想我在 iOS 捷克语联系人中发现了一个错误。我创建了一个捷克联系人(与捷克共和国国家),我在我的应用程序中使用 ABPeoplePickerNavigationController 选择了该联系人。
ABPeoplePickerNavigationController 返回给我的地址日志是:
"Country" : "Czech Republic"
"Street" : "A street"
"CountryCode" : "cs"
"City" : "A city"
"ZIP" : "12345"
所以国家代码是CS。但是当我尝试检索相应的名称时,
NSString *countryCode = [address objectForKey:(NSString *)kABPersonAddressCountryCodeKey];
if (countryCode != nil) {
NSString *countryName = [[NSLocale currentLocale] displayNameForKey:NSLocaleCountryCode value:countryCode];
name = [[applicationDelegate dataManager] objectForEntityForName:@"Name" withValue:countryName forKey:@"name"];
}
name
给我:“塞尔维亚和黑山”!
根据http://countrycode.org/,捷克国家代码是CK,根据http://xml.coverpages.org/country3166.html,CS是捷克斯洛伐克,但“不再存在”
我在 Apple 怎么讲?