Bug 5610 - ADInterstitialAdDelegate - wrong Export
Summary: ADInterstitialAdDelegate - wrong Export
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.2
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-06-11 13:05 UTC by Jonathan Peppers
Modified: 2012-06-15 20:59 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jonathan Peppers 2012-06-11 13:05:27 UTC
Currently the export is this:

[Export ("interstitialAdDidUnloadAd:")]
public abstract void AdUnloaded (ADInterstitialAd interstitialAd);

If you try to use the interstitial, you get a crash:

Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: -[DrawAStickman.DrawAStickmanViewController+InterstitialDelegate interstitialAdDidUnload:]: unrecognized selector sent to instance 0x10f1cf20

Looking at the doc, the proper export would be:

[Export ("interstitialAdDidUnload:")]
public abstract void AdUnloaded (ADInterstitialAd interstitialAd);

Here is apple's doc: http://developer.apple.com/library/ios/#DOCUMENTATION/iAd/Reference/ADInterstitialAdDelegate_Ref/Introduction/Introduction.html
Comment 1 Jonathan Peppers 2012-06-11 13:08:17 UTC
PS, here is a temporary workaround if others need it:

public void Workaround(ADInterstitialAd interstitialAd)
    AdUnloaded (interstitialAd);

Make sure to override the existing AdUnloaded() method.
Comment 2 Sebastien Pouliot 2012-06-15 20:59:24 UTC
master: deea643af3777243b38b3b5e642f2e7d2a0c0d56
5.2-series: 7c57ce4830a3d4944c18ca726c9c636239ab0341

Thanks for the report!