简体   繁体   中英

Fabric - Answers not registering on iOS

I have configured Answers in my project by adding the following line in app delegate didFinishLaunchingWithOptions:

Fabric.sharedSDK().debug = true
Fabric.with([Crashlytics.self, Answers.self])

I have accepted the terms in the Fabric dashboard and I'm seeing the "Waiting for events" loader. I clean install the app and run it with the debugger attached. The console logs are as follows

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'.

The issue is that the loader never goes away on the dashboard. Answers never seem to be registering. App is running on iOS 11.4 iPhone simulator, Xcode 9.4.1. Used Fabric app on macOS to add frameworks to my project.

For Events..

  1. Delete installed app from device, Quit your xcode & delete the Derived data And Update your pod
  2. Now open your project & Clean your Project ( ⌘+Option+Shift+K. )

    for Answer, Add Fabric.with([Answers.self, Crashlytics.self]) in AppDelegate

and Make sure you have added kitName in infoPlist

<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>
  1. Build your Project ( ⌘B )
  2. Run the Project

    Now, hard refresh your dashboard in browser

Thanks @ nstein for Improving Answer. Discussion Chat for more Help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM