What is an effective way of segregating dev builds in Crashlytics?

人盡茶涼 提交于 2019-12-13 08:13:32

问题


What is an effective way of segregating dev builds in Crashlytics?

We are currently appending the letter "D" onto our development builds, and then using the "Hidden Versions" feature in the Crashlytics app settings to turn off any versions that have "D" in them. It's a manual step, so it's not great.

It also doesn't work entirely - I still see "D" versions showing up in some Crashlytics UI, like the version adoption box.

What solution has the Crashlytics community decided is best?


回答1:


Mike from Fabric here. I'd love to see other's opinions, but we recommend one of two things. If you can - append .debug to the bundle id or package name for your debug builds and then you would have two apps in Fabric and the data would be kept separated out.

An alternate option if you can't do that would be to create two organizations within Fabric and conditionally decide which API key and build secret to use. For example, on iOS, you could change the run script build phase to be:

releaseConfig="Release"

if [ "$releaseConfig" = "${CONFIGURATION}" ]; then
    echo "Running Crashlytics Release"
    ./Fabric.framework/run <your__release_api_key_here>
else
    echo "Running Crashlytics Debug"
    ./Fabric.framework/run <your__debug_api_key_here>
fi

and then remove the Fabric API key from your info.plist and init Fabric like:

[Crashlytics startWithAPIKey:<your api key>];

and use a variable to reference which key to use.



来源:https://stackoverflow.com/questions/44765742/what-is-an-effective-way-of-segregating-dev-builds-in-crashlytics

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!