[Problem/Question]
The push tracking events (delivered, clicked) are called normally, but there is no change in the Log and Analysis tabs on the dashboard.
[SDK Version]
sendbird-chat-sdk-ios / 4.19.5
[Reproduction Steps]
- Push notifications are delivered successfully with under codes.
// AppDeleate
func application(
_: UIApplication,
didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
let initParams = InitParams(
applicationId: Constants.sendbirdAppId,
isLocalCachingEnabled: true,
logLevel: .info,
needsSynchronous: false
)
SendbirdChat.initialize(
params: initParams,
migrationStartHandler: {
// Logging
},
completionHandler: { error in
// Logging
SendbirdChat.setAppGroup(Constants.AppGroudId)
}
)
SendbirdChat.setSessionDelegate(SendbirdService.shared)
// ...
}
func application(_: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
SendbirdChat.executeOrWaitForInitialization {
SendbirdChat.registerDevicePushToken(deviceToken, unique: false) {
// ...
}
}
// ...
}
- And I tried to track delivered event using NotificationServiceExtension and
markPushNotificationAsDelivered
function.
SendbirdChat.markPushNotificationAsDelivered(
remoteNotificationPayload: bestAttemptContent.userInfo
) { error in
print(error) // return nil
}
The completionHandler returns nil and I expected logging to be successful. However, there is no change in the Log and Analysis tabs on the dashboard.
- I’m also tried to track clicked event using under codes with
markPushNotificationAsClicked
function.
func userNotificationCenter(
_: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler _: @escaping () -> Void
) {
let userInfo = response.notification.request.content.userInfo
let sendbird = userInfo["sendbird"] as? [String: Any]
let notificationPushData = sendbird?["notification_push_data"] as? [String: Any]
if let url = notificationPushData?["url"] as? String, let url = URL(string: url) {
WebService.shared.currentURL = url.absoluteString
}
SendbirdChat.markPushNotificationAsClicked(remoteNotificationPayload: userInfo) { error in
print(error) // return nil
}
}
The completionHandler returns nil again, but there is no change in the Log and Analysis tabs on the dashboard.
- I assumed several reasons.
- It’s because I missed some settings should be done.
- It’s because I’m currently using a free trial plan.
- It’s because I tested it with an app built on xcode, not the app store.
- So, how to fix this behaviors?
[Frequency]
Always.
[Current impact]
Can’t track any push events.