Unity iOS Podfile Issues
Esta página aún no está disponible en tu idioma.
Problem
Sometimes, the Unity External Dependency Manager makes Podfile
changes that result in errors on iOS.
This can lead to a number of different error messages.
Here are some examples:
2021-03-11 11:08:47.571790+0100 demo[61453:2259760] Uncaught exception: NSInvalidArgumentException: Passed an object of type other than ALAd: ALAdServerAd.(0 CoreFoundation 0x0000000184755880 727F2644-EB4E-3D57-BC2E-E6803BA92366 + 12023041 libobjc.A.dylib 0x0000000199770c50 objc_exception_throw + 602 CoreFoundation 0x000000018464e4a4 727F2644-EB4E-3D57-BC2E-E6803BA92366 + 1240683 demo 0x0000000104a92768 +[ALUtils assertValidAd:] + 4084 demo 0x0000000104a09274 -[ALAdView render:] + 725 demo 0x0000000104a68268 __64-[ALAppLovinMediationAdapterAdViewDelegate adService:didLoadAd:]_block_invoke + 5886 Foundation 0x0000000185aa4850 7698BF3E-0CF6-31C0-85E9-562714F01276 + 12596007 Foundation 0x0000000185991740 7698BF3E-0CF6-31C0-85E9-562714F01276 + 1329288 Foundation 0x0000000185aa6ca4 7698BF3E-0CF6-31C0-85E9-562714F01276 + 12689009 Foundation 0x00000001859913c8 7698BF3E-0CF6-31C0-85E9-562714F01276 + 13204010 Foundation 0x0000000185aa774c 7698BF3E-0CF6-31C0-85E9-562714F01276 + 127162811 Foundation 0x0000000185aa71d4 7698BF3E-0CF6-31C0-85E9-562714F01276 + 127022812 libdispatch.dylib 0x0000000184357fb8 B92757B1-0434-3E9B-A3AC-B6DA6B81945C + 7365613 libdispatch.dylib 0x0000000184349db0 B92757B1-0434-3E9B-A3AC-B6DA6B81945C + 1579214 libdispatch.dylib 0x00000001843577ac _dispatch_main_queue_callback_4CF + 83615 CoreFoundation 0x00000001846d111c 727F2644-EB4E-3D57-BC2E-E6803BA92366 + 65974016 CoreFoundation 0x00000001846cb120 727F2644-EB4E-3D57-BC2E-E6803BA92366 + 63516817 CoreFoundation 0x00000001846ca21c CFRunLoopRunSpecific + 60018 GraphicsServices 0x000000019c296784 GSEventRunModal + 16419 UIKitCore 0x000000018710aee8 8518EAE3-832B-3FF0-9FA5-9DBE3041F26C + 1235735220 UIKitCore 0x000000018711075c UIApplicationMain + 16821 UnityFramework 0x000000010bed9704 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 10822 demo 0x0000000104898e5c main + 6823 libdyld.dylib 0x000000018438a6b0 21B19919-1334-38BC-B233-896E929945E0 + 5808)2021-03-11 11:08:47.572392+0100 demo[61453:2259760] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Passed an object of type other than ALAd: ALAdServerAd.'*** First throw call stack:(0x18475586c 0x199770c50 0x18464e4a4 0x104a92768 0x104a09274 0x104a68268 0x185aa4850 0x185991740 0x185aa6ca4 0x1859913c8 0x185aa774c 0x185aa71d4 0x184357fb8 0x184349db0 0x1843577ac 0x1846d111c 0x1846cb120 0x1846ca21c 0x19c296784 0x18710aee8 0x18711075c 0x10bed9704 0x104898e5c 0x18438a6b0)libc++abi.dylib: terminating with uncaught exception of type NSException*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Passed an object of type other than ALAd: ALAdServerAd.'terminating with uncaught exception of type NSException
Or:
18:57:54.955924+0300 demo [AppLovinSdk] ERROR [ALIncentivizedInterstitialAd] Attempted to display a non-incentivized ad using ALIncentivizedInterstitialAd: [ALAd #9224781 source=4, zoneIdentifier=(null), size=[ALAdSize: INTER], type=[ALAdType: VIDEOA]]
Or:
2021-04-12 16:14:11.491511+0300 demo [956:240795] [AppLovinSdk] ERROR [ALSdk] Developer passed nil instead of ALAd instance - please check object types!2021-04-12 16:14:11.497797+0300 demo [956:240795] [AppLovinSdk] ERROR [ALSdk] Called with an invalid object type from: (0 carrace 0x00000001025d07fc +[ALUtils assertValidAd:] + 2801 carrace 0x0000000102545278 -[ALAdView render:] + 722 carrace 0x00000001025a590c __64-[ALAppLovinMediationAdapterAdViewDelegate adService:didLoadAd:]_block_invoke + 5883 Foundation 0x000000019c9063f0
Solution
- Update the Unity External Dependency Manager to at least version 1.2.164.
- In the Unity External Dependency Manager OS Resolver Settings (Assets > External Dependency Manager > iOS Resolver > Settings), uncheck the Add use_frameworks! to Podfile and Always add the main target to Podfile boxes.
Alternative Solution
Remove the following lines from the Podfile
:
target 'Unity-iPhone' doend
use_frameworks!
Then run the following command, which applies your Podfile
changes to the project.
pod install --repo-update