简体   繁体   English

iOS中的Google Admob集成错误

[英]Google Admob Integration Error in iOS

Google Admob Integration Error in iOS iOS中的Google Admob集成错误

I am using GoogleMobileAdsSdkiOS-6.12.2 latest version downloaded from https://developers.google.com/mobile-ads-sdk/download . 我正在使用从https://developers.google.com/mobile-ads-sdk/download下载的GoogleMobileAdsSdkiOS-6.12.2最新版本。

  • If I run on iOS 7.x, I am getting the following errors. 如果我在iOS 7.x上运行,则出现以下错误。

    1) CFNetwork SSLHandshake failed (-108) 1)CFNetwork SSLHandshake失败(-108)

    2) NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -108) 2)NSURLConnection / CFURLConnection HTTP加载失败(kCFStreamErrorDomainSSL,-108)

  • If I run on iOS 8.x, I am getting Crash due to "com.apple.nsurlconnectionloader exc_bad_access" error. 如果我在iOS 8.x上运行,则由于“ com.apple.nsurlconnectionloader exc_bad_access”错误而崩溃

Added below code for integrate Google Admob. 添加了以下代码以集成Google Admob。

GADBannerView *bannerView = [[GADBannerView alloc]initWithFrame:CGRectMake(0.0,self.view.frame.size.height -GAD_SIZE_320x50.height,GAD_SIZE_320x50.width,GAD_SIZE_320x50.height)];//Set Position

bannerView.adUnitID = @"ca-app-pub-3940256099942544/2934735716";

bannerView.rootViewController = self;

GADRequest *request = [GADRequest request];

request.testDevices = @[ GAD_SIMULATOR_ID, @"MY_TEST_DEVICE_ID" ];

[bannerView loadRequest:request];

Anyone please help me to get out of this issue. 任何人请帮助我摆脱这个问题。

In my case, It is because of the Network blocker issue. 就我而言,这是由于网络阻止程序问题。 If I run this code in my office, I am getting these type of errors. 如果我在办公室中运行此代码,则会收到此类错误。 If I run same on my home, It is working fine. 如果我在家中也可以使用它,那就可以了。 Because in my office they are blocking adds. 因为在我的办公室,他们阻止添加。 So I asked my N/W admin to allow adds on my system, He allowed, My issue resolved. 因此,我要求N / W管理员允许在我的系统上添加内容,他允许,我的问题已解决。

这是网络没有收到错误。请检查任何阻止或代理。

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

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