title: To how convert protobuf object to ByteArray and the encode with Base64 URL_SAFE in Swift?
body: <p>In Android, I could convert an object to ByteArray and then encode it to Base64 (URL_SAFE) as per code below</p>
  
  <pre><code>    val myByteArrayObject = protobufObject.toByteArray()
      val meEncodedObject = android.util.Base64.encodeToString.encodeToString(
            myByteArrayObject, android.util.Base64.DEFAULT).trim()
  </code></pre>
  
  <p>How could I achieve that in Swift?</p>