0

我尝试了以下说明,并完全按照步骤在我的应用程序中创建横幅视图:

https://firebase.google.com/docs/admob/ios/quick-start

但是我在运行应用程序后收到了这个崩溃:

'[<TestApplication 0x7f8bc8402750> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myBannerView.'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000113df934b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x000000011385a21e objc_exception_throw + 48
    2   CoreFoundation                      0x0000000113df9299 -[NSException raise] + 9
    3   Qibla And Prayer Arabic             0x000000010c6dbc21 -[TestApplication setValue:forUndefinedKey:] + 113
    4   Foundation                          0x0000000112fc32ff -[NSObject(NSKeyValueCoding) setValue:forKey:] + 291
    5   UIKit                               0x0000000110adbbe6 -[UIRuntimeOutletConnection connect] + 109
    6   CoreFoundation                      0x0000000113d9e590 -[NSArray makeObjectsPerformSelector:] + 256
    7   UIKit                               0x0000000110ada56a -[UINib instantiateWithOwner:options:] + 1867
    8   UIKit                               0x0000000110adc803 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 223
    9   UIKit                               0x00000001106cd61c -[UIApplication _loadMainNibFileNamed:bundle:] + 75
    10  UIKit                               0x00000001106cdc13 -[UIApplication _loadMainInterfaceFile] + 260
    11  UIKit                               0x00000001106cc274 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1406
    12  UIKit                               0x00000001106c9539 -[UIApplication workspaceDidEndTransaction:] + 188
    13  FrontBoardServices                  0x00000001172f776b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    14  FrontBoardServices                  0x00000001172f75e4 -[FBSSerialQueue _performNext] + 189
    15  FrontBoardServices                  0x00000001172f796d -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    16  CoreFoundation                      0x0000000113d9e311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    17  CoreFoundation                      0x0000000113d8359c __CFRunLoopDoSources0 + 556
    18  CoreFoundation                      0x0000000113d82a86 __CFRunLoopRun + 918
    19  CoreFoundation                      0x0000000113d82494 CFRunLoopRunSpecific + 420
    20  UIKit                               0x00000001106c7db6 -[UIApplication _run] + 434
    21  UIKit                               0x00000001106cdf34 UIApplicationMain + 159
    22  Qibla And Prayer Arabic             0x000000010c6dbcc3 main + 115
    23  libdyld.dylib                       0x000000011598468d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

有许多其他视图正常工作,问题只是 GADBannerView

4

1 回答 1

1

我通过这样做解决了问题:右键单击控件后,不要将链接出口指向文件所有者,而是指向视图控制器!

于 2016-10-19T20:52:42.267 回答