Closed nahum365 closed 10 years ago
What version of the CocoaPod are you using?
I installed it manually.
For the manual install, are you using the latest files?
I implemented LARSAdController about 2 weeks ago. Have there have been any updates since then?
OK I just switched over to Cocoapods to see if it would somehow fix the issue. Nope. Any ideas?
No, switching to cocoa pods wouldn't just fix the issue since we haven't pushed any code in a month or so.
Are you using KVO anywhere else in your app, or any other third party libraries that relate to KVO in some strange way? The above crash report indicates some kind of memory issue, but you say you are getting it every single time. Is this only on iOS 8? On the simulator or device? Can you send a sample project that reproduces the crash, or does the crash go away in a sample project?
The crash doesn't always happen, it just happens a lot. I guess it definitely could be an issue with another library that uses KVO. I'll check that when I get home. Is there a way I could prevent the crash, though?=
We have to find what's causing the crash before we can work around it.
I believe I found the issue. I commented out the dealloc line in my view controller, so the KVO observers weren't getting removed, causing the crash.
Now that everything is working correctly, is it ok if I ask here why my ads disappear after about 10 seconds?
You shouldn't have to do any cleanup or anything with the ad controller. It manages everything itself under the hood. So it's surprising that something in your view controller was causing it to crash on something internally...
I had my view controllers registering for KVO on the adVisible property so that I could manage content insets for table views. It's working well right now as far as I can tell, but the ads disappear after 10 seconds or so and don't reappear until the app is relaunched...
Since you're on the latest codebase, you can use the delegation pattern on LARSAdController rather than KVO -- which may be less prone to the problems that can come with using KVO.
@property (nonatomic, weak) id<LARSBannerVisibilityDelegate> delegate;
I switched to the delegate and everything is working fine now. Thanks for the help!
My app was just released on the App Store. Once it started to get downloads, I noticed a bunch of crashes related to LARSAdController. The app currently has around 75 users, 18 of those users have experienced this crash.
Some info:
This is the crash report: