1

我正在尝试运行 AppsFlyer SDK 的初始化,但在启动应用程序时出现 Thread 1: signal SIGABRT 错误。我在这里使用 AppsFlyer 的指南:https: //support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#3-sdk-initialization

我在 Xcode 10 中的 swift ios 应用程序上使用它。我在指南中使用了 cocopods 选项。我尝试使用指南提供的确切代码,但这不起作用。然后我尝试遵循 Xcode 建议的更改。这给了我一个警告,然后应用程序在启动时崩溃了。

该指南说要使用的代码:

AppsFlyerTracker.shared().appsFlyerDevKey = "<your-appsflyer-dev-key>";
AppsFlyerTracker.shared().appleAppID = "123456789"
AppsFlyerTracker.shared().delegate = self

Xcode 建议使用固定代码:(错误:“无法将类型 'AppDelegate' 的值分配给类型 'AppsFlyerTrackerDelegate?'”)

AppsFlyerTracker.shared().appsFlyerDevKey = "xxxxxxxxx";
AppsFlyerTracker.shared().appleAppID = "xxxxxxxx"
AppsFlyerTracker.shared().delegate = self as! AppsFlyerTrackerDelegate

启动后出错:线程 1:信号 SIGABRT

我正在尝试让 SDK 初始化。

我也在使用 AdMob/Firebase,这也在使用 cocopods。它按预期工作。

4

1 回答 1

1

我能够通过更改为来修复AppsFlyerTracker.shared().delegate = self错误AppsFlyerTracker.shared()?.delegate = self as? AppsFlyerTrackerDelegate

于 2019-01-23T14:16:17.300 回答