Following the instructions to Disable Ad Id usage on iOS, I placed line $NSFirebaseAnalyticsWithoutAdIdSupport = true at the top of my App_Resources/iOS/Podfile.
However, when I then clean and build the project, I see this logged, which indicates that Ad ID support was not disabled:
Installing pods...
Using default Firebase/Analytics with Ad Ids. May require App Tracking Transparency. Not allowed for Kids apps.
You may set variable `$NSFirebaseAnalyticsWithoutAdIdSupport=true` in Podfile to use analytics without ad ids.
When I look in the generated platforms/ios/Podfile, I see that my project podfile with the $NSFirebaseAnalyticsWithoutAdIdSupport = true line appears last, after the firebase-analytics section of the podfile. Therefore, the check if defined?($NSFirebaseAnalyticsWithoutAdIdSupport) does not find my variable. Ad ID support is always included.
Is there something that I should be doing differently? 🙏
$NSFirebaseAnalyticsWithoutAdIdSupport = true
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
end
end
Following the instructions to Disable Ad Id usage on iOS, I placed line
$NSFirebaseAnalyticsWithoutAdIdSupport = true
at the top of myApp_Resources/iOS/Podfile
.However, when I then clean and build the project, I see this logged, which indicates that Ad ID support was not disabled:
When I look in the generated
platforms/ios/Podfile
, I see that my project podfile with the$NSFirebaseAnalyticsWithoutAdIdSupport = true
line appears last, after the firebase-analytics section of the podfile. Therefore, the checkif defined?($NSFirebaseAnalyticsWithoutAdIdSupport)
does not find my variable. Ad ID support is always included.Is there something that I should be doing differently? 🙏
System Info
ns cli
8.7.0
cocoapods1.15.2
Xcode15.0.0
My project's
App_Resources/iOS/Podfile
build.output.txt