Firestore Plugin

This plugin allows you connect with firebase firestore (please use corona 2019.3497+)

Platforms: iOS and Android

Functions:

firestore.init(projectId, apiKey, applicationId)

-- setup firebase( on android you need to add this projectId,applicationId, and apiKey)

projectId, apiKey, applicationId(string) you find is data in your google-services.json. projectId = "project_id" keys value, apiKey = "current_key" keys value , applicationId = "mobilesdk_app_id" keys value

firestore.setData(collection, document, data, listener)

collection(string) path to collection

document(string) document name to set data

data(table) table of what to set the data as

listener(function) returns event.isError and event.error if isError == true

firestore.updateData(collection, document, data, listener)

collection(string) path to collection

document(string) document name to update data

data(table) table of what to update the data as

listener(function) returns event.isError and event.error if isError == true

firestore.readDataInDocument(collection,document, listener)

collection(string) path to collection

document(string) document name to read data

listener(function) returns event.isError and event.error if isError == true and returns event.data if isError == false

firestore.readDataInCollection(collection, listener, field, isDescending, limitedTo, quereyType, quereyNumber)

collection(string) path to collection

listener(function) returns event.isError and event.error if isError == true and returns event.data if isError == false

field(string)(optional) sorts data by field

isDescending(boolean)(optional) set desending with boolean

limitedTo(number)(optional) limit results by a number

quereyType(string)(optional) querey types are "=", ">", "<", "<=", and ">="

quereyNumber(number)(optional) querey number for quereyType

firestore.deleteData(collection, listener, field, isDescending)

collection(string) path to collection

listener(function) returns event.isError and event.error if isError == true and returns event.data if isError == false

field(string)(optional) sorts data by field

isDescending(boolean)(optional) set desending with boolean

firestore.checkRealtime(collection, document, listener)

-- listener will fire everytime a selected document is updated

collection(string) path to collection

document(string) document name to listen for data

listener(function) returns event.isError and event.error if isError == true and returns event.data if isError == false

firestore.stopRealtime()

-- stops checking real time for new data

Build Settings:

-- make sure you add firebase setting to plugin (google-services.json and GoogleService-Info.plist)

Helpful Links:

Get Plugin

Example

Support