• Kyle Roberts 1
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

As of iOS 8.3, the call [[SFRestAPI sharedInstance] requestForDescribeWithObjectType:] does not ever return. The app does not crash, freeze, or hang, just escapes out of that method. In the screenshot below, the first breakpoint is hit many times for each operation we have created yet the second breakpoint is never hit. In iOS 8.2 and below, it works as expected (hits both breakpoints).

https://www.evernote.com/shard/s302/sh/589ce78b-409b-4861-ba13-ab97068c0331/d8bdbb7747ec20adfb7211d179473a49

Logging in with Salesforce, logging out, and logging in as a different user passes errors when trying to query the Smartstore.

 

Error referring to the Smartstore SQL database in the file system:
Domain=com.salesforce.smartstore.error Code=999 "file is encrypted or is not a database" UserInfo=0x7b145db0 {NSLocalizedDescription=file is encrypted or is not a database}

Example simple query and store getter where it crashes:
NSArray *results = [self.store queryWithQuerySpec:query pageIndex:0 error:&error];
- (SFSmartStore *)store {
   if (_store == nil) {
      _store = [SFSmartStore sharedStoreWithName:kDefaultSmartStoreName];
      if (![_store soupExists:self.objectClassName]) {
         [_store registerSoup:self.objectClassName withIndexSpecs:self.indexSpecs];
         NSAssert([_store soupExists:self.objectClassName], @"Unable to register soup: %@", self.objectClassName);
      }
    }
   return _store;
}

Though the app does not always crash, it will hits exception breakpoints but can continue past them and this issue causes other problems and crashing down the road during sync and the rest of the app's session.

I have read that on logout, the SDK is supposed to clear the current user's Smartstore but there are still some directories and SQLite files left in the documents directory. We have tried manually removing the files, removing the entire contents of the documents directory, simply clearing the soups. Anyone have any experience with this issue or 999 error codes?

As of iOS 8.3, the call [[SFRestAPI sharedInstance] requestForDescribeWithObjectType:] does not ever return. The app does not crash, freeze, or hang, just escapes out of that method. In the screenshot below, the first breakpoint is hit many times for each operation we have created yet the second breakpoint is never hit. In iOS 8.2 and below, it works as expected (hits both breakpoints).

https://www.evernote.com/shard/s302/sh/589ce78b-409b-4861-ba13-ab97068c0331/d8bdbb7747ec20adfb7211d179473a49