7

Has anybody using Crashlytics been able to compile their iOS app for Mac Catalyst?

I tried building one of our iOS apps for Catalyst but I got the following error:

ld: in /Users/foo/bar/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics(CLSInternalReport.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '/Users/foo/bar/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics' for architecture x86_64

I've updated to the latest version of Crashlytics using Cocoapods. Since CL already works on macOS, I would think it might be possible to link to the correct x86 library with Catalyst.

bugloaf
  • 2,890
  • 3
  • 30
  • 49

2 Answers2

1

Previously Firebase Crashlytics was not supported by the Mac Catalyst. In the new version of Firebase Crashlytics (6.15.0), they have provided the support.

pushpank
  • 262
  • 3
  • 9
0

This is my current workaround. It does not let me use Crashlytics with Catalyst, but I can continue to create both Catalyst and iOS builds.

  1. Clone your usual build target.
  2. Enable Catalyst on the new target.
  3. Add a section to the Podfile for the new target.
  4. Include all required pods in the new target except Fabric and Crashlytics.
  5. pod install
  6. In the source code, conditionally build Crashlytics-dependent code using #if canImport(Crashlytics)
  7. Continue to build the iOS app from the old target. Use the new target for Catalyst builds.
bugloaf
  • 2,890
  • 3
  • 30
  • 49
  • Actually I duplicate build target. According to your first step. How to perform your step 2 to step 7. I do not Understand. I am facing same problems – Ankur Patel Nov 29 '19 at 10:50