Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Crash when mediation starts on iOS

Discussion in 'Unity Mediation' started by Kristina_B, Sep 5, 2022.

  1. Kristina_B


    Mar 28, 2019
    I integrated Unity mediation into my project and had to do the trick with excluding arm64 architecture in the Debug target to get a successful build (to fix the issue "UnityMediationSdk(UMSBannerAdView.o), building for iOS, but linking in object file built for iOS Simulator, for architecture arm64").

    Now after the app is installed on the device and after it successfully starts, I initialize Unity mediation in the 2nd scene and it crashes, here's the log from Xcode

    Please help.
    This happens only on iOS build, Android works well.
  2. shawnh_unity


    Unity Technologies

    Aug 2, 2019
    Hey Kristina,

    This may be an issue with the version of cocoapods that you have installed. The method that is being reported as an unrecognized selector is from a category method on iOS. We have seen some issues with the exported iOS projects from the Unity editor not including a required flag for ObjC code and if this flag is not included then ObjC Categories cannot be found. I believe you will want to install cocoapods version 1.11.0 or higher to hopefully solve this issue. Installing a higher cocoapods version may also solve the arm64 issue for you.

    Cocoapods Versions

    For the sake of information gathering what version of cocoapods are you using and what version of XCode are you using?
  3. Kristina_B


    Mar 28, 2019
    I think I didn't have any pods installed, because when I tried pod --version in the Terminal it said that it's an unknown command. So I installed Homebrew and then Pods 1.11.3 and I still got that first error
    but after I excluded the iOS Simulator arm64 target as before the build was successful AND didn't crash on the device!

    However, the first time I tried testing ads, I got
    but it's a new error, not related to the topic. And when I restarted the app and tested ads again, it worked!

    So I think we can consider this issue resolved, thank you so much for the help @shawnh_unity !

    Regarding the versions,
    Xcode 13.4.1
    Pods 1.11.3
    DeclanMcPartlin likes this.