After a quick go at trying to reproduce your issue, I was quickly able to reproduce your issue. The most possible reason that this is occurring is because your target in Xcode doesn’t have the ‘-ObjC’ flag in the ‘Other Linker Flags’ section. In most cases that would be the UnityFramework target, and by default it should be there.
My question to you is, are you changing the xcodeproj file via script post build by any chance? Or is there any way you know of that would be changing the values of ‘Other Linker Flags’ ?
Thanks! Indeed UnityFramework is missing the -ObjC flag.
Unfortunately, I can’t find why this flag is missing from our iOS builds.
From my attempts to understand what is going, this isn’t related to .pbxproj modifications. This flag should come from .xcconfig file created by CocoaPods. At least this how works when I create a new empty Unity project and add Mediation package to it.
Thanks for providing further insight into this. Generally it is Cocoapods that includes that flag into UnityFrameworks, right. Which version of Cocoapods are you using? If possible, let us know if you find out what is causing this scenario in your project if you get to the bottom of it, I’ll let you know if we are able to reproduce. Also, if you could share the Podfile of the generated Xcode project, that could help pinpoint the issue.
The issue went away after adding an AppLovin adapter, as its podspec includes -ObjC definition.
Maybe the same should be done with a podspec for Unity Mediation SDK?
This is a known issue on certain Cocoapod versions, for example versions below 1.10.1. If you in fact do have such an older version, let us know if upgrading your Cocoapods version fixes the issue.
2023-10-14 14:40:12.810219+0530 CricketGangsta[1125:316661] UnityIAP UnityEarlyTransactionObserver: Created 2023-10-14 14:40:12.811338+0530 CricketGangsta[1125:316661] UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events 2023-10-14 14:40:12.856890+0530 CricketGangsta[1125:316661] FCM: Loading UIApplication FIRFCM category 2023-10-14 14:40:13.135542+0530 CricketGangsta[1125:316661] Loading UIApplication category for Firebase App 2023-10-14 14:40:13.443399+0530 CricketGangsta[1125:316897] 9.3.0 - [FirebaseCore][I-COR000005] No app has been configured yet. CrashReporter: initialized 2023-10-14 14:40:13.913310+0530 CricketGangsta[1125:316661] Built from ‘2021.3/staging’ branch, Version ‘2021.3.8f1 (b30333d56e81)’, Build type ‘Release’, Scripting Backend ‘il2cpp’ 2023-10-14 14:40:13.914539+0530 CricketGangsta[1125:316661] MemoryManager: Using ‘Default’ Allocator. [UnityMemory] Configuration Parameters - Can be set up in boot.config “memorysetup-bucket-allocator-granularity=16” “memorysetup-bucket-allocator-bucket-count=8” “memorysetup-bucket-allocator-block-size=4194304” “memorysetup-bucket-allocator-block-count=1” “memorysetup-main-allocator-block-size=16777216” “memorysetup-thread-allocator-block-size=16777216” “memorysetup-gfx-main-allocator-block-size=16777216” “memorysetup-gfx-thread-allocator-block-size=16777216” “memorysetup-cache-allocator-block-size=4194304” “memorysetup-typetree-allocator-block-size=2097152” “memorysetup-profiler-bucket-allocator-granularity=16” “memorysetup-profiler-bucket-allocator-bucket-count=8” “memorysetup-profiler-bucket-allocator-block-size=4194304” “memorysetup-profiler-bucket-allocator-block-count=1” “memorysetup-profiler-allocator-block-size=16777216” “memorysetup-profiler-editor-allocator-block-size=1048576” “memorysetup-temp-allocator-size-main=4194304” “memorysetup-job-temp-allocator-block-size=2097152” “memorysetup-job-temp-allocator-block-size-background=1048576” “memorysetup-job-temp-allocator-reduction-small-platforms=262144” “memorysetup-temp-allocator-size-background-worker=32768” “memorysetup-temp-allocator-size-job-worker=262144” “memorysetup-temp-allocator-size-preload-manager=262144” “memorysetup-temp-allocator-size-nav-mesh-worker=65536” “memorysetup-temp-allocator-size-audio-worker=65536” “memorysetup-temp-allocator-size-cloud-worker=32768” “memorysetup-temp-allocator-size-gfx=262144” 2023-10-14 14:40:13.945597+0530 CricketGangsta[1125:316661] Setting up iOS 10 message delegate. → applicationDidFinishLaunching() Setting UIViewControllerBasedStatusBarAppearance to NO is no longer supported. Apple actively discourages that, and all application-wide methods of changing status bar appearance are deprecated 2023-10-14 14:40:14.753015+0530 CricketGangsta[1125:316661] UnityIAP UnityEarlyTransactionObserver: Added to the payment queue 2023-10-14 14:40:14.916319+0530 CricketGangsta[1125:316661] got didFinishLaunching = (null) 2023-10-14 14:40:14.963088+0530 CricketGangsta[1125:316918] [AppsFlyerSDK] [com.apple.main-thread] AppsFlyer SDK version 6.9.1 started build (92) 2023-10-14 14:40:14.963744+0530 CricketGangsta[1125:316957] [AppsFlyerSDK] [com.apple.main-thread] Keychain items migration status: 0 → applicationDidBecomeActive() 2023-10-14 14:40:14.984546+0530 CricketGangsta[1125:316661] got didBecomeActive(out) = (null) [Subsystems] Discovering subsystems at path /private/var/containers/Bundle/Application/89DF57FB-EEB5-41BF-A695-BA79DF718356/CricketGangsta.app/Data/UnitySubsystems GfxDevice: creating device client; threaded=1; jobified=0 Initializing Metal device caps: Apple A8X GPU Initialize engine version: 2021.3.8f1 (b30333d56e81) The referenced script on this Behaviour (Game Object ‘’) is missing! The referenced script on this Behaviour (Game Object ‘’) is missing! The referenced script on this Behaviour (Game Object ‘’) is missing! The referenced script on this Behaviour (Game Object ‘’) is missing! The referenced script on this Behaviour (Game Object ‘’) is missing! CrashReporter: No pending report exists at /var/mobile/Containers/Data/Application/8AF778B4-FBE0-4301-8D45-C00710153C70/Library/Caches/CrashReports/crash-pending.plcrash 2023-10-14 14:40:16.400759+0530 CricketGangsta[1125:316961] fopen failed for data file: errno = 2 (No such file or directory) 2023-10-14 14:40:16.400949+0530 CricketGangsta[1125:316961] Errors found! Invalidating cache… The referenced script on this Behaviour (Game Object ‘Main Camera’) is missing! UnloadTime: 1.569709 ms This example uses Unity Engine OLD input system. If you are using new Input System and you want to use this example, please set your input configuration to BOTH. main ShowLoading 0 #### Calling Firebase Inititlization!! Calling Firebase Inititlization!! >> internet is present 2023-10-14 14:40:16.824586+0530 CricketGangsta[1125:316967] 9.3.0 - [FirebaseCore][I-COR000005] No app has been configured yet. 2023-10-14 14:40:16.863538+0530 CricketGangsta[1125:316661] AppsFlyer Debug: handle deep link 2023-10-14 14:40:16.957456+0530 CricketGangsta[1125:316661] Attempting to schedule a local notification without authorization, please call RequestAuthorization first. 2023-10-14 14:40:16.957727+0530 CricketGangsta[1125:316661] Attempting to schedule a local notification without authorization, please call RequestAuthorization first. 2023-10-14 14:40:16.958161+0530 CricketGangsta[1125:316661] Attempting to schedule a local notification without authorization, please call RequestAuthorization first. 2023-10-14 14:40:16.958833+0530 CricketGangsta[1125:316661] Attempting to schedule a local notification without authorization, please call RequestAuthorization first. 2023-10-14 14:40:17.091902+0530 CricketGangsta[1125:316916] 9.3.0 - [FirebaseCore][I-COR000005] No app has been configured yet. 2023-10-14 14:40:17.092226+0530 CricketGangsta[1125:316916] 9.3.0 - [FirebaseCore][I-COR000003] The default Firebase app has not yet been configured. Add FirebaseApp.configure() to your application initialization. This can be done in in the App Delegate’s application(_:didFinishLaunchingWithOptions:)(or the@main` struct’s initializer in SwiftUI). Read more: https://goo.gl/ctyzm8. 2023-10-14 14:40:17.093253+0530 CricketGangsta[1125:316916] 9.3.0 - [FirebaseCore][I-COR000005] No app has been configured yet. 2023-10-14 14:40:17.110011+0530 CricketGangsta[1125:316661] [Firebase/Crashlytics] Version 9.3.0 2023-10-14 14:40:17.127860+0530 CricketGangsta[1125:316958] 9.3.0 - [FirebaseAnalytics][I-ACS023007] Analytics v.9.3.0 started 2023-10-14 14:40:17.128317+0530 CricketGangsta[1125:316958] 9.3.0 - [FirebaseAnalytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r) 2023-10-14 14:40:17.517613+0530 CricketGangsta[1125:316957] [connection] nw_resolver_start_query_timer_block_invoke [C1] Query fired: did not receive all answers in time for graph.facebook.com:443 2023-10-14 14:40:17.518412+0530 CricketGangsta[1125:316957] [connection] nw_resolver_start_query_timer_block_invoke [C2] Query fired: did not receive all answers in time for graph.facebook.com:443 2023-10-14 14:40:17.519370+0530 CricketGangsta[1125:316957] [connection] nw_resolver_start_query_timer_block_invoke [C3] Query fired: did not receive all answers in time for graph.facebook.com:443 2023-10-14 14:40:17.843975+0530 CricketGangsta[1125:316918] Attribution returned an error: Error Domain=ADClientErrorDomain Code=1 “The app is not authorized for ad tracking” UserInfo={NSLocalizedDescription=The app is not authorized for ad tracking} 2023-10-14 14:40:18.087474+0530 CricketGangsta[1125:316918] 9.3.0 - [FirebaseAnalytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement warning: UnityFramework was compiled with optimization - stepping may behave oddly; variables may not be available. (lldb) game getting crush very first launch second launch onwards working fine