在Crashlytics中隔离开发版本的有效方法是什么? [英] What is an effective way of segregating dev builds in Crashlytics?

查看:109
本文介绍了在Crashlytics中隔离开发版本的有效方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Crashlytics中分离开发版本的有效方法是什么?

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

我们目前正在将字母 D附加到开发版本中,然后使用隐藏 Crashlytics应用设置中的版本功能可关闭其中带有 D的任何版本。

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.

它也不能完全正常工作-我仍然在某些Crashlytics UI中看到 D版本,例如该版本

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

Crashlytics社区认为哪种解决方案是最好的?

What solution has the Crashlytics community decided is best?

推荐答案

来自Fabric的Mike。我希望看到其他人的意见,但我们建议您采取以下两种方法之一。如果您可以将.debug附加到调试版本的包ID或程序包名称中,则Fabric中将有两个应用程序,并且数据将保持分离。

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.

如果您无法做到这一点,另一种选择是在Fabric内创建两个组织,并有条件地确定要使用的API密钥和构建密钥。例如,在iOS上,您可以将运行脚本构建阶段更改为:

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

然后从您的info.plist和init Fabric中删除Fabric API密钥:

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.

这篇关于在Crashlytics中隔离开发版本的有效方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆