Setting up Credentials and Environment for iOS SDK
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
- Getting Started
- Bot Building
- Conversation Design
- Developer Guides
- Agent Setup
- Analytics & Reporting
- Troubleshooting Guides
- Release Notes
Setup Credentials & Environment
The SDK takes in any type of credentials through your info.plist file. You define a Dictionary object in your info.plist file with the name HaptikLib and add all the required credentials there. These credentials are required else the SDK will give an assert.
After registering with Haptik as an account, you'll be given the following credentials:
- Client ID
- Base URL (Different for Staging and Production)
- Business ID
You also have to set the runEnvironment according to the baseURL you are specifying. Set 0 if adding the Production URL else keep it as 1 (Staging). On opening the app's Info.plist in Source Code format you can add the required keys as illustrated below -
<key>HaptikLib</key> <dict> <key>baseUrl</key> <string>insert_base_url</string> <key>businessID</key> <string>insert_busines_id</string> <key>clientID</key> <string>insert_client_id</string> <key>runEnvironment</key> <string>1</string> </dict>
While releasing the application on the App Store, only the Production URL (provided by Haptik) should be used and the runEnvironment should be 0.
HaptikLib requires some basic permissions which almost every application takes to function properly. You can see all the required permissions here. Make sure to add them else iOS will assert the application when the SDK will try to present the prompt if the respective permission is not granted by the user.