teliver-medicine-ios
Medicine Delivery
Hugs are for soul and Drugs are for life! Not knowing where they are, makes our lives blue; Whereas now Teliver embedded, gives you a clue!
ADDING TELIVER SDK TO YOUR CUSTOMER APP

The Existing SDK supports only customer tracking on iOS, This is how it’s gonna get easier, to add 'LiveTracking' in your medicine delivery iOS Application, just Integrate Teliver SDK with the following simple steps.

  • Teliver SDK is hosted in CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command.

  • To integrate Teliver SDK into your Xcode project using CocoaPods, specify it in your Podfile:

pod ‘teliver’

  • Then Install the pods using 'pod install', Once Installing, open your project in Xcode from the .xcworkspace file (not the usual project file).

We request users location on Our SDK to send customers location to driver, to allow SDK to proceed further, select info.plist

  • Add `Privacy` - Location When In Use Usage Description’s

INITIALIZE TELIVER SDK IN YOUR APP

Congratulations! If you successfully completed the previous step of integration. Now lets proceed to the next step of initializing.

To initialize you need a "TELIVER KEY". Which is a unique key needed for identifying your application and to get the core of Teliver to work.

To get the key,

  • Login/Register to Teliver , you can find 'TELIVER KEY' under android integration tab.

integration-teliver-key
  • Initiate the Teliver SDK by adding the following code in your App Delegate's didFinishLaunchingWithOptions method.

let teliver = TeliverSettings.init(withAppKey: "TELIVER_KEY")

Teliver.init(withTeliverSettings: teliver)

(Note: use debugging - true/false for SDK in your TeliverSettings object to enable logging during Development.)

START TRACKING

Once the customer is notified that the trip is started by driver, you can start tracking the driver by using the following piece of code.

   let trackingUser = TeliverTracker.init(forTrackingId:"trackingId" withCustomMessage:"Pop Up Title/Message")

   Teliver.startTrackingFor(user: trackingUser, withNavigationTitle: "Navigation Bar Title")

you can start tracking the driver with delegates also, Implement the delegate ‘TeliverTrackingDelegate’ on your view controller and you will get the following methods for usage.With this you can build your own Map.

public func didStartedTracking(_ trackingId: String?) {

  //This method is called when the consumer initiates the trip by startTracking method.

  }
public func didStoppedTracking(_ trackingId: String?){

  //This method is called when tracking has stopped by calling the method stopTracking.

  }
public func didRecieveUpdateOnTracking(_ trackingId: String?, data: [String : Any]){

  //This method is called when there is a updates in the location.

  }
public func didRecieveErrorOnTracking(_ error: String?){

  //This method is called when there is error on tracking.

   }

(Note: The trackingId is the same trackingId that you used to start the trip on driver side, the trackingId is the spotting key to identify your driver.)

ENABLE PUSH NOTIFICATION

Teliver sdk provides you the way to notify your customers about the events that can occur within the Operator and Consumer. You can use this link how to setup Push notification in your iOS Project & Teliver dashboard.

Identifying Users

  • To send/recieve a notification to users, the device must be first identified to do so use the following method.



  //Called when APNs has assigned the device a unique token.
 func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

  let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})

  Teliver.identifyUser(forUser: "USER_ID", withToken: deviceTokenString)
  }

(Note: USER_ID here can be your user’s unique identifier in your system for identification, this will reflect under Users on dashboard. Also you can use the method available without device token.)

Handling Push/Events

 func application(_ application: UIApplication, didReceiveRemoteNotification data: [AnyHashable : Any]) {

  if Teliver.isTeliverPush(data: data) {
  // Above data params has your message, command & tracking_id in Json.
  //Commands are of two types:
    //teliver_start_trip -> This command will be issued when a trip has been started. You need to start the trip here using start tracking.
    //teliver_event_push -> This Command will be issued when a custom event push is triggered.

  }else {
   //The push is not for us, You can handle it.
}

(Note: Don’t forget to identify Consumer to receive push.)

Bringing about the change in Delivering Medicines is what the world needed and exactly what the market provided too. The desperation of certain people in not being able to get the exact prescribed medicines has caused a lot of commotion. But by bringing the entire pharmacy online, people are now content.

But the real deal is Live Tracking those drugs till it reaches the hands of the customer. This has been debated for quite a long time, with no genuine solution to be found. Teliver has the key and is what should be rendered in every Medicine Delivery App.

The above iOS integration will enable a wide possibility of opportunities for a Medicine Delivery business App in recognizing the customer reactions and developments rendered. Most of all, the satisfaction factor is what that counts for a business to flourish and Teliver makes sure that the solution offered provides the best of what a business requires.