Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions analytics/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,20 @@ target 'AnalyticsExampleTV' do
# Pods for testing
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "Pods-AnalyticsExample"
puts "Updating #{target.name} to include GoogleAdsOnDeviceConversion for iPhone only"
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig =~ /OTHER_LDFLAGS = (.+)/
other_ld_flags = "#{$1}"
xcconfig.sub!('-framework "GoogleAdsOnDeviceConversion"', '')
new_xcconfig = xcconfig + "OTHER_LDFLAGS[sdk=iphone*] = #{other_ld_flags}"
File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
end
end
end
end
2 changes: 1 addition & 1 deletion analytics/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ SPEC CHECKSUMS:
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47

PODFILE CHECKSUM: 226b4d62d9972e44620a8caea7219e8f54926256
PODFILE CHECKSUM: 6097b0ced448df423a1a885a6de5c1c6b63e4559

COCOAPODS: 1.16.2