I’ve had no problems building for iOS until I recently updating LevelPlay Mediation to 8.3 and UnityAds to 4.3.47.1
When I try to build in Xcode I get the following error:
Undefined symbols for architecture arm64:
"OBJC_CLASS$_UnityAds", referenced from:
in UnityMediationUnityAdapter[arm64][6](UMSUnityAdsAdapterFactory.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After digging around, I found this: Installing the Unity Ads SDK for iOS
Which has some steps I’ve never had to do previously of editing the Podfile and adding UnityAds. I’ve done this and tried building again, but I get the same build error.
I did a pod update, and a pod install. Everything updated and completed without issues.
Please advise
Hello! I’m still having this issue. It doesn’t matter if I uninstall Unity Ads, or use Ads Mediation, I still get the error. I’ve tried uninstalling cocoa pods, and reinstalling. I’ve also tried going to a different version of cocoa pods. I’ve tried going to a different version of unity ads. every time I get the error: Undefined symbol: OBJC_CLASS$_UnityAds… does anyone know of anything that this could be?
The newest approach is to use only Ads Mediation package that can be installed from Unity Package Manager.
This package is all you need. It will NOT be located in the Assets folder.
So, if you installed the LevelPlay it via importing the Unity Package which you downloaded from ironSource website, and you see it in the Assets folder, you must delete it, because it will be duplicating the stuff, and other issues.
Clear all ads related stuff.
Restart Unity.
Install the Ads Mediation package via Unity Package Manager.
Go to Unity Menu > Ads Mediation > Network Manager and update dependencies from here.
Any suggestion for someone like me who just installed LevelPlay 8.3.0 and has no backup to restore? Is there a way to install an older version?
BTW This sucks, every time there’s an update related to Unity or Ads you gotta cross your fingers!
Managed to revert all versions and related libraries to 8.2.0, but problem persists.
Pod file looks like this:
source 'https://cdn.cocoapods.org/'
source 'https://github.com/CocoaPods/Specs'
platform :ios, '13.0'
target 'UnityFramework' do
pod 'Firebase/Analytics', '11.0.0'
pod 'Firebase/Core', '11.0.0'
pod 'IronSourceAdMobAdapter', '4.3.56.0'
pod 'IronSourceSDK', '8.2.0.0'
pod 'IronSourceUnityAdsAdapter', '4.3.42.0'
pod 'Protobuf'
pod 'UnityMediationSdk', '~> 1.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
pod 'UnityMediationUnityAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static
A bit confusing due to the naming conventions, but if you’re going to be using “Levelplay Mediation” aka “Ads Mediation” from UPM, then you don’t need to pull in anything from “Unity Mediation” if that makes sense (this product is no longer supported). Try removing these and install again:
pod ‘UnityMediationSdk’
pod ‘UnityMediationUnityAdapter’
I will give it a go, but for the record all I did was importing the “Ads Mediation” package in the Unity project, and follow the guide to setup the AD Networks.
The POD file is automatically generated when building for iOS…
EDIT:
I think I found the reason for those Pods to be included. I found and deleted the file at path: \Assets\Editor\MediationAdapterDependencies.xml
Honestly I can’t remember in what stage this file was generated, and hopefully it won’t come back automatically. I will try rebuilding the App without this file.
I can confirm, after updating to the latest version of everything and removing this file from my editor folder, everything now builds and works correctly