Sample iOS SwiftUI project demonstrating the integration of Helpshift SDK X.
- See Helpshift SDK X requirements here
- Clone the repositiory
- Open
helpshift-ios-sdkx-example.xcodeproj
in Xcode
Please follow these steps to build the app:
- Update your Helpshift App credentials in
helpshift-ios-sdkx-example/sdk_install_creds.plist
file. To get your Helpshift app credentials please check here. - Push notification is already integrated in the example app using
UserNotifications
framework- You need to upload your push certificate in Helpshift Dashboard as mentioned here
- You also need to modify the app target's bundle identifier to match your push certificate.
- Build the project in Xcode and run on either your device or simulator.
- Refer
application(:didFinishLaunchingWithOptions:)
method inDemoApp.swift
. - Notice that we have initialized the SDK as soon as the app is launched.
- Developer Documentation: Getting Started
NOTE: Helpshift.install
must be called before invoking any other API in the Helpshift SDK.
- Refer
LoginView.swift
. file for User related integration and example code - Developer Documentation: Users
- For install configuration, check
installConfig()
method inDemoApp.swift
. - For API configuration, check
config
computed property inContentView.swift
. - API config contains custom example for CIF. Please modify according to your needs.
- Many other configurations are picked from the example app UI.
- Developer Documentation: Configurations
- For example code of various other features please refer to code examples in
ContentView.swift
. - The code is easy to interpret since each button on UI has been linked with a feature.
- For example, if you need example code for showing Conversation Screen, start refering from
conversationViews
View inContentView.swift
. - Developer Documentation: Helpshift APIs
- To handle push notifications from Helpshift, refer implementation of
UNUserNotificationCenterDelegate
inDemoApp.swift
. - Notice that we have checked "origin" as "helpshift" before calling push handling APIs.
- The
UNUserNotificationCenterDelegate
methods handle Helpshift conversation push notifications as well as Proactive Outbound push notifications. - Developer Documentation: Notifications
- To show Proactive Outbound notification on device when receiving push notifications, refer implementation of
UNUserNotificationCenterDelegate
inDemoApp.swift
. - Handling Proactive Outbound links as deep links: // TODO
- Developer Documentation: Proactive Outbound
- Example code to handle deeplinks: // TODO
- Developer Documentation: Deep Linking
- To register for listening to Helpshift SDK generated events, refer
application(:didFinishLaunchingWithOptions:)
method inDemoApp.swift
. - To handle events received from Helpshift SDK after registering, refer implementation of
HelpshiftDelegate
in []DemoApp.swift
](/helpshift-ios-sdkx-example/Source/DemoApp.swift). - Developer Documentation: Delegates
- Documentation: https://developers.helpshift.com/sdkx_ios/getting-started/
- Release Notes: https://developers.helpshift.com/sdkx_ios/release-notes/
Copyright 2021, Helpshift, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.