Firebase 应用包含一系列服务的初始化信息。
请勿直接调用此构造函数。请改用 initializeApp() 来创建应用。
签名:
interface App extends AppCore
扩展:AppCore
方法
方法 | 说明 |
---|---|
appCheck() 按钮。 | |
auth() | |
数据库(网址) | |
delete() | 使此本地 FirebaseApp 不可用,并释放所有关联服务的资源(尽管它 *不会* 清理任何后端资源)。在本地运行 SDK 时,必须调用此方法以确保正常终止进程。 |
firestore() | |
安装 | |
instanceId() | |
machineLearning() | |
messaging() | |
projectManagement() | |
remoteConfig() | |
securityRules() | |
storage() |
app.App.appCheck()
签名:
appCheck(): appCheck.AppCheck;
返回:
app.app.auth()
签名:
auth(): auth.Auth;
返回:
app.app.database()
签名:
database(url?: string): database.Database;
参数
参数 | 类型 | 说明 |
---|---|---|
网址 | string |
返回:
app.app.delete()
使此本地 FirebaseApp
不可用,并释放所有关联服务的资源(尽管它 *不会* 清理任何后端资源)。在本地运行 SDK 时,必须调用此方法以确保正常终止进程。
签名:
delete(): Promise<void>;
返回:
Promise<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;
返回:
app.App.instanceId()
请改用安装次数。
签名:
instanceId(): instanceId.InstanceId;
返回:
app.App.machineLearning()
签名:
machineLearning(): machineLearning.MachineLearning;
返回:
machineLearning.MachineLearning
app.App.messaging()
签名:
messaging(): messaging.Messaging;
返回:
app.App.projectManagement()
签名:
projectManagement(): projectManagement.ProjectManagement;
返回:
projectManagement.ProjectManagement
app.App.remoteConfig()
签名:
remoteConfig(): remoteConfig.RemoteConfig;
返回:
app.App.securityRules()
签名:
securityRules(): securityRules.SecurityRules;
返回:
app.App.storage()
签名:
storage(): storage.Storage;
返回: