Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-745

Save fails when NSDate inserted with [CBLMutableDocument setData]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.8.0
    • 2.7.0
    • iOS
    • Security Level: Public
    • None
    • Jay 23
    • 5

    Description

      Describe the bug

      Fails to save CBLMutableDocument when NSDate is inserted with [CBLMutableDocument setData]

      To Reproduce

          CBLMutableDocument *mDoc = [CBLMutableDocument document];
          [mDoc setDate:[NSDate date] forKey:@"date"];
          XCTAssertTrue([self.db saveDocument:mDoc error:nil]);  // pass
       
          NSDictionary *dataDict = @{@"date" : [NSDate date]};
          mDoc = [CBLMutableDocument document];
          [mDoc setData:dataDict];
          XCTAssertTrue([self.db saveDocument:mDoc error:nil]); // fail, Fleece error 4.
      

      Expected behavior

      expected both saves to succeed

      Platform (please complete the following information):

          Device: iPhone XR & iPhone 8 Simulator
          OS: iOS 13
          Couchbase Version: CouchbaseLiteObjective-C 2.7.0
          Sync Gateway Version: NA
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Jayahari.Vavachan Jay Vavachan
              Jayahari.Vavachan Jay Vavachan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty