我在 iOS 应用程序中集成 W3i Advertiser SDK,但应用程序在以下行崩溃。
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID];
这是例外:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
我搜索了很多,但除了 w3i 的官方指南外,没有与 w3i 集成相关的网络信息和它的使用。 https://associate.w3i.com/integration/W3i_iOS_Advertiser_SDK_Integration_Guide1.htm
https://associate.w3i.com/integration/index.html
以下是我正在遵循的步骤:
Step1 : 从 W3i 下载 SDK
Step2 : 将 W3iAdvertiserSdk-3.2.0 文件夹拖入项目文件夹
第3 步添加指向以下框架的链接(如果尚不存在):
- AdSupport.framework
- UIKit.framework
- 基础框架
- CoreGraphics.framework
第 4步:添加到您的 AppDelegate.m 文件中,#import "W3iAdvertiserSdk.h"
如果我在上面的集成之后运行应用程序,那么应用程序运行良好,没有任何错误,但是当我调用 W3iAdvertiser 的方法来连接应用程序时,它会抛出我已经在上面发布的异常。
// add this line to application's didFinishLaunchingWithOptions method
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID]; //appId created at w3i
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
谁能指导我哪里出错了,如何使用 SDK 的功能将 App 与 w3i 连接以通过 w3i 宣传我们的应用程序?