Run RabbitMQ MQTT Adapter on your server.
Use MQTT Client Framework for sending and receiving data from devices.
Subscribe app in device A to a topic lets say /topic/user-a, and
device B to topic /topic/user-b
Attach event to UITextField for text change, read details here
Once the user (lets say user-a) starts typing, publish data using MQTT client framework to topic: /topic/user-b with data: 1 and on typing stop, publish 0. As the device B is subscribed to this topic, device will receive the data as 1 (typing started) and 0 (typing ended).
Checkout https://github.com/AppLozic/Applozic-iOS-SDK for a sample code of a chat ios sdk which contains typing indicator as well.
Source: http://www.applozic.com/blog/how-to-implement-typing-indicator-in-android-chat-app/