Skip to content

Commit 86d7d4e

Browse files
authored
Fix Catalyst build due to GoogleAdsOnDeviceConversion iOS-only support (#1722)
1 parent 16e63d5 commit 86d7d4e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

analytics/Podfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,20 @@ target 'AnalyticsExampleTV' do
3838
# Pods for testing
3939
end
4040
end
41+
42+
post_install do |installer|
43+
installer.pods_project.targets.each do |target|
44+
if target.name == "Pods-AnalyticsExample"
45+
puts "Updating #{target.name} to include GoogleAdsOnDeviceConversion for iPhone only"
46+
target.build_configurations.each do |config|
47+
xcconfig_path = config.base_configuration_reference.real_path
48+
xcconfig = File.read(xcconfig_path)
49+
xcconfig =~ /OTHER_LDFLAGS = (.+)/
50+
other_ld_flags = "#{$1}"
51+
xcconfig.sub!('-framework "GoogleAdsOnDeviceConversion"', '')
52+
new_xcconfig = xcconfig + "OTHER_LDFLAGS[sdk=iphone*] = #{other_ld_flags}"
53+
File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
54+
end
55+
end
56+
end
57+
end

analytics/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@ SPEC CHECKSUMS:
114114
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
115115
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
116116

117-
PODFILE CHECKSUM: 226b4d62d9972e44620a8caea7219e8f54926256
117+
PODFILE CHECKSUM: 6097b0ced448df423a1a885a6de5c1c6b63e4559
118118

119119
COCOAPODS: 1.16.2

0 commit comments

Comments
 (0)