app.App interface

Firebase 應用程式會保留一組服務的初始化資訊。

請勿直接呼叫此建構函式。請改用 initializeApp() 建立應用程式。

簽名:

interface App extends AppCore 

擴充:AppCore

方法

方式 說明
appCheck()
auth()
資料庫(網址)
delete() 轉譯這個本機 FirebaseApp 無法使用,並釋放所有相關聯服務的資源 (但並「不會」清除任何後端資源)。在本機執行 SDK 時,必須呼叫此方法,以確保程序可順利終止。
firestore()
installations()
instanceId()
machineLearning()
messaging()
projectManagement()
remoteConfig()
securityRules()
storage()

app.App.appCheck()

簽名:

appCheck(): appCheck.AppCheck;

傳回:

appCheck.AppCheck

app.App.auth()

簽名:

auth(): auth.Auth;

傳回:

auth.Auth

app.App.database()

簽名:

database(url?: string): database.Database;

參數

參數 類型 說明
網址 字串

傳回:

database.Database

app.App.delete()

轉譯這個本機 FirebaseApp 無法使用,並釋放所有相關聯服務的資源 (但並「不會」清除任何後端資源)。在本機執行 SDK 時,必須呼叫此方法,以確保程序可順利終止。

簽名:

delete(): Promise<void>;

傳回:

承諾<void>

範例

app.delete()
  .then(function() {
    console.log("App deleted successfully");
  })
  .catch(function(error) {
    console.log("Error deleting app:", error);
  });

app.App.firestore()

簽名:

firestore(): firestore.Firestore;

傳回:

Firestore

app.App.installations()

簽名:

installations(): installations.Installations;

傳回:

installations.Installations

app.App.instanceId()

請改用「安裝」

簽名:

instanceId(): instanceId.InstanceId;

傳回:

instanceId.InstanceId

app.App.machineLearning()

簽名:

machineLearning(): machineLearning.MachineLearning;

傳回:

machineLearning.MachineLearning

app.App.messaging()

簽名:

messaging(): messaging.Messaging;

傳回:

Messagingsaging.Messaging

app.App.projectManagement()

簽名:

projectManagement(): projectManagement.ProjectManagement;

傳回:

projectManagement.ProjectManagement

app.App.remoteConfig()

簽名:

remoteConfig(): remoteConfig.RemoteConfig;

傳回:

remoteConfig.RemoteConfig

app.App.securityRules()

簽名:

securityRules(): securityRules.SecurityRules;

傳回:

securityRules.SecurityRules

app.App.storage()

簽名:

storage(): storage.Storage;

傳回:

storage.Storage