Notification Service Extension Ekleme
...
Code Block | ||
---|---|---|
| ||
import RelatedDigitalIOS import UserNotifications class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent? override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) DispatchQueue.main.async { RelatedDigital.initialize(organizationId: urlConstant.shared.organizationId"YOUR_ORGANIZATION_ID", profileId: urlConstant.shared.profileId"YOUR_SITE_ID", dataSource: "visistoreYOUR_DATA_SOURCE", launchOptions: nil) RelatedDigital.enablePushNotifications(appAlias: "RDIOSExampleYOUR_APP_ALIAS", launchOptions: nil, appGroupsKey: "group.com.relateddigital.RelatedDigitalExample.relateddigitalYOUR_APP_GROUPS_KEY") RDPush.didReceive(self.bestAttemptContent, withContentHandler: contentHandler) } } override func serviceExtensionTimeWillExpire() { guard let contentHandler = contentHandler else { return } guard let bestAttemptContent = bestAttemptContent else { return } contentHandler(bestAttemptContent) } } |
...
Code Block | ||
---|---|---|
| ||
RelatedDigital.setEmail(email: "test@relateddigital.com", permission: true) RelatedDigital.setEuroUserId(userKey: "1234567890") RelatedDigital.sync() |
Mobil kanaldan gelen datalarınızın RMC'ye yüklenebilmesi için, aktif RMC hesabınızda kullanmış olduğunuz referans değeriniz ne ise (KEY_ID* veya E-Mail) mobil kanaldan gelen dataların da bu referans ile gelmesine dikkat ediniz."
*KEY_ID: Uygulama sahibi tarafından müşterisinin tekilleştirilmesi için kullanılan id değerleridir. Bunlar CRM id, userid, customerid, accountid gibi farklı isimlerle ifade ediliyor olabilir.
...