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.
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.
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 !