iOS | How to resync myNetworkContacts
Hello,
How is possible to resync all myNetworkContacts when application for example goes to background (some contacts already accept invitations) ?
Because right now I need to terminate app and reopen to be able to populate notification
kContactsManagerServiceDidEndPopulatingMyNetwork
I tried to call when ScenePhase has changed from "Background" to "Active"
serviceManager.contactsManagerService.myNetworkContacts
but no success still have same contacts from first application start. Hovewer I see in your app, I can be in background and then become active and contacts are loaded once again, and contacts list contain new one or remove contacts which are not part of my network anymore.
-
Hello Patrik,
The updates are done in the SDK and dispatched to the UI by several notifications:
- kContactsManagerServiceDidAddContact
- kContactsManagerServiceDidUpdateContact
- kContactsManagerServiceDidRemoveContact
- kContactsManagerServiceDidRefreshPersonalDirectory
You also have some notifications about invitations, but I see in our app that we handle them only for sent invitations:
- kContactsManagerServiceDidAddInvitation
- kContactsManagerServiceDidUpdateInvitation
- kContactsManagerServiceDidRemoveInvitation
I would recommend you to check which ones are useful for you and not listen to all and reload everything.
Por favor, entrar para comentar.
Comentários
1 comentário