User Identification in Events

Team
SDK Team
Last Updated
June 10, 2026

How to Cross-Reference Information to Identify the User

In many operational scenarios, identifying the user responsible for an event is essential for analysis, contextual actions, and auditing. Below, we list possible approaches to perform this identification based on secure technical practices compatible with privacy guidelines.

1 - Using notificationToken

This function expects a String parameter, which represents the user's notification token. On iOS, this token is provided by APNS (Apple Push Notification Service), while on Android, it is obtained through Firebase Cloud Messaging.

To obtain the notification token, you’ll need to implement two new functions in the UIApplicationDelegate inside the AppDelegate.swift or AppDelegate.mm. The function didRegisterForRemoteNotificationsWithDeviceToken, if the user accepts the permission, and didFailToRegisterForRemoteNotificationsWithError if the user declines.

If permission is granted, you will call the sendNotificationToken function from the Group Link SDK.

Swift Implementation

1func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
2 let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }
3 let token = tokenParts.joined()
4
5 GroupLinkSDK.sendNotificationToken(token)
6}
7
8func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
9 print("Error getting notification token: \(error)")
10}

Objective-C Implementation

1- (void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *) deviceToken {
2 NSUInteger dataLength = deviceToken.length;
3
4 if (dataLength == 0) {
5 return;
6 }
7
8 const unsigned char *dataBuffer = (const unsigned char *)deviceToken.bytes;
9 NSMutableString *token = [NSMutableString stringWithCapacity:(dataLength * 2)];
10
11 for (int i = 0; i < dataLength; ++i) {
12 [token appendFormat:@"%02x", dataBuffer[i]];
13 }
14 [GroupLinkSDK sendNotificationToken:token];
15}
16
17- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
18 NSLog(@"Error getting token:%@", error);
19}