Configure WebSockets
REST Wrappers for SFAP APIs
Using Key-Value Stores for Secure Data Storage
Dark Mode and Dark Theme Settings
Files API Reference
Supported REST Services
Supported Versions of Tools and Components for Mobile SDK
Mobile SDK REST APIs support the standard object operations offered by Salesforce Platform REST and SOAP APIs. For most operation types, a factory method or factory object creates a REST request object specifically for that operation. You send this request object to Salesforce using the Mobile SDK REST API and receive the response asynchronously.
After you’ve sent a request to Salesforce, the response arrives in your app asynchronously. To handle these responses, you can specify a callback delegate when you send the request, or define a closure (Swift only).
Get a notification.
Delegate Method
1RestClient.shared.request(forNotification:apiVersion:)1- (SFRestRequest *)requestForNotification:(NSString *)notificationId apiVersion:(NSString *)apiVersion;Block Method
Not available.
Get the status of a range of notifications, including unread and unseen count.
Delegate Method
1RestClient.shared.request(forNotificationsStatus:)1- (SFRestRequest *)requestForNotificationsStatus:(NSString *)apiVersion;Block Method
Not available.
Get the given number (maximum 20) of archived Notification Builder notifications based on the given “before” or “after” date. In Mobile SDK, use the Swift FetchNotificationsRequestBuilder object or the Objective-C SFSDKFetchNotificationsRequestBuilder to create GET requests for notifications.
Delegate Method
1let builder = FetchNotificationsRequestBuilder.init()
2builder.setSize(10)
3builder.setBefore(Date.init())
4let request = builder.buildFetchNotificationsRequest(SFRestDefaultAPIVersion)1SFSDKFetchNotificationsRequestBuilder *builder =
2 [[SFSDKFetchNotificationsRequestBuilder alloc] init];
3[builder setBefore: [NSDate date]];
4[builder setSize:10];
5SFRestRequest *fetchRequest =
6 [builder buildFetchNotificationsRequest:kSFRestDefaultAPIVersion];Block Method
Not available.
Update the “read” and “seen” statuses of a given set of Notification Builder notifications. In Mobile SDK, use the Swift UpdateNotificationsRequestBuilder object or the Objective-C SFSDKUpdateNotificationsRequestBuilder object to create update requests.
To update a single notification, set the notificationId property. To update a range of notifications, set either the notificationIds or the before property. These properties—notificationId, notificationIds, and before—are mutually exclusive.
Delegate Method
1let builder = UpdateNotificationsRequestBuilder.init()
2builder.setBefore(Date.init())
3builder.setRead(true)
4builder.setSeen(true)
5let request = builder.buildUpdateNotificationsRequest(SFRestDefaultAPIVersion)1SFSDKUpdateNotificationsRequestBuilder *builder =
2 [[SFSDKUpdateNotificationsRequestBuilder alloc] init];
3[builder setRead:true];
4[builder setSeen:true];
5[builder setBefore: [NSDate date]];
6SFRestRequest *updateRequest = [builder buildUpdateNotificationsRequest:kSFRestDefaultAPIVersion];Block Method
Not available.
For sample calls, see /libs/SalesforceSDKCore/SalesforceSDKCoreTests/SalesforceRestAPITests.m at github.com/forcedotcom/SalesforceMobileSDK-iOS.
We've Moved