Publishing iOS Location Data w/ Swift and Mapbox API
Blog post from PubNub
The tutorial provides a comprehensive guide on using the Mapbox API and PubNub to develop an iOS app that tracks and displays real-time location data on a live-updating map. The app retrieves and broadcasts location data, allowing users to track a friend's movement in real-time by listening to a PubNub channel using Swift and displaying the location on a map with Mapbox. The tutorial includes steps for setting up the project with the PubNub SDK using cocoapods, integrating Objective-C libraries in a Swift environment with a bridging header, and implementing PubNub callbacks to handle incoming location data messages. It details the process of extracting and storing location data, updating the map view with polylines to represent movement, centering the map on the current location, and adding markers for visual identification. Additionally, the tutorial notes the release of a new version of the iOS SDK and provides resources for migrating to version 4.0, as well as alternative tutorials using Google Maps API and MapKit API.