我在应用商店中有一个应用,它现在已经从一个新的 xcode 项目完全重写。新项目具有相同的包 ID 和相同的 Fabric APIKey [in the info.plist],并使用相同的 run-script 命令。但是,事件没有传递给 Fabric,Answers 中没有注册任何购买,并且这个新版本没有出现在我的 Fabric 仪表板上。除非我知道 Answers 工作正常(因为它告诉我我的每日收入等),否则我无法发布。将 Fabric 调试设置为 true 给了我这个:
--- [Crashlytics] Version 3.10.1 (129)
--- [Crashlytics] Running on iPhone10,1, 12.0.0 (16A366)
--- [Answers] Initialized
--- [Fabric] Initialized with kit versions: {
"com.twitter.answers.ios" = "1.3.7";
"com.twitter.crashlytics.ios" = "3.10.1";
"io.fabric.sdk.ios" = "1.7.6";
}
--- [Answers] Answers enabled with settings: {
"flush_interval_secs" = 300;
"flush_on_background" = 1;
"forward_to_google_analytics" = 0;
"include_purchase_events_in_forwarded_events" = 0;
"max_byte_size_per_file" = 8000;
"max_file_count_per_send" = 1;
"max_pending_send_file_count" = 100;
"sampling_rate" = 1;
"track_custom_events" = 1;
"track_predefined_events" = 1;
"track_view_controllers" = 0;
url = "https://e.crashlytics.com/spi/v2/events";
}
记录回答事件时,我会看到以下令人鼓舞的信息:
--- [Answers] Logging Answers event: <ANSPredefinedEvent: purchase
{
currency = USD;
...
success = true;
}
{
}>
--- [Answers] Transmitting packaged events for '60C20825-0EA9-463B-974B-456D6E546366'.
--- [Answers] Finished transmission of '60C20825-0EA9-463B-974B-456D6E546366'.
如何调试 Answers 数据的去向?
我的代码很简单 [在 AppDelegate 中]:
[[Fabric sharedSDK] setDebug:YES];
[Fabric with:@[[Crashlytics class], [Answers class]]];