检测TestFlight? [英] Detect TestFlight?

查看:410
本文介绍了检测TestFlight?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想preFER使用相同的构建配置TestFlight与应用程序商店。有没有办法在运行时是否应用已通过TestFlight或App Store安装检测? (我的想法是,我会只调用起飞,如果它不是通过在App Store安装。)

I would prefer to use the same build configuration for TestFlight vs. App Store. Is there a way to detect at runtime whether the app has been installed via TestFlight or the App Store? (My thinking is I'll only call takeOff if it's not installed via the App Store.)

我想避免在App Store中使用TestFlight建立保护我的用户的隐私,同时也避免联网讨论的这里

I want to avoid using TestFlight in App Store builds to protect my users' privacy, and also to avoid the potential derailing of networking discussed here.

推荐答案

我相信这是足够接近的检查iOS应用程序是住在应用程序商店的,这可以被关闭。

I believe this to be close enough to a duplicate of Check if iOS app is live in app store that this can be closed.

您可以判断,如果你的应用程序是通过检查没有 embedded.mobileprovision 通过应用程序商店分发。该文件仅包含在即席的基础之上。因此,如果你正在构建分发只能通过TestFlight或HockeyApp,这是的的一家商店的建立,它必须是一个TestFlight或HockeyApp建设。

You can determine if your app was distributed via the app store by checking for the absence of embedded.mobileprovision. This file is only included in adhoc builds. It follows that if you're distributing builds only via TestFlight or HockeyApp and it is not a store build, it must be a TestFlight or HockeyApp build.

这样的:

if ([[NSBundle mainBundle] pathForResource:@"embedded"
                                    ofType:@"mobileprovision"]) {
  // not from app store
} else {
  // from app store
}

该技术是从的HockeyApp SDK

这篇关于检测TestFlight?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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