fermoya/cocoapods-catalyst-support

Still getting error

Closed this issue · 6 comments

project/platforms/ios/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_c162b9f6e9dd193ef13757b8d7ebe6f7.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file 'project/platforms/ios/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture x86_64

Podfile:

target 'Project' do
        project 'platforms/ios/Project.xcodeproj'
        pod 'Firebase/Messaging'
        pod 'Firebase/Functions'
        pod 'Firebase/Crashlytics'
        pod 'Firebase/Analytics'
end

# Configure your macCatalyst dependencies
catalyst_configuration do
	# Uncomment the next line for a verbose output
	#verbose!
        ios 'Firebase/Messaging'
        ios 'Firebase/Functions'
        ios 'Firebase/Crashlytics'
        ios 'Firebase/Analytics'
	# ios '<pod_name>' # This dependency will only be available for iOS
	# macos '<pod_name>' # This dependency will only be available for macOS
end

# Configure your macCatalyst App
post_install do |installer|
	installer.configure_catalyst
end

It's building fine for iOS but still getting the same error with this configuration, any ideas?

@BRadHoc have you opened any other issue? Can you reference it here please?

I haven't got another issue. I meant "still" as in it wouldn't build before without catalyst-support and it still won't build with this currently.

bdaz commented

Having the same issue. Curiously it doesn't seem to work with "Firebase/Analytics" specifically -- "Nothing to uninstall"

@BRadHoc please, from now on use the issue templates available. This issue is missing information required to properly analyse it.

Could any of you @bdaz or @BRadHoc please let me know you Xcode and Cocoapods version? Mine is 12.4 and 1.10.1.

I'm using the same dependencies as in the description ☝️ in my Sample project in this repo (please follow the link) and it seems to compile fine.

Could you please:

  1. Download the project in this specific branch.
  2. Try to compile for Mac
  3. run pod catalyst in your project folder
  4. Try and compile again

And let me know if steps 2 or 4 fail?

bdaz commented

@fermoya Xcode version is 12.5. Cocoapods version is 1.10.1.

I did what you asked. Step 2 and 4 both work—however, I did manage to reproduce the error in the Sample using that branch—it simply involved a local pod that depends on 'Firebase/Analytics'. You can see the setup here: https://github.com/bdaz/cocoapods-catalyst-support/tree/issue-26-bdaz-modified

Note that I removed all other dependencies in the sample except Firebase/Analytics -- they are not necessary to demonstrate the issue.

@bdaz I think your Podfile in your example is wrong. By saying this:

target 'Sample' do
  pod 'Firebase/Analytics'
  pod 'TFBase', :path => 'Libraries/TFBase'

You're defining a Sample target that depends on Firebase/Analytics and TFBase. To add Firebase/Analytics as a dependency of TFBase you need to say so:

target 'TFBase' do
  pod 'Firebase/Analytics'

Or

abstract_target 'App' do
  pod 'Firebase/Analytics # shared by all targets declared in here
  target 'Sample'
  target 'TFBase' do
    # install more pods only for TFBase

See more info here