Fabric - 答案未在iOS上注册

nst*_*ein 4 ios google-fabric fabric-answers

我在我的项目中通过在app delegate中添加以下行来配置Answers didFinishLaunchingWithOptions:

Fabric.sharedSDK().debug = true
Fabric.with([Crashlytics.self, Answers.self])
Run Code Online (Sandbox Code Playgroud)

我接受了Fabric仪表板中的条款,我看到了"Waiting for events"加载器.我清理安装应用程序并附加调试器运行它.控制台日志如下

2018-07-09 16:38:09.876038+0300 EDBiOS[21729:3627661] [Crashlytics] Version 3.10.3 (130)
2018-07-09 16:38:09.876290+0300 EDBiOS[21729:3627661] [Crashlytics] Running on iOS Simulator (iPhone), 11.4.0 (17F77)
2018-07-09 16:38:09.883163+0300 EDBiOS[21729:3627661] [Answers] Initialized
2018-07-09 16:38:09.886097+0300 EDBiOS[21729:3627661] [Fabric] Initialized with kit versions: {
    "com.twitter.answers.ios" = "1.3.7";
    "com.twitter.crashlytics.ios" = "3.10.3";
    "io.fabric.sdk.ios" = "1.7.8";
}
2018-07-09 16:38:10.611174+0300 EDBiOS[21729:3627991] [Fabric] settings downloaded successfully
2018-07-09 16:38:10.611995+0300 EDBiOS[21729:3627991] [Fabric] Settings are available for consumption
2018-07-09 16:38:10.613082+0300 EDBiOS[21729:3627957] [Answers] Answers enabled with settings: {
    "flush_interval_secs" = 10;
    "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";
}
2018-07-09 16:38:10.627885+0300 EDBiOS[21729:3627957] [Answers] Logging events to /Users/nstein/Library/Developer/CoreSimulator/Devices/4659652F-0FF0-4254-B265-A2E54BFAD542/data/Containers/Data/Application/CCD3B822-4E90-4B8A-AA46-713964FC9209/Library/Caches/com.crashlytics.data/myapp/analytics/v2/events
2018-07-09 16:38:10.630927+0300 EDBiOS[21729:3627957] [Answers] Transmitting packaged events for 'EB68FA02-082E-463D-A9E1-83FE1A969F10'.
2018-07-09 16:38:10.631427+0300 EDBiOS[21729:3627956] [Answers] Transmitting packaged events for '0E388FA3-95FB-4DD1-BC47-E9B1417E27AF'.
2018-07-09 16:38:10.631809+0300 EDBiOS[21729:3627957] [Answers] Transmitting packaged events for 'E1FE3C5D-693E-49E4-B8A7-6102EDC76C5C'.
2018-07-09 16:38:11.321912+0300 EDBiOS[21729:3627961] [Answers] Finished transmission of 'EB68FA02-082E-463D-A9E1-83FE1A969F10'.
2018-07-09 16:38:11.621711+0300 EDBiOS[21729:3627961] [Answers] Finished transmission of '0E388FA3-95FB-4DD1-BC47-E9B1417E27AF'.
2018-07-09 16:38:11.632826+0300 EDBiOS[21729:3627956] [Answers] Finished transmission of 'E1FE3C5D-693E-49E4-B8A7-6102EDC76C5C'.
Run Code Online (Sandbox Code Playgroud)

问题是装载机永远不会在仪表板上消失.答案似乎永远不会注册.应用程序在iOS 11.4 iPhone模拟器Xcode 9.4.1上运行.在macOS上使用Fabric应用程序向我的项目添加框架.

MAh*_*ngh 5

对于活动..

  1. 从设备中删除已安装的应用,退出xcode并删除派生数据并更新您的广告连播
  2. 现在打开项目并清理项目(⌘+ Option + Shift + K.)

    for Answer,Fabric.with([Answers.self, Crashlytics.self])在AppDelegate中 添加

并确保在infoPlist中添加了kitName

<key>Fabric</key>
    <dict>
        <key>APIKey</key>
        <string>xxxxxxxxxxxxxxxxxx46654</string>
        <key>Kits</key>
        <array>
            <dict>
            <key>KitInfo</key>
            <dict/>
            <key>KitName</key>
            <string>Crashlytics</string>
            </dict>

        <dict>
            <key>KitInfo</key>
            <dict/>
            <key>KitName</key>
            <string>Answers</string>
        </dict>
        </array>
    </dict>
Run Code Online (Sandbox Code Playgroud)
  1. 构建项目(⌘B)
  2. 运行项目

    现在,在浏览器中刷新仪表板

感谢@ nstein提高答案. 讨论聊天以获得更多帮助