如何在FirebaseCrashlytics iOS最新升级中强制崩溃?

时间:2020-10-13 11:07:20

标签: ios swift firebase crashlytics

enter image description here

要在先前的Crashlytics中强制崩溃:

Crashlytics.sharedInstance().crash()

我正在尝试此操作,但是该功能不存在:

Crashlytics.crashlytics().crash()

2 个答案:

答案 0 :(得分:1)

答案 1 :(得分:1)

只需放入fatalError()

https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=ios&authuser=0

此外,它会识别出最新的SDK添加到您的“运行脚本”“外壳”中

${PODS_ROOT}/FirebaseCrashlytics/run -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}

${PODS_ROOT}/FirebaseCrashlytics/upload-symbols -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}