Creating AddressBook Groups on simulator
Hey all, I was trying to create groups in the addressbook of my simulator through code. I am able to do so on when I run the code on device but on simulator the same code doesn't work. I am not able to create groups on the simulator. Can any one help me with it?
I am getting a few contacts from the server which I am saving into the addressbook. As and when I get a contact from the server, I also get the group to which it belongs. So when I get a contact, I look for the groups already present on my client which in this case is zero. So, I save the contact and then create a group with the particu开发者_开发知识库lar name which the contact record brought from the server. And after doing this, I add this contact to the group just created. This goes on over and over. What I am seeing on my simulator is that the contacts are getting added but the groups aren't getting created. On the device, it happens fine.
Thanks in advance.
First off, make few contacts on the simulator atleast 5-6 contacts by pressing the contact button. Now save them and run the code again by closing the simulator and rerunning your code. Your app should find the contacts and you should then be able to create groups once ur code has contacts to play around with
精彩评论