Note that this code is for v1 of the platform which is being deprecated in favor of v2.
The code contained in this repository is an example of how you would go about implementing a Notifications Viewer in iOS that provides the functionality shown below.
Specifically:
- Receiving a list of all the active Notifications for an account
/notifications
- Dismissing Notifications
/notifications/:id/dismiss
- Publishing imagery from a Notification
/publish
- Creating a new Alert from your location that will notify you when new imagery intersects with where you are standing
/alerts
You need to be familiar with the iOS SDK and Xcode to work with this example. It is commented for easy reading and learning.
You will need Xcode installed and then clone the latest from this repository to begin.
You will need to provide valid variables in the AstroDigital.plist file.
Field | Type | Description |
---|---|---|
baseURL | String | URL of astrodigital platform |
token | String | Valid Astro Digital token |
String | Email to use for certain platform actions | |
mapboxToken | String | Valid Mapbox token for use with SDK |
basemap | String | Valid basemap to use for maps |
The project contains an example of how to control offline caching (subject to Astro Digital Terms of Service) so that you can build an application that works even without a network connection.
Note that offline caching is not available with the latest Mapbox iOS SDK.
There are many things that go into making an outstanding iOS app experience, and this example is missing many of them. It's not intended to be a living, standalone application but rather to show off how to integrate Astro Digital services within an iOS environment.