- Home /
iOS9 UnityAdBanner Crash
This has been happening for quite some time but simply noted that as everything was still early beta that we should expect crashes. But now that iOS9 is getting closer to final release -- this is starting to worry me.
I have an game that's been on the App Store and running on all devices running iOS6 through 8.4.1 with no reported crashes.
On the latest version of iOS 9 Beta and Xcode Version 7.0 beta 6 (7A192o), my game is crashing when showing/closing iAds -- both interstitial and banner:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'accessing _cachedSystemAnimationFence requires the main thread'
*** First throw call stack:
(0x24e8326b 0x3657ae17 0x24e83141 0x25c0b1e1 0x291a14a5 0x291a1551 0x291ecdb7 0x2963efdb 0x29642cbf 0x28f278e3 0x28f9af99 0x28f8c01b 0x28f0998d 0x28f0a511 0x28f0a433 0x291ffeab 0x28f09597 0x105c9b 0x36594f67 0x51f939 0x7611ef 0xf28581 0xefc049 0xef7535 0xefbf87 0xf112e3 0xf16731 0x36e5a873 0x36e5a7e7 0x36e58740)
libc++abi.dylib: terminating with uncaught exception of type NSException
I am by no means an Xcode or iOS SDK/Objective C expert -- far from it -- which is why I use Unity.
I am building with Unity 5.1.3p1, IL2CCP
Any ideas?
Thanks, Manny
No help here? I've search high and low and could not find any other mention of this. Is there another place I should post this issue?
Answer by SamyBencherif · Jan 13, 2016 at 10:28 AM
Hi Manny, I've been experiencing a similar issue. I have a solution based on this SO response (http://stackoverflow.com/questions/12005261/removefromsuperview-doesnt-work), but I don't know if it'll work to fix UnityAds, as for me it'll only crash when I publish to the store, and I have to wait about a week to do that.
In your Xcode Project
Go to the Project Navigator
Select UnityAppController.mm
Replace
[_snapshotView removeFromSuperview];
With
[_snapshotView performSelectorOnMainThread:@selector(removeFromSuperview) withObject:nil waitUntilDone:NO];
Build and hope for the best
two extra characters made it to the end of that link. delete them to get to a valid page
Your answer
![](https://koobas.hobune.stream/wayback/20220612002428im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
App Store Rejection - Crashes 2 Answers
Unity 4.2 IOS Exception Handling 0 Answers
iOS game freezes on startup 0 Answers