mopub/mopub-ios-sdk — pull request #14 by odyth (2013-07-02 02:30:41+00:00)
Title: Type checking to ensure custom class extends proper base class

There is no type checking to ensure what is put in the mopub dashboard is in fact a custom event class. I came across this bug because our ad ops member put a banner custom event class in the interstitial rotation and mopub sdk crashed on:
[self.interstitialCustomEvent requestInterstitialWithCustomEventInfo:configuration.customEventClassData];

You can compare classes a few ways, but the cleanest in this senario is after you alloc and init the customClass then check to see if its actually either a MPBannerCustomEvent or MPInterstitialCustomEvent depending on what you need and then return nil if its not.

Also fixed compiler warning for casting enum type to a different enum type.