teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

a

2019/02/18 04:48

投稿

Hayato1201
Hayato1201

スコア232

title CHANGED
File without changes
body CHANGED
@@ -13,4 +13,101 @@
13
13
 
14
14
   ![イメージ説明](06055866356bde10b9ab5fb9f0447c5a.png)
15
15
 
16
- 有効なアイテム0個となっていますが、そもそもこれらの広告は有効になっていないのでしょうか?
16
+ 有効なアイテム0個となっていますが、そもそもこれらの広告は有効になっていないのでしょうか?
17
+
18
+ -------------------------------------------------------------------------------------------
19
+
20
+ 新しくadmobのためだけにプロジェクトを作って実行したところやはり表示できませんでしたが、以下にそのさいのコードとログを示します。
21
+
22
+ ```SWift
23
+ import UIKit
24
+ import GoogleMobileAds
25
+
26
+ class ViewController: UIViewController {
27
+
28
+ // 広告ユニットID
29
+ let AdMobID = "広告ユニットID"
30
+ // テスト用広告ユニットID
31
+ let TEST_ID = "ca-app-pub-3940256099942544/2934735716"
32
+
33
+ // true:テスト
34
+ let AdMobTest:Bool = false
35
+
36
+ override func viewDidLoad() {
37
+ super.viewDidLoad()
38
+
39
+ print("Google Mobile Ads SDK version: (GADRequest.sdkVersion())")
40
+
41
+ var admobView = GADBannerView()
42
+
43
+ admobView = GADBannerView(adSize:kGADAdSizeBanner)
44
+
45
+ admobView.frame.origin = CGPoint(x:0, y:self.view.frame.size.height - admobView.frame.height - 34)
46
+ admobView.frame.size = CGSize(width:self.view.frame.width, height:admobView.frame.height)
47
+
48
+ if AdMobTest {
49
+ admobView.adUnitID = TEST_ID
50
+ }
51
+ else{
52
+ admobView.adUnitID = AdMobID
53
+ }
54
+
55
+ admobView.rootViewController = self
56
+ //admobView.load(GADRequest())
57
+
58
+
59
+ let request = GADRequest()
60
+ request.testDevices = [ "デバイスID" ]
61
+ admobView.load(request)
62
+
63
+ self.view.addSubview(admobView)
64
+ }
65
+
66
+
67
+ }
68
+ ```
69
+ 以下Appdelegate
70
+
71
+ ```Swift
72
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
73
+ // Override point for customization after application launch.
74
+ FirebaseApp.configure()
75
+ GADMobileAds.configure(withApplicationID: "ca-app-pub-xxxxxx")
76
+ return true
77
+ }
78
+
79
+ ```
80
+
81
+
82
+ YMTLInitPlatform] platform initialization successful
83
+ 2019-02-18 13:37:54.491123+0900 testAdmob[22214:5406194] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
84
+ 2019-02-18 13:37:54.596618+0900 testAdmob[22214:5406211] 5.16.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50500000 started
85
+ 2019-02-18 13:37:54.596960+0900 testAdmob[22214:5406211] 5.16.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
86
+ 2019-02-18 13:37:54.639346+0900 testAdmob[22214:5406208] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
87
+ 2019-02-18 13:37:54.640114+0900 testAdmob[22214:5406208] [MC] Reading from public effective user settings.
88
+ Google Mobile Ads SDK version: afma-sdk-i-v7.39.0
89
+ 2019-02-18 13:37:54.658186+0900 testAdmob[22214:5406187] 5.16.0 - [Firebase/Analytics][I-ACS025026] Deferring to Firebase for event data collection
90
+ 2019-02-18 13:37:54.680709+0900 testAdmob[22214:5406214] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x281517260, domain=1, instance=1>
91
+ 2019-02-18 13:37:54.714604+0900 testAdmob[22214:5406038] [avas] AVAudioSessionPortImpl.mm:56:ValidateRequiredFields: Unknown selected data source for Port スピーカー (type: Speaker)
92
+ 2019-02-18 13:37:54.982855+0900 testAdmob[22214:5406187] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x10500f2c0] get output frames failed, state 8196
93
+ 2019-02-18 13:37:54.982983+0900 testAdmob[22214:5406187] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x10500f2c0] get output frames failed, state 8196
94
+ 2019-02-18 13:37:54.983250+0900 testAdmob[22214:5406187] TIC Read Status [1:0x0]: 1:57
95
+ 2019-02-18 13:37:54.983280+0900 testAdmob[22214:5406187] TIC Read Status [1:0x0]: 1:57
96
+ 2019-02-18 13:37:55.298193+0900 testAdmob[22214:5406229] WF: === Starting WebFilter logging for process testAdmob
97
+ 2019-02-18 13:37:55.298347+0900 testAdmob[22214:5406229] WF: _userSettingsForUser mobile: {
98
+ filterBlacklist = (
99
+ );
100
+ filterWhitelist = (
101
+ );
102
+ noOverridingAllowed = 1;
103
+ restrictWeb = 1;
104
+ useContentFilter = 0;
105
+ useContentFilterOverrides = 0;
106
+ whitelistEnabled = 0;
107
+ }
108
+ 2019-02-18 13:37:55.298500+0900 testAdmob[22214:5406229] WF: _WebFilterIsActive returning: NO
109
+ 2019-02-18 13:37:55.765835+0900 testAdmob[22214:5406038] [avas] AVAudioSessionPortImpl.mm:56:ValidateRequiredFields: Unknown selected data source for Port スピーカー (type: Speaker)
110
+ 2019-02-18 13:39:56.611369+0900 testAdmob[22214:5406577] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C4.1:2][0x105028860] get output frames failed, state 8196
111
+ 2019-02-18 13:39:56.611863+0900 testAdmob[22214:5406577] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C4.1:2][0x105028860] get output frames failed, state 8196
112
+ 2019-02-18 13:39:56.612878+0900 testAdmob[22214:5406577] TIC Read Status [4:0x0]: 1:57
113
+ 2019-02-18 13:39:56.612977+0900 testAdmob[22214:5406577] TIC Read Status [4:0x0]: 1:57