I have implemented the built in twitter API, and everything is working great, however I am trying to decide how best to persist a twitter account between sessions when a user has multiple twitter accounts set up.
If I only receive a single ACAccount
using -[ACAccountStore accountsWithAccountType:]
, this it's easy... I simply use that one. If, however, there are multiple ACAccounts
I don't want to be asking them every time the enter the app which one to use.
The way I see it so far, my options are:
Serialize the
ACAccount
object usingNSKeyedArchiver
(this would be the ideal, if it is possible)Bug the user every time (don't want to do this)
Store only the username of the selected
ACAccount
, then in the next session compare the username in each account within theACAccountStore
, and select that account (although for some reason this seems like an inelegant workaround).
Many thanks in advance!