In this chapter, we will write our first messaging client: an native application running on an iPhone. We will use STOMP to send and receive messages using the Objective-C library StompKit.
Locations Application Using STOMP, we described the
Locations application. In this chapter, we will write the iOS application that broadcasts the device’s position and receive text messages.
All along the chapter, we will show all the code required to run the application.
The whole application code can be retrieved from the GitHub repository in the
To use STOMP on iOS, we will use the
StompKit Objective-C library that implements the STOMP protocol in a modern event-driven way using ARC, Grand Central Dispatch and blocks.
The source code of this library project is hosted on GitHub.
LocationsProject with Xcode
We will use Xcode to create the
Locations iOS application.
Once Xcode is installed and started, we create a new project from its launch screen:
Create a new Xcode projectfrom Xcode launch screen.
The application consists in a single view so we choose the
Single View Application template in
iOs > Application from the template screen.