0

I want to be able to read the names of the exchange accounts.

ABSource objects only have 2 properties from what i could tell.One of them is an integer specifying the type of source(ex: 0 for local addressbook, 1 for exchange addressbook) and the other is a string specifying the name of the source.Unfortunetely the name of the source will not be the name of your exchange account,it will always be called "Contacts".The problem is that if you would save all the sources in an array and when writing a contact to a specific source you would acces it from there it will work...it will add it to the right source,my problem is i want to be able to select which account to add to from a table view and so far have found no way of differentiating the accounts.

gcamp
  • 14,622
  • 4
  • 54
  • 85

1 Answers1

0

Yes, for some Exchange accounts (and other types of accounts) it seems like there is no way to get any other name except "Contacts".

What you should do is:

Create a separate object that holds the ID and name of the source and has a boolean which tracks whether this account has been selected. Hold these objects within the array that is responsible for populating the UITableView. When the user selects a source, modify the boolean and at the end, when you want to know what the user selected, go through the array and select only the IDs from the objects that have been selected.

Alex
  • 7,432
  • 20
  • 75
  • 118