ABGroupAddMember在iOS4设备上不起作用

编程入门 行业动态 更新时间:2024-10-28 18:34:33
本文介绍了ABGroupAddMember在iOS4设备上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

下面的代码在Simulator(iOS 4和5)中都可以很好地工作,但是在iOS 4设备上不添加任何联系人。没有错误返回。您知道为什么吗?

the code bellow works great in Simulator (both iOS 4 and 5) but adds no contact on the iOS 4 device. No error is returned. Do you have any idea why?

ABAddressBookRef ab = ABAddressBookCreate(); abGroupRef = ABAddressBookGetGroupWithRecordID(ab, 1); ABRecordRef pRef = ABAddressBookGetPersonWithRecordID(ab, 1); ABGroupAddMember(abGroupRef, pRef, &anError); ABAddressBookSave(ab, &anError);

感谢 --Josef

Thanks, --Josef

推荐答案

问题是联系人是通过交换与Google同步的。只能有本地组,并且本地组只能容纳本地联系人。这有点公平,但是如果ABGroupAddMember不打算添加成员,则应该返回错误。

The problem was that the contacts were from google synced by exchange. There can be only local groups and local groups may only hold local contacts. This is kinda fair but the ABGroupAddMember should return an error if it is not going to add the member.

更多推荐

ABGroupAddMember在iOS4设备上不起作用

本文发布于:2023-11-27 05:47:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1636841.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上不   设备   ABGroupAddMember

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!