How do I write code to run when the contact store was changed by another app, but not run when the contact store was changed by my app?

I noticed that when my app changes the contact store, the CNContactStoreDidChange notification fires in my app. How do I check if the notification fired because my app changed it. Is there a way to know which app made the change to the contact store. I need to know so I can write code to run only if the contact store was changed by another app instead of my app.

May be I miss something.

Why not have a global Bool var in your app that will be true when you change contact store ?

And use it to decide action on contacts change.

And reset this var to false once you have done the action for app based changes.

How do I write code to run when the contact store was changed by another app, but not run when the contact store was changed by my app?
 
 
Q