Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Notifications Update
iOS
In iOS, use the Swift UpdateNotificationsRequestBuilder object or the Objective-C SFSDKUpdateNotificationsRequestBuilder object to create update requests.
To define the range of affected notifications, pass either an array of notification IDs or a “before” date. The ID array and “before” date are mutually exclusive parameters.
- Swift
-
1let builder = UpdateNotificationsRequestBuilder.init() 2// builder.setNotificationIds("<array_of_ids>") 3// OR 4// builder.setBefore(Date.init()) 5builder.setRead(true) 6builder.setSeen(true) 7let request = . 8 builder.buildUpdateNotificationsRequest(SFRestDefaultAPIVersion) - Objective-C
-
1#import <SalesforceSDKCore/SFRestAPI+Notifications.h> 2... 3 4SFSDKUpdateNotificationsRequestBuilder *builder = 5 [[SFSDKUpdateNotificationsRequestBuilder alloc] init]; 6// [builder setNotificationIds:<array_of_ids>] 7// OR 8// [builder setBefore: [NSDate date]]; 9[builder setRead:true]; 10[builder setSeen:true]; 11SFRestRequest *updateRequest = 12 [builder buildUpdateNotificationsRequest:kSFRestDefaultAPIVersion];
Android
- Kotlin
-
1fun getRequestForNotificationUpdate(apiVersion: String?, notificationId: String?, 2 read: Boolean?, seen: Boolean?): RestRequest - Java
-
Parameters
- apiVersion (String)
-
-
notificationIds (Array)
OR
- before (Date)
-
- read (Boolean)
- seen (Boolean)
1public static RestRequest getRequestForNotificationsUpdate(String apiVersion, 2 List<String> notificationIds, Date before, Boolean read, Boolean seen)