Skip to content

ZoomCar/iOS-SDK-Public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

09fda04 · Dec 6, 2022
Oct 11, 2020
Dec 30, 2020
Feb 18, 2021
Feb 18, 2021
Feb 24, 2021
Feb 24, 2021
Feb 24, 2021
Feb 24, 2021
Mar 3, 2021
Mar 5, 2021
Mar 5, 2021
Oct 23, 2020
Mar 5, 2021
Mar 5, 2021
Mar 8, 2021
Mar 8, 2021
Mar 8, 2021
Mar 8, 2021
Mar 12, 2021
Mar 12, 2021
Mar 15, 2021
Mar 15, 2021
Feb 18, 2021
Dec 24, 2021
Jul 14, 2021
Dec 16, 2021
Dec 24, 2021
Jan 5, 2022
Jan 6, 2022
Jan 6, 2022
Jan 6, 2022
Aug 31, 2022
Mar 9, 2022
Aug 31, 2022
Mar 9, 2022
Sep 1, 2022
Sep 1, 2022
Sep 1, 2022
Sep 1, 2022
Sep 1, 2022
Sep 2, 2022
Sep 2, 2022
Sep 5, 2022
Sep 5, 2022
Feb 18, 2021
Sep 5, 2022
Sep 5, 2022
Sep 5, 2022
Dec 1, 2022
Dec 2, 2022
Dec 5, 2022
Feb 18, 2021
Feb 18, 2021
Feb 18, 2021
Feb 18, 2021
Dec 5, 2022
Oct 11, 2020
Dec 6, 2022

Repository files navigation

ios-sdk

iOS SDK for third party

Swift 5, iOS 13+

Installation

CocoaPods is the recommended way to add Zoomcar ios-sdk to your project.

Using CocoaPod

Simply add the following line to your Podfile and install the pod. add Source

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'

target 'AppTarget' do
  # Comment the next line if you don't want to use dynamic frameworks
    use_frameworks! :linkage => :static
    pod 'ZoomcarOTAKit', '0.0.55'
end

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
  end
end

Usage

Use the following line to import the SDK to ur class

Import ZoomcarSDK 

Initialise the SDK using the following code

Zoomcar.setup()
Zoomcar.setMerchantId("")

Set User Property using the following code

Zoomcar.setUser(user)

where user is of type ZoomcarUser as defined below

public struct ZoomcarUser {
        internal var name: String?
    internal var phoneNumber: String?
    internal var email: String?
    internal var authToken: String?
    internal var isProfileUploadComplete: Bool = false
    
    public init(name: String, authToken: String, phoneNumber: String, email: String, isProfileUploadComplete: Bool)
}

Other Methods

/// Triggers the Zoomcar Booking flow Post Booking To Start the Trip
///
/// - Parameters:
///   - bookingId: car booking id
///   - type: checklist type MANNED_OLD_PICK_UP, MANNED_NEW_PICK_UP, MANNED_OLD_DROP_OFF, MANNED_NEW_DROP_OFF, KLE_PICK_UP, KLE_DROP_OFF
///   - customerCare:
///   - navigationController: Controller invoking the method
public static func showChecklist(bookingId: String, customerCare: String?, viewController: UIViewController, delegate: ZoomcarDelegate? = nil)
/// Triggers the Zoomcar User Verification Flow
///
/// - Parameters:
///   - navigationController: Controller invoking the method
public static func showUserProfile(viewController: UIViewController, delegate: ZoomcarDelegate? = nil)