gpt4 book ai didi

ios - FIRInstallations使Firebase iOS SDK崩溃validateAppOptions:appName

转载 作者:行者123 更新时间:2023-12-01 19:35:08 27 4
gpt4 key购买 nike

我正在使用Firebase在Flutter上开发iOS应用,

我的pubsec.yaml文件有

  firebase_core: 0.4.3+3
firebase_auth: ^0.14.0+5
firebase_database: ^3.1.1

以下是我得到的错误,
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c710bc +[NSException raise:format:] + 188
3 Runner 0x0000000106000e9f +[FIRInstallations validateAppOptions:appName:] + 799
4 Runner 0x00000001060009eb -[FIRInstallations initWithAppOptions:appName:installationsIDController:prefe<…>

最佳答案

您也应该在iOS的FirebaseOptions中添加apiKey值,它对我有用!

FirebaseApp.configure(
name: 'name',
options: Platform.isIOS
? const FirebaseOptions(
googleAppID: '1:xxxx',
gcmSenderID: 'xxxx',
databaseURL: 'https://xxxx.firebaseio.com',
apiKey:'xxx',
)
: const FirebaseOptions(
googleAppID: '1:xxx',
apiKey: 'xxx',
databaseURL: 'https://xx.firebaseio.com',
)
);

关于ios - FIRInstallations使Firebase iOS SDK崩溃validateAppOptions:appName,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60466573/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com