Ably is the platform that powers synchronized digital experiences in realtime. Whether attending an event in a virtual venue, receiving realtime financial information, or monitoring live car performance data – consumers simply expect realtime digital experiences as standard. Ably provides a suite of APIs to build, extend, and deliver powerful digital experiences in realtime for more than 250 million devices across 80 countries each month. Organizations like Bloomberg, HubSpot, Verizon, and Hopin depend on Ably’s platform to offload the growing complexity of business-critical realtime data synchronization at global scale. For more information, see the Ably documentation.
This demo presents a mock delivery Rider app with functionality matching that expected for the typical use case for Ably's Asset Tracking solution, being the publication of Location updates for a delivery being made to a customer, where the Rider is using an iOS based device such as an iPhone or an iPad. Such deliveries could be food, groceries or other packages ordered for home delivery.
This app is a member of our suite of Ably Asset Tracking Demos, developed by Ably's SDK Team to demonstrate best practice for adopting and deploying Asset Tracking.
The demo app is currently under active development and constantly improved. We're currently working on the first milestone of the Milestoes list, but most of the basic functionality of the expected use cases can already be tested.
- App can be compiled using Xcode 13.4+
- App can be run on iPhone devices with iOS >= 14.0 in portrait mode.
- To run the app you'll first need to configure your Mapbox account and credentials. Please follow this guide.
- You'll need a
Secrets.plist
file containing Mapbox Access Token and the Ably Api Key. To do this you can rename theSecretsExample.plist
file at the root of the project, and fill it out with your data. ABLY_API_KEY
: Used by the app to authenticate with Ably using basic authentication. Will be replaced with the token auth method once the app reaches Milestone 3. You can get the Ably Api Key here.MAPBOX_ACCESS_TOKEN
: Used to access Mapbox Navigation SDK/ APIs, and can be taken from here.
Ably Publisher Setup
- allows you to configure the resolution that thepublisher
object will be using. See more details in the documentationMin. Displacement
andDesired Interval
text fields must have a validInt
value.Status
screen shows various information about the currently trackedtrackable
object. As a debug feature you can also set theAcceptance Distance
, that defines (as anInt
) how close the rider's device has to be to theActive destination
to allow tapping on theFinish Tracking
button, that marks the order as delivered and removes the active trackable object (using theremove
method on the publisher object).Add Trackable
screen - allows you to add a new trackable, using a required trackable id text field. You can either justAdd
the new trackable (which uses theadd
method on thepublisher
object), orAdd & Actively Track
to set it as anactiveTrackable
(which uses thetrack
method on the publisher object)Select Trackable
screen - allows you to select one of the trackables that you've added earlier using theAdd Trackable
screen and set it as anactiveTrackable
(which uses thetrack
method on the publisher object)
- Currently you can either
Add
, orAdd & Actively Track
a trackable on theAdd Trackable
screen, which respectfully fires theadd
andtrack
methods on the Publisher object. However, if youAdd
a trackable on this screen, and then try to select it on theSelect Trackable
screen (which fires thetrack
method), you'll get an error in thetrack
method's completion block, and the selected trackable won't be actively tracked. This problem is caused by the sdk issue: ably/ably-asset-tracking-swift#308