Skip to content

Instantly share code, notes, and snippets.

@PaulCapestany
Last active February 18, 2016 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulCapestany/56555895cb507455bc28 to your computer and use it in GitHub Desktop.
Save PaulCapestany/56555895cb507455bc28 to your computer and use it in GitHub Desktop.
Unexpected `isDocumentPending`/CBL behaviour

Setup to reproduce

Follow these instructions in order to use Apple's "Network Link Conditioner" to test different connectivity qualities on both the simulator and on actual physical iOS devices.

In the ToDoLite-iOS project, change the kSyncGatewayUrl in AppDelegate.m if need be. Also, make sure that the FacebookAppID and URL Scheme in Info.plist is usable/accurate as well.

Expected behaviour

  1. When on a good wifi connection, newly added or edited items in any of the tableViews should have black text.
  2. When switching to the "Very Bad Network" setting in Apple's "Network Link Conditioner", newly added or edited items in any of the tableViews should have grey text if they haven't been successfully synced within 1.5 seconds (they should turn black again once the replication properly executes however).
  3. When putting the testing device in 'Airplane Mode', newly added or edited items in any of the tableViews should have grey text since they're unable to sync, and should turn black again when back on a network connection.

Actual behavior

  1. Works as expected.
  2. Works as expected.
  3. Unexpected behavior. The text of newly added or edited items stays black even though items have not synced due to being in 'Airplane Mode' (and therefore should be grey).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment