All Projects → hypertrack → quickstart-ios

hypertrack / quickstart-ios

Licence: MIT license
Quickstart app for HyperTrack iOS SDK

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to quickstart-ios

LocationShare
A simple Android application to share your location
Stars: ✭ 75 (+368.75%)
Mutual labels:  location
Yakhont
The high-level Android components library for data loading, location, lifecycle callbacks and more.
Stars: ✭ 13 (-18.75%)
Mutual labels:  location
Atlas
🌎 Atlas is a set of APIs for looking up information about locations
Stars: ✭ 21 (+31.25%)
Mutual labels:  location
zx-ip-address
Deprecated
Stars: ✭ 96 (+500%)
Mutual labels:  location
Generation
⭐ A Private, Secure, End-to-End Encrypted Messaging app made in Flutter(With Firebase and SQLite) that helps you to connect with your connections without any Ads, promotion. No other third-party person, organization, or even Generation Team can't read your messages. 💝
Stars: ✭ 18 (+12.5%)
Mutual labels:  location
locus-android
An Awesome Kotlin Location library to retrieve location merely in 3 lines of code
Stars: ✭ 280 (+1650%)
Mutual labels:  location
XamarinForms.LocationService
Xamarin Background Services, Background Location Updates, Location Updates, BroadCastReceiver
Stars: ✭ 61 (+281.25%)
Mutual labels:  location
sy flutter amap
高德地图flutter插件
Stars: ✭ 13 (-18.75%)
Mutual labels:  location
oso-backend
Heart of the oso project.
Stars: ✭ 12 (-25%)
Mutual labels:  location
GeoLite2-Country
GeoLite2-Country.mmdb.gz CDN files based on Free Open Source CDN jsDelivr!
Stars: ✭ 69 (+331.25%)
Mutual labels:  location
WeChatSendLocation
仿微信发送位置模块 包括位置的选取 位置的查看 导航街景路线等
Stars: ✭ 19 (+18.75%)
Mutual labels:  location
ktor-API-examples
Examples with ktor to create an API REST
Stars: ✭ 23 (+43.75%)
Mutual labels:  location
android
Where you can find everything Android from Mapzen
Stars: ✭ 106 (+562.5%)
Mutual labels:  location
SimpleLocationGetter
No description or website provided.
Stars: ✭ 21 (+31.25%)
Mutual labels:  location
pinpoint
🌎 A python script for finding your Mac.
Stars: ✭ 56 (+250%)
Mutual labels:  location
CarAnimation
A project for the implementation of the car animation feature in most ride-sharing/ food delivery apps
Stars: ✭ 45 (+181.25%)
Mutual labels:  location
GPSd4Java
GPSd client library written in Java
Stars: ✭ 40 (+150%)
Mutual labels:  location
tracksix
Track your [⛵|🚂|🚙|🚜|🛵|🛷|🚶] with a Raspberry Pi and a GPS.
Stars: ✭ 16 (+0%)
Mutual labels:  location
location-api-sl
This API can be use to all developers to get location details of Sri Lanka 🇱🇰 including major cities, sub areas, districts and Provinces. ⛳️
Stars: ✭ 35 (+118.75%)
Mutual labels:  location
GoogleMap Demo
GoogleMap一些常用API总结库
Stars: ✭ 24 (+50%)
Mutual labels:  location

HyperTrack Quickstart for iOS SDK

GitHub Cocoapods platforms iOS SDK

HyperTrack lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons. This repo contains an example iOS app that has everything you need to get started in minutes.

Create HyperTrack Account

Sign up for HyperTrack and get your publishable key from the Setup page.

Clone Quickstart app

Install the SDK dependency

SwiftUI version

SwiftUI version uses Swift Package Manager to install the latest version of the SDK. Open Quickstart.xcodeproj and HyperTrack dependency will be downloaded automatically.

UIKit version

UIKit version uses CocoaPods dependency manager to install the latest version of the SDK. Using the latest version of CocoaPods is advised.

If you don't have CocoaPods, install it first.

Run pod install inside the cloned directory. After CocoaPods creates the Quickstart.xcworkspace workspace file, open it with Xcode.

Set your Publishable Key

SwiftUI version

Open the Quickstart project and set your Publishable Key (from Setup page) inside the placeholder in the Quickstart.swift file.

UIKit version

Open the Quickstart workspace and set your Publishable Key (from Setup page) inside the placeholder in the AppDelegate.swift file.

Setup silent push notifications

Set up silent push notifications to manage on-device tracking using HyperTrack cloud APIs from your server.

If you prefer to use your own messaging service to manage server-to-device communication, use the sync method.

Log into the HyperTrack dashboard, and open the setup page. Upload your Auth Key (file in the format AuthKey_KEYID.p8 obtained/created from Apple Developer console > Certificates, Identifiers & Profiles > Keys) and fill in your Team ID (Can be seen in Account > Membership).

Run the Quickstart app

Run the app on your phone and you should see the following interface:

Quickstart app

HyperTrack creates a unique internal device identifier that's used as mandatory key for all HyperTrack API calls. Please be sure to get the device_id from the app or the logs. The app calls deviceID to retrieve it.

You may also set device name and metadata using the Devices API

Start tracking

Now the app is ready to be tracked from the cloud. HyperTrack gives you powerful APIs to control device tracking from your backend.

To use the HyperTrack API, you will need the {AccountId} and {SecretKey} from the Setup page.

Track devices during work

Track devices when user is logged in to work, or during work hours by calling the Devices API.

To start, call the start API.

curl -X POST \
  -u {AccountId}:{SecretKey} \
  https://v3.api.hypertrack.com/devices/{device_id}/start

Get the tracking status of the device by calling GET /devices/{device_id} api.

curl \
  -u {AccountId}:{SecretKey} \
  https://v3.api.hypertrack.com/devices/{device_id}

To see the device on a map, open the returned embed_url in your browser (no login required, so you can add embed these views directly to you web app). The device will also show up in the device list in the HyperTrack dashboard.

To stop tracking, call the stop API.

curl -X POST \
  -u {AccountId}:{SecretKey} \
  https://v3.api.hypertrack.com/devices/{device_id}/stop

Track trips with ETA

If you want to track a device on its way to a destination, call the Trips API and add destination.

HyperTrack Trips API offers extra fields to get additional intelligence over the Devices API.

  • set destination to track route and ETA
  • set scheduled_at to track delays
  • share live tracking URL of the trip with customers
  • embed live tracking view of the trip in your ops dashboard
curl -u {AccountId}:{SecretKey} --location --request POST 'https://v3.api.hypertrack.com/trips/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "device_id": "{device_id}",
    "destination": {
        "geometry": {
            "type": "Point",
            "coordinates": [{longitude}, {latitude}]
        }
    }
}'

To get {longitude} and {latitude} of your destination, you can use for example Google Maps.

HyperTrack uses GeoJSON. Please make sure you follow the correct ordering of longitude and latitude.

The returned JSON includes the embed_url for your dashboard and share_url for your customers.

When you are done tracking this trip, call complete Trip API using the trip_id from the create trip call above.

curl -X POST \
  -u {AccountId}:{SecretKey} \
  https://v3.api.hypertrack.com/trips/{trip_id}/complete

After the trip is completed, use the Trips API to retrieve a full summary of the trip. The summary contains the polyline of the trip, distance, duration and markers of the trip.

curl -X POST \
  -u {AccountId}:{SecretKey} \
  https://v3.api.hypertrack.com/trips/{trip_id}

Track trips with geofences

If you want to track a device going to a list of places, call the Trips API and add geofences. This way you will get arrival, exit, time spent and route to geofences. Please checkout our docs for more details.

Dashboard

Once your app is running, go to the dashboard where you can see a list of all your devices and their live location with ongoing activity on the map.

Documentation

You can find API references in our docs. There is also a full in-code reference for all SDK methods.

Support

Join our Slack community for instant responses. You can also email us at [email protected].

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].