Can NSNotificationCenter be used between different frameworks to communicate?

547 Views Asked by At

An app can make internal use of NSNotificationCenter for different parts to communicate with each other, but can this be extended such that different frameworks can use it to communicate on iOS?

1

There are 1 best solutions below

0
Pofat On BEST ANSWER

In the same app, frameworks all get executed on the same process. They just locate at different places in memory allocated by the app.

On the same running process, NSNofitcationCenter can communicate with each other no matter which framework the sender or receiver locates at.

If you are talking about app and its extension, they run on different process and thus NSNofitcationCenter can not send notification to each other. You have to use CFNotificationCenter