Uploaded image for project: 'Realm Cocoa SDK'
  1. Realm Cocoa SDK
  2. RCOCOA-203

Ensure RLMSupport.swift's SequenceType additions iterate over an RLMResults snapshot

      A user reported that using Realm Objective-C from Swift doesn't iterate over a frozen TableView when SequenceType-enumerating an RLMResults:

      let realm = RLMRealm.defaultRealm()
      let allItems = uncheckedItemsNoUpdate()
      
      try! realm.transactionWithBlock({
        for itemObj in allItems {
          if let item = itemObj as? GroceryListItem {
            item.deleted = true
            item.syncStatus = SyncStatusNeedsUpdate
          }
        }
      })
      

      We should investigate if this is truly what's happening here, and if so mark this as a bug and fix this.

      I was under the impression that NSFastGenerator on a collection with a custom enumerator would use the custom enumerator (where the TableView copy is done), but that wouldn't appear to be the case based on this report.

            Assignee:
            diana.perez@mongodb.com Diana Maria Perez Afanador (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: