We have created an application for customers using our Mobile SDK for your better understanding of the different methods and their usage. To install the app, you need to ensure the following:
- SDK Prerequisites
- Creating the Zoho Creator application
- Registering your app with Zoho
- Installing CocoaPod
- Adding dependency
- Adding the Zoho Creator app to Xcode project
- Creating Objective-C Bridging Header
SDK Prerequisites
- A Zoho account. If you do not have an account, sign up for one here.
- Creating a Zoho Creator app
- Registering your iOS app with Zoho
- Xcode IDE 15
- iOS 13 and above
- CocoaPods
- Simulator or physical iOS device (using iOS 9 or later) for running the app
Creating the Zoho Creator application
- Download the sample application from this link. The ZylkerCarCare.zip file will be downloaded.
- Extract it and locate the Zylker_Auto_Care_Chain.ds" file inside it.
- Create a Zoho Creator Application by importing the Zylker_Auto_Care_Chain.ds file into Creator. Learn how
- Set up a customer portal for the app with a default domain. Learn how
- Add customers to the portal. Learn how
3. Register your app with Zoho
3.1 Users in Creator 5, follow the below steps:
- Navigate to your app's Settings page, then to the Mobile SDK page.
- Under the For Customers section, click For iOS. A pane will slide in from the right.
- Select the UI & Core framework.
- Click the Generate Client Credentials. This will generate the client ID, client secret, Portal ID and redirectURI for the iOS app that you want to integrate with your Creator application.
3.2 Users in Creator 6, follow the below steps:
- Navigate to your admin dashboard.
- From the left pane, select Mobile.
- Click Create New Mobile App at the top-right corner.
- From the list of applications, select the required app. Select the For Users - SDK under the Apple icon section.
- Click Generate Client. This will generate the client ID, client secret, Portal ID, and redirectURI for the iOS app that you want to integrate with your Creator application.
Installing CocoaPod
CocoaPods is a third-party dependency manager for Swift and Objective-C projects.
To install CocoaPods,
- Open Terminal in your Mac
- Use the below command:
Adding dependency
- You can find the podfile file in the ZylkerCarCare > native folder (Xcode project directory).
- Ensure that the podfile contains the following:
- Open the Terminal, navigate to the ZylkerCarCare > native folder (Xcode project directory), then execute the following command:
- Open ZylkerCarService.xcworkspace in the XCode project.
Adding the Zoho Creator app to your sample Xcode project
- In the downloaded zip file, open ZylkerCarCare > native > ZylkerCarService.xcworkspace in XCode and navigate to AppHandler.swift.
- Fill in all parameters mentioned below:
- URL scheme (Redirect URI) entered should be configured in ZylkerCarCare -> Info -> URL Types.
- Download the ZCAppInfo.plist file from the Configure Core Framework tab (refer to steps 1-3 in the above section).
- For C6, refer to the below image.
- Move the ZCAppInfo.plist file to the ZylkerCarCare > native > ZylkerCarService folder.
- Add the ZCAppInfo.plist file to the project and attach it to all targets.
Objective-C Bridging Header
Ensure to check whether the ZylkerCarService-Bridging_header.h file exists in the project. Below image shows where the file is loacted.
If the file is not found, you can create one by following the steps below.
- Select Header File:
- Enter the name of the Header File.
- Configure the Header File in Project -> Build options.
- Add the following to your Objective-C bridging header:
#import <ZohoPortalAuthKit/ZohoPortalAuth.h>
- Compile the project. In case you face any errors while doing these, please refer to this page.