Having problems building for iOS

I had Unity mediation working fine but you forced me to use LevelPlay. Now I'm getting errors when I build on my Mac. How should I fix this? For the record, everything is working fine on Android, so I know my code isn't the issue, it's the Mac setup. Here's the error coming out of Unity:
```
iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.

pod install output:

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "IronSourceSDK":
In Podfile:
IronSourceSDK (= 7.2.5.1)

IronSourceUnityAdsAdapter (= 4.3.31.2) was resolved to 4.3.31.2, which depends on
IronSourceSDK (= 7.5.0.0)

pod repo update output:

Updating spec repo cocoapods
Updating spec repo unity-technologies-unity-mediation-cocoapods-prod
```
I've tried going in and changing the podfile's version of IronSourceSDK to 7.5.0.0 but after doing so, the xcworkspace generated from "pod install" does not have all the proper targets and frameworks, leading to other errors.

Here's what the Podfile looks like when generated by Unity:
```
source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '12.0'

target 'UnityFramework' do
pod 'IronSourceSDK', '7.2.5.1'
pod 'IronSourceUnityAdsAdapter', '4.3.31.2'
end

If I change the version to 7.5.0.0 I get the following output from "pod install"

Analyzing dependencies
Downloading dependencies
Installing IronSourceSDK (7.5.0.0)
Installing IronSourceUnityAdsAdapter (4.3.31.2)
Installing UnityAds (4.8.0)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use Unity-iPhone.xcworkspace for this project from now on.
Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.

[!] The Podfile contains framework or static library targets (UnityFramework), for which the Podfile does not contain host targets (targets which embed the framework).
If this project is for doing framework development, you can ignore this message. Otherwise, add a target to the Podfile that embeds these frameworks to make this message go away (e.g. a test target).

And finally, if I try to build with the xcworkspace generated from this, I get the following error:

/Libraries/IronSource/Plugins/iOS/iOSBridge.m:111:17 No known class method for selector 'setMediationSegment:'
```
I've tried reinstalling and updating ruby and cocoapods multiple times, multiple ways, to no avail. Is there some way to fix the podfile generator? I get the feeling that's what's broken here. Is this even supposed to be IronSource anymore? Isn't it supposed to be LevelPlay? Thanks for any and all help!

Edit: I rolled back to my last version that had Unity Mediation and looked at the Podfile and it looks a lot bigger than what Unity is generating for LevelPlay so there's definitely something broken here that needs fixing at the Unity Podfile generation level. Unfortunately, I have no idea how Unity generates the Podfile.

Edit 2: Rolling forward to my current version somehow solved all of this. I have no idea how or why that would be the case but I guess there was just some jank-ass file hiding away from my repo shenanigans that finally got overwritten by a re-checkout. Hopefully this solves some other folks issues as they hit this stuff upgrading to meet Unity's new LevelPlay demands.

Hey @DaveKap ,

Thank you for not giving up and providing your solution, we appreciate it.

Since the current distribution format of Levelplay is .unitypackage, it could be some Dependencies.xml files were still around in your project, resulting in incompatible combinations of dependencies. This could not happen (generally) on Unity Mediation since the Dependencies.xml file was only one generated file (in one exact location) vs many downloaded ones.

Android is more forgiving due to how gradle (and sometimes EDM4U) resolves conflicts. On the other hand, cocoapods is very strict, as you can see.

Regarding seeing ironSource vs LevelPlay, I understand it can be confusing. The references to ironSource you see is the ironSource SDK, which is both LevelPlay and ironSource ads compiled together, so the API and SDK itself references ironSource instead of LevelPlay. But you have the correct setup, no worries about that.

Let us know if you need any further help,

Thank you.


This LevelPlay vs ironSource issue is incomprehensible.
Is this really the best that Unity can do?