title: Remove value from array when app terminates Swift Firebase
body: <p>I have a Firestore Array that has typing users (as IDs) in it. My goal is to remove the current User from that chat when the app terminates. I have read this <a href="https://stackoverflow.com/questions/43514650/firebase-how-to-clear-specific-data-from-firebase-when-user-kill-app">thread</a> where Frank van Puffelen said that you can remove values on disconnect by using this code:</p>
  <pre><code>ref.child(&quot;Clients&quot;).child(user.uid).child(&quot;current_venue&quot;).onDisconnectRemoveValue()
  </code></pre>
  <p>My problem is that this code is only able to remove a child document from the database and not an array. Is there any way to call <code>onDisconnectRemoveValue()</code> for a Firestore Array? Or is there any alternative for this case?</p>
  <p><em>This is what my database structure looks like: Collection(Chats) -&gt; Document(<em>ChatID</em>) -&gt; Array(typingUsers)</em></p>