iOS上的Crashlytics在初始化期间无法更新网络信息

时间:2018-08-07 11:45:24

标签: ios react-native crashlytics

我在iOS上的React Native应用程序上遇到Fabric Crashlytics问题。我最近重构了我的项目,以使用iOS方案更好地管理不同的构建环境(不同的应用程序ID,应用程序名称等)以及其他一些与客户相关的原因。从那时起,我的iOS环境一直无法记录崩溃。

当我在模拟器中运行应用程序时,我在输出中看到了这一点:

2018-08-07 19:31:27.104036+0800 Appname[85185:5403735] [Crashlytics] Version 3.10.5 (130)
2018-08-07 19:31:27.159384+0800 Appname[85185:5403735] Could not successfully update network info during initialization.

运行预方案版本时,我在输出中看不到它。

我对AppDelegate.m做了一个比较,它与 对info.Plist文件的版本号等进行了一些细微更改,但没有任何更改。如何解决此问题的原因?

如果有帮助,我正在使用Xcode 9.2。

编辑: 我启用了调试模式,并看到以下输出:

2018-08-08 10:26:53.711414+0800 Appname[87289:5639505] [Crashlytics] Version 3.10.5 (130)
2018-08-08 10:26:53.711675+0800 Appname[87289:5639505] [Crashlytics] Running on iOS Simulator (iPhone), 11.2.0 (17E199)
2018-08-08 10:26:53.727611+0800 Appname[87289:5639505] [Answers] Initialized
2018-08-08 10:26:53.734830+0800 Appname[87289:5639505] [Fabric] Initialized with kit versions: {
    "com.twitter.answers.ios" = "1.3.7";
    "com.twitter.crashlytics.ios" = "3.10.5";
    "io.fabric.sdk.ios" = "1.7.7";
}
2018-08-08 10:26:53.768519+0800 Appname[87289:5639505] Could not successfully update network info during initialization.
2018-08-08 10:26:54.101 [warn][tid:NSOperationQueue 0x60000003ede0 (QOS: UNSPECIFIED)][RCTModuleData.mm:248] RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
2018-08-08 10:26:54.100943+0800 Appname[87289:5639594] RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
2018-08-08 10:26:54.134734+0800 Appname[87289:5639505] [MC] Lazy loading NSBundle MobileCoreServices.framework
2018-08-08 10:26:54.138955+0800 Appname[87289:5639505] [MC] Loaded MobileCoreServices.framework
2018-08-08 10:26:54.226271+0800 Appname[87289:5639584] [Answers] Answers is disabled. Cleaning up.

这是因为在启动核心服务之前加载了crashlytics吗?

我的Pod文件:

    # Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '8.0'

target 'Appname' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!


  # Pods for appname
    # this is very important to have!
    rn_path = '../node_modules/react-native'

pod 'DoubleConversion', :podspec => rn_path + '/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => rn_path + '/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => rn_path + '/third-party-podspecs/Folly.podspec'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
  'Core',
  'RCTActionSheet',
  'RCTAnimation',
  'RCTGeolocation',
  'RCTImage',
  'RCTLinkingIOS',
  'RCTNetwork',
  'RCTSettings',
  'RCTText',
  'RCTVibration',
  'RCTWebSocket',
  'RCTPushNotification',
  'CxxBridge',
  'DevSupport'
]

pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
...
pod 'Fabric'
pod 'Crashlytics'
  end
 target 'AppTests' do
inherit! :search_paths
   # Pods for testing
 end
 # very important to have, unless you removed React dependencies for Libraries 
 # and you rely on Cocoapods to manage it
 post_install do |installer|  
   installer.pods_project.targets.each do |target|
      if target.name == "React"
        target.remove_from_project
      end
    end
  end

0 个答案:

没有答案