For use with Android, iOS, React Native, Flutter, and .NET Mobile SDKs only.
By default, Cobrowse Native SDKs for Android and iOS open a socket to handle incoming session requests.
You may optionally send new session requests over the native push channel. Cobrowse supports this configuration out of box using Firebase Cloud Messaging (FCM).
For sessions to start by push the user needs to have the client application open in the foreground. This method will not send a visible push notification to the user.
If you wish to use visible push, this is possible using your own existing push channel and can be fully customized.
In your Project settings, add entries for your Android and iOS apps.
For iOS, you will need generate an APNs Authentication Key (recommended) or APNs Certificate from https://developer.apple.com. You may then upload it under Project Settings -> Cloud Messaging.
Please generate a Firebase Private Key file from Project Settings -> Service Accounts, download it and enter its contents into your Firebase settings.
A few changes to native code as described below.
If you are already using push notifications in your app, there is nothing further required on the native side.
If you are not already using push notifications in your app, please enable them under Capabilities in Xcode and request push permission from the user whenever is appropriate:
Next, whenever your device receives a registration token from FCM, pass that to the Cobrowse.io SDK, for example:
import'package:cobrowse_sdk_flutter/cobrowseio.dart';if (Platform.isAndroid) {// Only required on Android, iOS does this automaticallyCobrowseIO.instance.setDeviceToken('<your FCM token>');}
.NET iOS implementation
If you are already using push notifications in your app, there is nothing further required on the native side.
If you are not already using push notifications in your app, please enable them under Capabilities in the iOS app project and request push permission from the user whenever is appropriate: