function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
iOS App with SFDC Mbi SDKiOS App with SFDC Mbi SDK 

Mobile SDK Integration Concerns on refresh token, volatile smart store & smart sync for hybrid apps

Hello Everyone,

 

We are trying to understand below. We came across these when we started using SFDC ios mobile sdk.

1. Is it possible to implement smart store feature without refresh token?
2. Is it possible to implement smart sync feature pure native ios app(not hybrid app)?
3. Smart store data is inherently volatile, life time of data is till token exists and data gets purged later.

 

Thanks,

 

Kevin HawkinsKevin Hawkins
1. SmartStore does not rely on authentication, but with regards to your question below, SmartStore soups will be removed when auth credentials are invalidated, or the user logs out. That's not currently configurable.

2. SmartSync is currently only available for hybrid apps. We hope to implement the functionality in native in the future.

3. See #1. SmartStore is currently hard-wired to be cleared when auth credentials become invalid, for security reasons. We've been considering implementing different classes of data, to allow for some kinds of data to persist across sessions, but nothing concrete has been decided.

We're interested in hearing about use cases for SmartStore data storage that isn't tied to a Salesforce user, to get a better understanding of the problem you're trying to solve.
Gaurav KheterpalGaurav Kheterpal

@Kevin - #1 and #3

 

We've a complex app that uses smartstore to cache large amounts of data. The problem we're facing is that we've seen users getting logged out intermittently (we're analysing the root cause to be sure whether it's actually a bug in the Mobile SDK or in our code) but it's frustrating to see thousands (and potentially millions) of records being wiped off because the user was logged out forcibly.

 

Hope this helps. I really do hope that there's a plan to persist the SmartStore data beyond a current user session.

 

Regards,
Gaurav

Brad ThomasBrad Thomas
It seems that we have to fall back on CoreData in order to reliably persist the data on the device, is this correct? We have users that work with a lot of data and downloading from Salesforce would take too long, or they may be offline. Am I correct in that if the token expires while they are offline, their soups are removed? Is SmartStore essentially intended therefore to simply be a temporary scratchpad -type storage?