Can't build for iOS after updating UnityAds (4.3.47.1) LevelPlay Mediation (8.3.0) - Undefined symbol: _OBJC_CLASS_$_UnityAds

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

1 Like

Can you use previous versions?

I had no issues with the next setup:

Luckily I still have the files from my previous build, so rolling it back works. However this latest setup does not:
image

However, this setup does work and builds on iOS without issue:
image

1 Like

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?

1 Like

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.

  1. Clear all ads related stuff.
  2. Restart Unity.
  3. Install the Ads Mediation package via Unity Package Manager.
  4. 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!

2 Likes
  1. You can manually set the version in Packages > manifest.json.
  2. You can install the target version of Ads Mediation package by name indicating the version in Unity Package Manager: UPM > + > Add package by name…

That seems to update only the version of the unity package, and the problem still persists.

Think I’m giving up and going back to UnityAds or AdMob mediation, hopefully one day they’ll make it work…

1 Like

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

Can’t think of anything else…

1 Like

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’

2 Likes

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.

5 Likes

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 :slight_smile:

2 Likes

Deleting this file also solved the issue for me!

1 Like