Search Unity

Question A couple issues with porting mediation to iOS.

Discussion in 'Unity Mediation' started by DaveKap, Nov 28, 2021.

  1. DaveKap

    DaveKap

    Joined:
    Mar 6, 2013
    Posts:
    94
    I've had mediation running fine on my Windows Unity editor for Android builds. However, I'm getting issues making it work on my Mac Unity editor for iOS builds.
    First of all, in the mediation section of project settings, none of the adapters are installed and clicking the install button for them does nothing. Secondly, when I try to compile my project in xcode, I get an error about unitymediationsdk.h not existing. Weirdly enough, it doesn't exist for my Android build on Windows but that works fine, so I'm not sure what's going wrong here.
     
  2. DaveKap

    DaveKap

    Joined:
    Mar 6, 2013
    Posts:
    94
    I need help on this immediately as I'm up against a deadline right now and would rather not have to abandon mediation entirely just to push my release.
    When building my project in XCode, a compilation error in UMSPUnityMediation.mm comes up as UnityMediationSdk/UnityMediationSdk.h is a file not found. This occurs after a fresh install of the 0.2.1-preview.2 version of Mediation. What could be causing this issue and how can I fix it?
     
  3. DaveKap

    DaveKap

    Joined:
    Mar 6, 2013
    Posts:
    94
    After going crazy debugging this thoroughly, I managed to figure out a few things thanks to the troubleshooting section of the documentation and some googles.
    First of all, the install button thing is a corruption of a file that needed deleting. Supposedly this corruption only happens when upgrading mediation from version .1 to .2 but I definitely never installed version .1 so... just assume that stuff's broken and check the troubleshooting page in the documentation if you notice the install buttons breaking.
    Secondly, I had to install my own version of cocoapods because the way Unity installed it doesn't hook it into the MacOS PATH correctly (at least it didn't for me.) After doing this, I needed to run "pod install" against the generated podfile in the build directory in order to get an .xcworkspace file generated, from which I am supposed to open xcode from now on and build from there.

    So, problem solved. Hopefully few others will have to pull their hair out as I have. :)
     
  4. jcGrenier

    jcGrenier

    Unity Technologies

    Joined:
    Feb 23, 2021
    Posts:
    145
    Glad to hear you managed to resolve the issue :D