MonoTouch app with iAds runs on simulator, crashes on device

馋奶兔 提交于 2019-12-01 06:46:06

问题


A very simple one-page app that includes an ADBannerView crashes on the device whilst running fine in the simulator.

The crash is at the point of constructing the main view controller from the XIB.

The error is as follows:

"cannot decode object of class (ADBannerView)"

I'm wondering if there is an additional MonoTouch assembly I need to include?

The device is running 4.3.2 and the 4.3 SDK.

EDIT: ah, got it - I have to add the following flags (regardless of targeted OS version)

 -gcc_flags "-weak_framework iAd"

回答1:


Ah, got it - I have to add the following flags (regardless of targeted OS version)

 -gcc_flags "-weak_framework iAd"

This is all in MonoTouch 3.2.6 BTW. I haven't tried it in 4.x yet, but when I do I will update this issue.



来源:https://stackoverflow.com/questions/5819952/monotouch-app-with-iads-runs-on-simulator-crashes-on-device

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!