Firebase runTransactionBlock not working in swift 3
<p>After updating the Xcode 8 and convert the Swift 2 project into Swift 3, other codes work well, but <code>runTransactionBlock</code> is not working and found this error:</p>

<blockquote>
  <p>"runTransactionBlock: usage detected while persistence is enabled. Please be aware that transactions <em>will not</em> be persisted across app restarts"</p>
</blockquote>

<p>What could be wrong?</p>

<p>Firebase runTransaction Code</p>

<pre><code>postRef.runTransactionBlock({ (currentData: FIRMutableData) -&gt; FIRTransactionResult in
            if var post = currentData.value as? [String : AnyObject], let uid = FIRAuth.auth()?.currentUser?.uid {
                var stars : Dictionary&lt;String, Bool&gt;
                stars = post["likeMap"] as? [String : Bool] ?? [:]
                var likeCount = post["likeCount"] as? Int ?? 0
                if let _ = stars[uid] {
                    // Unstar the post and remove self from stars
                    likeCount -= 1
                    self._liked = false
                    stars.removeValue(forKey: uid)
                } else {
                    // Star the post and add self to stars
                    likeCount += 1
                    self._liked = true
                    stars[uid] = true
                }
                post["likeCount"] = likeCount as AnyObject?
                post["likeMap"] = stars as AnyObject?
                self._likeCount = likeCount
                // Set value and report transaction success
                currentData.value = post

                return FIRTransactionResult.success(withValue: currentData)
            }
            return FIRTransactionResult.success(withValue: currentData)
        }) { (error, committed, snapshot) in
            if let error = error {
                print(error.localizedDescription)
            }
        }
</code></pre>