fermoya/cocoapods-catalyst-support

[BUG] Firebase/AnalyticsWithoutAdIdSupport not being removed from catalyst build

Opened this issue · 0 comments

Hi there!

I've been trying to use cocoapods-catalyst-support to remove Firebase/AnalyticsWithoutAdIdSupport from my Catalyst build with no success.

This is a subspec of the Firebase/Analytics pod designed to ensure that the AdSupport framework is not included in your app so no issues related to ad tracking could pop up during app review (https://firebase.google.com/docs/analytics/configure-data-collection?platform=ios#disable-IDFA-collection).

It seems that cocoapods-catalyst-support is not recognizing based on the pod name that it needs to remove the FirebaseAnalytics framework (you can see it's not being flagged on the verbose debug below). I've tried changing the line on the catalyst_configuration block to just ios 'Firebase/Analytics' but it also didn't work.

At first sight this seems to be related to a question made before the ruby script evolved into this more capable tool (https://gist.github.com/fermoya/f9be855ad040d5545ae3cb254ed201e4?permalink_comment_id=3338103#gistcomment-3338103), but I'm not sure.

Is there any way to indicate the Framework that should be removed to cocoapods-catalyst-support instead of the pod name? Or is there any other possible workaround for this situation?

Thanks in advance!

Relevant part of the verbose debug showing that FirebaseAnalytics is not being flagged

❯ pod catalyst run
Analyzing dependencies
Downloading dependencies
Generating Pods project

#### Configuring macos dependencies ####

#### Unsupported Libraries ####
["FirebaseAnalyticsWithoutAdIdSupport"]

#### Unsupported dependencies ####
[]

#### Frameworks not to be included in the Archive ####
[]

#### Resources not to be included in the Archive ####
[]

#### Flagging unsupported libraries ####
	Target: AcknowList
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: AcknowList-AcknowListBundle
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: BoringSSL-GRPC
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: CodableFirebase
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: CombineFirebase
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: CombineFirebaseFirestore
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: DeepDiff-iOS
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: Eureka
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: Firebase
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: FirebaseABTesting
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag
	Target: FirebaseAnalytics
		Scheme: Release
			Nothing to flag
		Scheme: Debug
			Nothing to flag

Podfile

require 'cocoapods-catalyst-support'

platform :ios, '14.0'
use_frameworks!
# inhibit_all_warnings!

target 'project' do
  pod 'Firebase/AnalyticsWithoutAdIdSupport', '~> 7.11.0'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Database'
  pod 'Firebase/Functions'
  pod 'Firebase/Messaging'
  pod 'Firebase/RemoteConfig'
  pod 'Firebase/Storage'
  pod 'FirebaseFirestoreSwift', '~> 7.11.0-beta'
  pod 'CombineFirebase/Firestore'
  pod 'CodableFirebase'
  pod 'DeepDiff'
  pod 'Eureka'
  pod 'ViewRow'
  pod 'SplitRow'
  pod 'Swinject', '~> 2.6.2'
  pod 'SwinjectStoryboard'
  pod 'SwinjectAutoregistration', '~> 2.6.0'
  pod 'Toast-Swift'
  pod 'AcknowList'
  pod 'QRCodeReader.swift'
  pod 'NVActivityIndicatorView/AppExtension'
end

target 'project-extension' do
  pod 'Firebase/AnalyticsWithoutAdIdSupport', '~> 7.11.0'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Database'
  pod 'Firebase/Functions'
  pod 'Firebase/Messaging'
  pod 'Firebase/RemoteConfig'
  pod 'Firebase/Storage'
  pod 'FirebaseFirestoreSwift', '~> 7.11.0-beta'
  pod 'CodableFirebase'
  pod 'CombineFirebase/Firestore'
end

# Configure your macCatalyst dependencies
catalyst_configuration do
	# Uncomment the next line for a verbose output
	verbose!

	ios 'Firebase/AnalyticsWithoutAdIdSupport' # 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