+ Start a Discussion
Sravani kuntamukkalaSravani kuntamukkala 

SmartStore not fetching data

Hi Team,

Im new to Sales Force SDK, and im encountering an issue which might be very simple mistake.

Im trying to sync my remote data based to a loca soup. Im able to syncdDown my data to local soup only once. Every other time when I try to syncDown or resync, i dont get any results. It says. "the store 'defaultStore' is already using the current encryption scheme.  Skipping." and not retrieving any results one more time.

Im syncdown and upsertign to local soup. And Im able to edit and update local soup data. however, if I want to resync my data for testing Im never able to do it. Can you please help.

Thanks
 
Philip GuerreiroPhilip Guerreiro
I had a simular issue last year i used think it was using the same soup name i referenced the sample app in the git repo to check my code.

this is my method placed in the SObjectDataManager.m i call this to completely drop local data and get everything fresh.

-(void)repopulateSoup{
__weak SObjectDataManager *weakSelf = self;
NSString *soupName = weakSelf.dataSpec.soupName;
NSArray *indexSpecs = weakSelf.dataSpec.indexSpecs;
[self.store registerSoup:soupName withIndexSpecs:indexSpecs];
[self.store removeSoup:soupName];
self.syncDownId = 0;
[self refreshRemoteData];
[self refreshLocalData];
}

Hope it helps,

Phil
Sravani kuntamukkalaSravani kuntamukkala
This helped Phil, thanks 
Philip GuerreiroPhilip Guerreiro
if you want a Swift version of the SObject classes i've started a new github repo see the link below

https://github.com/GoliathDeveloper/SalesforceMobileSDK-SmartStore-iOS