如何使用phonegap在iPhone中保存联系人以及地址、组织和类别
任何人都可以帮助我..
var 地址 = [4];
addresses[0] = new ContactAddress('streetAddress','Die Strasse 45',true);
addresses[1] = new ContactAddress('locality','Hamburg',true);
addresses[2] = new ContactAddress('postalCode','22041',true);
addresses[3] = new ContactAddress('country','Deutschland',true);
myContact.addresses = addresses;
上面是我尝试使用 Phonegap 将联系地址添加到 iOS 的代码。但地址未添加到地址簿中,其余如姓名、电话号码已正确更新。
期待解决方案。
Anyone help me..
var addresses = [4];
addresses[0] = new ContactAddress('streetAddress','Die Strasse 45',true);
addresses[1] = new ContactAddress('locality','Hamburg',true);
addresses[2] = new ContactAddress('postalCode','22041',true);
addresses[3] = new ContactAddress('country','Deutschland',true);
myContact.addresses = addresses;
Above is the code i am trying to add contact address to iOS using Phonegap. But the address not added to Addressbook, rest like Name, phonenumbers are updated properly.
Looking forward to the solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 PhoneGap 中,地址数组包含多个地址,而不是多个地址详细信息。
要添加您的地址,请尝试:
In PhoneGap, the addresses array contains several addresses, not several address-details.
To add your address, try :
试试这个:
Try This:
谢谢维纳亚克。
我得到了解决方案,问题是iOS而不是phonegap,下面是工作代码。在iOS地址簿中添加contactAddress所需的类型属性。
Thanks Vinayak.
I got the solution, problem with iOS not phonegap and below is the working code.The type property required for adding contactAddress in iOS addressbook.