从iPhone应用程序Bugg添加联系人 [英] Add contact from iPhone application bugg

查看:51
本文介绍了从iPhone应用程序Bugg添加联系人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的代码通过我的应用程序成功在iPhone中添加了联系人地址

I am successfully adding contact address in iPhone through my application by using below code

ABAddressBookRef addressBook = ABAddressBookCreate();
    ABRecordRef Showroom = ABPersonCreate();
ABMutableMultiValueRef multiAddress = ABMultiValueCreateMutable(kABMultiDictionaryPropertyType);
    NSMutableDictionary *addressDictionary = [[NSMutableDictionary alloc] init];
    [addressDictionary setObject:[NSString stringWithFormat:@"%@",Address_Bcard.text] forKey:(NSString *) kABPersonAddressStreetKey];

    ABMultiValueAddValueAndLabel(multiAddress, addressDictionary, kABWorkLabel, NULL);
    ABRecordSetValue(Showroom, kABPersonAddressProperty, multiAddress,@"");
    CFRelease(multiAddress);

    ABAddressBookAddRecord(addressBook, Showroom, nil);
    ABAddressBookSave(addressBook, nil)
CFRelease(Showroom);
CFRelease(addressBook);

我正在从应用程序向iPhone联系人添加澳大利亚地址,例如.悉尼,澳大利亚.iPhone联系人在addess字段中显示 Sydney Australia India ,而不是 Sydney Australia .如何删除此错误.

I am adding australian address from application to iPhone contacts eg. Sydney Australia. Instead of Sydney Australia the iPhone contact shows Sydney Australia India in addess field. How to remove this bugg.

推荐答案

如果您未在联系人的地址字段中指定国家/地区,它将自动获取您居住的国家/地区.

If you don't specify the country in the address field of the contact it will automatically takes the country you live.

指定国家/地区代码以设置另一个国家/地区的方法是:-更改为

A way to specify the country code to set another country is:- Change to

Settings -> General -> International -> Region Format to "Australia".

但是问题是这也会改变所有其他联系人.

But the problem is this will change all the other contacts also.

苹果网站上也有讨论. https://discussions.apple.com/thread/2659179?start=0&; tstart = 0

There is also a discussion on apple site. https://discussions.apple.com/thread/2659179?start=0&tstart=0

这篇关于从iPhone应用程序Bugg添加联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆