我手动安装了Firebase SDK我的iOS项目.按照README.md
我的指示,包括Analytics文件夹中的所有文件:
FirebaseAnalytics.framework
FirebaseInstanceID.framework
GoogleInterchangeUtilities.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
Run Code Online (Sandbox Code Playgroud)
我把"包括在内import FirebaseAnalytics"给了我AppDelegate.然后我打电话给:
FIRApp.configure()
Run Code Online (Sandbox Code Playgroud)
但是Xcode仍在告诉我这个:
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] Firebase Analytics is not available.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104178d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106761deb objc_exception_throw + 48
2 CoreFoundation 0x0000000104178cbd +[NSException raise:format:] + 205
3 helloworld 0x0000000103f17190 -[FIRApp configureCore] + 325
4 helloworld 0x0000000103f16bb1 +[FIRApp addAppToAppDictionary:] + 100
5 helloworld 0x0000000103f162e2 +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + …Run Code Online (Sandbox Code Playgroud) enum randomName: UInt32 {
case name1
case name2
case name3
case name4
case name5
case name6
case name7
case name8
}
Run Code Online (Sandbox Code Playgroud)
我想创建一个函数来从枚举中随机选择一个名字.我怎么做?