Skip to content

mappls-api/mappls-intouch-ios-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Mappls Intouch will enable the live tracking functionality in your mobile app and allows you to get the powerful features from Intouch IoT platform for your telematics devices. Inotuch SDK for iOS lets you easily add Mappls Telematics cloud services to your own iOS application.

Using this SDK, Your app shall fetch the live location from the end user mobile phone at the predefined condition, It could be based on the movement of the user, or fixed time interval or the combination of both. You can customize the data polling conditions. Along with that you can get the details about your other telematics device live locaion and analytics around that.

You will get seemless location benifits which caterted to different domains like logistics, delivery tracking , Employee tracking , live location sharing etc.

This library is available through CocoaPods. To install, simply add the following line to your podfile:

pod 'MapplsIntouchCore', '1.0.1'

Run pod repo update && pod install and open the resulting Xcode workspace.

Version Dated Description
1.0.1 16 Apr 2024 Fixed some bugs related to data types.
1.0.0 05 Oct 2023 Fixed location tracking issue.
1.0.0.beta.9 23 Aug 2023
1.0.0.beta.1 13 Apr 2023

This library depends upon MapplsAPICore. All dependent libraries will be automatically installed on using CocoaPods.

We use Publishable key to identify your account details and assign all your users device under single account.

After getting the publishable key, you can start with the IntouchDemo app, or Integrate the Intouch SDK in your app.

Setup a Project This guide allows you to add a live location tracking to an iOS app.

Xcode IDE recommended download Xcode latest version from Appstore.

For Privacy Policy of Location

Location Permission Map Prompt(Always allow) For apps granted Always Allow location permissions, iOS 13 will periodically display a "map prompt" The "map prompt" displays the location points collected by the app. In testing, we've identified that this prompt will be triggered after 3 consecutive days of background location use, and will continue to appear periodically with continued use.

Add Location permission into your plist file Configure the location services by adding the following entries to the Info.plist file. locations and motion keys are mandatory.

  • Location permissions
  • CoreMotion Permissions

Above permissions can be added by using below keys in Info.plist of an application:

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>""</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>""</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>""</string>
<key>NSMotionUsageDescription</key>
<string>""</string>

In your project settings, go to Capabilities > Background Modes and turn on background fetch, location updates.

To use SDK functionalities you must write import statements as shown below:

import MapplsIntouchCore

To work with SDK first call setup function on entry point of app i.e. on calling of didFinishLaunchingWithOptions of app.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    Intouch.shared.setup()
}

Before start tracking SDK needs to be authenticate first. Authenticate SDK by calling function initializeForCredentials using your keys.

Intouch.shared.initializeForCredentials(clientId: ci, clientSecret: cs, deviceName: trimmedText, deviceIdentifier: nil) { isSuccess in
    if isSuccess {
        // Take action for success means now you can start tracking
    } else {
        // Take action for error
    }
} failure: { error in
    var errorMessage = "Unknown Error"
    if let error = error {
        errorMessage = error.localizedDescription
    }
    // Take action for error
}

Call the below method to track your app user's phone live location. Make sure your internet connection will be on that time.

Intouch.shared.startTracking()

Call the below method to Stop Track your app user's phone live location. We put these lines for stop beacon tracking and sensors like gyro, aceelerometer., barometer , motion detectors.

Intouch.shared.stopTracking()


For any queries and support, please contact:

Email us at apisupport@mappls.com

Support Need support? contact us!



@ Copyright 2024 CE Info Systems Pvt. Ltd. All Rights Reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published