0

I am getting an issue where I cannot get my App to compile for Catalyst due to Firebase Analytics.

I am getting the following error:

FIRAnalyticsConnector(FIRAnalyticsConnector_03d6aa66122ddf8e6248126c55bd74f9.o), building for Mac Catalyst, but linking in object file built for iOS Simulator

I have tried many solutions posted online, and none have worked for me.

Does anyone know how I can go about fixing/how to modify my podfile correctly.

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target ‘AppName’ do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for AppName

  # add the Firebase pod for Google Analytics
  pod 'Firebase/Analytics'
  pod 'Firebase/Database'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'  
  # add pods for any other desired Firebase products
  # https://firebase.google.com/docs/ios/setup#available-pods
  pod 'lottie-ios'

  target 'AppNameTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'AppNameUITests' do
    # Pods for testing
  end

end
AndrewS
  • 351
  • 4
  • 18

2 Answers2

2

You need to add x86_64 and x86_64h to the valid architectures of all targets including the pods. Sorry for the short answer, but there isn't much to it.

Todd
  • 500
  • 4
  • 10
  • Just out of curiosity, how would you do that? Can you give some more specific instructions. – Phontaine Judd Aug 11 '21 at 06:31
  • It's the same as adding it for your iOS target. If you used CocoaPods, just go to the other project for Firebase in the XCWorkspace and then go through each target there and add the necessary targets. Does that clarify? – Todd Nov 01 '21 at 21:45
1

I ended up changing pod 'Firebase/Analytics' to pod 'FirebaseCore' & that resolved the issue

AndrewS
  • 351
  • 4
  • 18