[英]Integrate Firebase Crashlytics (beta) SDK in iOS project without PODS
I am integrating FrirebaseCrashlytics SDK in tvOS and iOS without cocopods.我在 tvOS 和 iOS 中集成 FrirebaseCrashlytics SDK 没有 cocopods。 I downloaded their xcFramework.
我下载了他们的 xcFramework。 But I can't use the xcFramework as the project is not compatible so I drag and drop ios-armv7_arm64 framework to project and added Firebase.h and module.modulemap (my project uses both objc and swift).
但是我不能使用 xcFramework,因为项目不兼容,所以我将 ios-armv7_arm64 框架拖放到项目中,并添加了 Firebase.h 和 module.modulemap(我的项目同时使用 objc 和 swift)。 Also, I specified the Firebase.h in the bridging header.
另外,我在桥接 header 中指定了 Firebase.h。 I get below error when I build.
构建时出现以下错误。
Showing Recent Errors Only仅显示最近的错误
/Users/xxxxx/Code/ios/tvOSApplications/App/App/Firebase.h:15:9: 'FirebaseCore/FirebaseCore.h' file not found /Users/xxxxx/Code/ios/tvOSApplications/App/App/Firebase.h:15:9: 'FirebaseCore/FirebaseCore.h' 文件未找到
Showing Recent Errors Only仅显示最近的错误
/Users/xxxxx/Code/ios/tvOSApplications/App/App/App-tvOS-Bridging-Header.h:27:9: Could not build module 'Firebase' /Users/xxxxx/Code/ios/tvOSApplications/App/App/App-tvOS-Bridging-Header.h:27:9:无法构建模块“Firebase”
Multiple problems to address (based on instructions in the README at the base of the distribution:需要解决的多个问题(基于发行版基础README中的说明:
Recently I had a similar requirement of supporting Firebase on both iOS and tvOS.最近我有一个类似的要求,即在 iOS 和 tvOS 上支持 Firebase。 As the frameworks are available only on iOS and not on tvOS.
由于这些框架仅在 iOS 上可用,而不在 tvOS 上可用。 I could not integrate Frameworks.
我无法集成框架。 So the solution I followed is adding of Source files provided in https://github.com/firebase/firebase-ios-sdk corresponding to the required modules that are needed for enabling Firebase Crashlytics.
所以我遵循的解决方案是添加https://github.com/firebase/firebase-ios-sdk中提供的源文件,这些文件对应于启用 Firebase Crashlytics 所需的模块。
This solution worked for me and able to see the crashes.该解决方案对我有用并且能够看到崩溃。 Let me know if you need more information
如果您需要更多信息,请与我们联系
I got Firebase Crashlytics working for tvOS without Cocoapods or XCFramework bundles.我得到了 Firebase Crashlytics 在没有 Cocoapods 或 XCFramework 捆绑包的情况下为 tvOS 工作。 Basically, you just need to bring over the source files, set the header search paths, and set all the required preprocessor macros.
基本上,您只需要带上源文件,设置 header 搜索路径,并设置所有必需的预处理器宏。 You can read the story here .
你可以在这里阅读这个故事。
Thanks for the hint Gangadhar!感谢Gangadhar的提示!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.