Since upgrading to Unity Mediation from Unity ads, we’re seeing crashes that didn’t previously happen, related to the missing AppTrackingTransparency framework. We’re using the “iOS 14 Advertising support” package v1.2.0.
Previously the AppTrackingTransparency was only loaded on demand (weakly linked to the binary and loaded as needed) so worked fine on devices with iOS 12/13. Now it seems the UnityMediationSdk is strongly linking to AppTrackingTransparency framework, forcing it to load on start and crash devices with older versions of iOS.
Is there a workaround or does Unity Mediation not support older devices?
For anyone else encountering this - it does work, but you’ll need to enforce weak linking in post build script eg:
string projectPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject pbxProject = new PBXProject();
pbxProject.ReadFromFile(projectPath);
// Add in weak linking of AppTrackingTransparency.framework - this is essential for
// Support for older devices (pre iOS 14)
string targetGUID = pbxProject.GetUnityMainTargetGuid();
pbxProject.AddFrameworkToProject(targetGUID, "AppTrackingTransparency.framework", true);