简体   繁体   English

如何在 Firebase RemoteConfig 中针对某些构建版本和更高版本在条件中使用包含正则表达式的目标应用程序版本?

[英]How to target app version in Firebase RemoteConfig for some build version and greater using contains regex in conditions?

I'm trying to make a condition to only target some specific App build and greater.我试图制定一个条件,只针对某些特定的应用程序构建和更高版本。 For example I want to target App version 26 and above.例如我想定位 App 版本 26 及以上。 Is that possible to do?那可能吗? what is the right syntax for the regex?正则表达式的正确语法是什么?

and I know according to Firebase documentation, it's the CFBundleVersion and not the CFBundleShortVersionString.根据 Firebase 文档,我知道它是CFBundleVersion而不是 CFBundleShortVersionString。

The only solution I came up with and it has some limitations: 我提出的唯一解决方案,它有一些限制:

^0.0.([1-9][1-9]|[1-9][0-9][0-9])$

For example: this will allow the following range 0.0.11-999 例如:这将允许以下范围0.0.11-999

in my case my build version is 0.0.10, so I wanna target anything greater than 0.0.10. 在我的情况下,我的构建版本是0.0.10,所以我想要任何大于0.0.10的目标。 My new build version 0.0.15 我的新版本0.0.15

Limitations: Any number that ends with 0 will return false, so to solve it don't use the following numbers as a build version 20,30,40,50,60,70,80,90 限制:任何以0结尾的数字都将返回false,因此要解决此问题,请不要将以下数字用作构建版本20,30,40,50,60,70,80,90

You can test your condition using this great tool: https://regex101.com 您可以使用这个出色的工具测试您的状况: https//regex101.com

It became available now with greater than, lower than and equals according to this blog post https://firebase.blog/posts/2020/10/improved-version-targeting-in-remote根据这篇博文 https://firebase.blog/posts/2020/10/improved-version-targeting-in-remote ,它现在可以使用大于、小于和等于

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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