1

Is there pub sub support in the iOS SDK or in any framework for iOS (in essence a wrapper for NSNotificationCenter, that would facilitate use and also add additional functionality)?

I find pub sub very helpful for designing mobile applications and on Android I use Otto and found it very helpful for sharing application events (such as when temperature gets updated from a web service). Searching online, I have found only one framework (bendytree ) and it does not seem very active (only two commits).

Is this already built into the SDK, or is there a standard library commonly used? (Or maybe nobody does pub-sub on iOS?)

Cesare
  • 9,139
  • 16
  • 78
  • 130
stevebot
  • 23,275
  • 29
  • 119
  • 181

2 Answers2

2

Have you considered using a managed cloud services like Pusher or Realtime? They both implement publish/subscribe and have native iOS SDK's.

  • Thanks but that slightly different then what I'm looking for. Those services help with client to server communication. I am looking for a framework that works for in app communication. It gets very ugly if you have to use callbacks everywhere. – stevebot Jan 23 '15 at 18:01
  • essentially what a good pub/sub library would be doing is wrapping NSNotificationCenter and adding additional functionality – stevebot Jan 23 '15 at 18:02
0

Try following samples. It works perfectly for me. These links will give solution for publish subscribe which is the advanced concept for NSNotificationCenter.

  1. https://github.com/staxmanade/PubSub-iOS
  2. https://github.com/Glow-Inc/GLPubSub
Rajesh Loganathan
  • 11,129
  • 4
  • 78
  • 90