Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

555
Vistas
Firestore - Exception 'FIRInvalidArgumentException', reason: 'Unsupported type: _SwiftValue'

Terminating app due to uncaught exception 'FIRInvalidArgumentException', reason: 'Unsupported type: _SwiftValue'

I' trying to create or update document in Firestore and getting that error.

DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: {

         let docData: [String: Any] = [
              "firebase_buyer_id": "222", // todo - set buyer id correctly
              "firebase_seller_id": "String(describing: self!.ad.ownerId)",
              "reference_object": [        
                   "reference_object_id": "testing_id",
                   "last_updated_time": Timestamp(date: Date()),
                   "chat_item_list": [
                                    {
                                        [
                                            "chat_id": "12", // set chat id
                                            "owner_id": "222",
                                            "time_stamp": Timestamp(date: Date()),
                                            "message": "testing message - hi, message send successfully"
                                        ]
                                    }
                  ]
             ]
          ]

          self!.db.collection((self?.collectionName)!).document((self?.refId)!).setData(docData){ err in
                  if let err = err {
                        print("Error writing document: \(err)")
                  } else {
                        print("Document successfully written!")
                  }
           }
 })
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda