简体   繁体   English

在没有 PODS 的 iOS 项目中集成 Firebase Crashlytics(测试版)SDK

[英]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中的说明:

  • The zip distribution requires Xcode 11 which supports xcframeworks zip 发行版需要支持 xcframeworks 的 Xcode 11
  • The zip distribution only supports iOS. zip 发行版仅支持 iOS。 tvOS is only distributed via CocoaPods tvOS 仅通过 CocoaPods 分发
  • All Firebase installations require the xcframeworks in the Analytics folder to also be installed.所有 Firebase 安装都需要同时安装 Analytics 文件夹中的 xcframeworks。

I am able to get firebasecrashlytic.framework files without cocopods using Carthage.我可以使用 Carthage 获得没有 cocopods 的 firebasecrashlytic.framework 文件。 I copied我复制了在此处输入图像描述 files to project and it works in iOS project.文件到项目,它在 iOS 项目中工作。 I am looking for a similar solution for tvOS我正在为 tvOS 寻找类似的解决方案

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.

相关问题 如何将Crashlytics集成到iOS框架项目中? - How to integrate Crashlytics into an iOS framework project? 在不使用Cocoa pod的情况下集成firebase SDK时出现框架(GoogleMobileVision / FirebaseMLCommon)问题 - Getting frameworks(GoogleMobileVision/FirebaseMLCommon) issue when integrate firebase SDK without using Cocoa pods Firebase Crashlytics 无法与 DJI iOS SDK 一起使用 - Firebase Crashlytics not working alongside DJI iOS SDK 在显示 iOS 14 测试版时崩溃<redacted>关于 Firebase crashlytics 中的去符号化</redacted> - Crashes on iOS 14 beta showing <redacted> on desymbolication in Firebase crashlytics iOS - 新 Firebase Crashlytics (4.0.0-beta.5) - dSYM 上传失败 - iOS - New Firebase Crashlytics (4.0.0-beta.5) - dSYM upload fails 如何为 Flutter 应用程序的 iOS 部分集成 Firebase Crashlytics? - How to integrate Firebase Crashlytics for iOS part of Flutter app? 将Box IOS SDK集成到我的ios项目中 - Integrate Box IOS sdk in my ios project 无法将没有可可豆荚的Google Analytics iOS SDK添加到我的项目中 - Can't add Google Analytics iOS SDK without cocoa pods to my project Xcode / IOS中的Crashlytics beta发行版 - Crashlytics beta distribution in Xcode / IOS Firebase Crashlytics 在 iOS 应用程序中升级 SDK 后未显示日志 - Firebase Crashlytics not showing Logs after SDK upgrade in iOS App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM