简体   繁体   English

Xcode 9 Swift 4 AR应用添加广告

[英]Xcode 9 Swift 4 AR app add ads

I am trying to add iads to my Xcode9/Swift 4 AR project. 我正在尝试将iads添加到我的Xcode9 / Swift 4 AR项目中。

From searching online, adding iads to the viewcontroller should be as easy as dragging the iad banner view into the main.storyboard, however there doesn't seem to be any options for ads in Xcode 9. Is this something with the new Xcode version? 通过在线搜索,将iads添加到视图控制器应该像将iad横幅视图拖动到main.storyboard一样容易,但是Xcode 9中的广告似乎没有任何选项。新的Xcode版本有什么用吗? Or do I need to install some sort of add plugin to use iads. 还是我需要安装某种添加插件才能使用iads。 If for some reason iads got removed from Xcode I could always fall back on adMob for IOS. 如果出于某些原因将iads从Xcode中删除,那么我总是可以使用adMob for IOS。

Thanks, any info helps! 谢谢,任何信息都可以帮助!

As far as I know, iAds have been depreciated. 据我所知,iAds已贬值。 There are multiple in-app ad services which you can use, one of the most popular ones is, as you mentioned, AdMobs. 您可以使用多种应用内广告服务,如您提到的,最受欢迎的服务之一就是AdMobs。

You would need to create an AdMob account, and install the Google AdMobs SDK , which is easily done through terminal/CocoaPods. 您需要创建一个AdMob帐户,然后安装Google AdMobs SDK ,这可以通过终端/ CocoaPods轻松完成。

To create ads you need to first create an Ad Unit, after you've signed up to AdMobs. 要制作广告,您需要先注册一个广告单元,然后再注册AdMob。

Once you have done that, use this documentation, depending on the type of ad(s) you wish to display, to invoke and display ads. 完成此操作后 ,请根据要显示的广告类型使用文档来调用和显示广告。 Keep in mind, different ads which require different delegates/methods. 请记住,不同的广告需要不同的代表/方法。

But in regards to your question, you are not wrong nor is there any issues. 但是关于您的问题,您没有错,也没有任何问题。 Simple iAds have been abandoned, in essence. 本质上,简单的iAd已被放弃。

iAd App Network已于2016年底关闭。您应按照声明使用adMob或其他形式的广告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM