Check if iOS app is live in app store(检查iOS应用是否在应用商店中)
问题描述
是否可以在 iOS 应用程序中以某种方式编写如下代码?
Is it possible somehow to code like below in iOS app ?
if(app is live in app store)
{
//Do something
}
else
{
//Do other thing
}
我想避免我们的 QE/Dev 团队使用应用程序进行测试的情况.有没有一种方法可以检测应用程序代码的签名方式(开发人员/临时/分发)来检查?即使有可能,它也不会消除 Apple 使用我们的应用程序进行测试作为审查的一部分的情况.在我们的应用在 App Store 上线之前,我们记录了 Apple 对我们内容的多次下载.
I wanted to avoid cases where our QE/Dev team is using app for testing. Is there a way I can detect how app code is signed (Developer/Adhoc/Distribution) to check ? Even if it is possible, it will not eliminate cases when Apple is using our app for testing as part of review. We recorded many downloads of our content by Apple before our app goes live in App store.
推荐答案
您可以通过检查是否缺少 embedded.mobileprovision 来确定您的应用是否通过应用商店分发.此文件仅包含在临时构建中.
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.
像这样:
if ([[NSBundle mainBundle] pathForResource:@"embedded"
ofType:@"mobileprovision"]) {
// not from app store (Apple's reviewers seem to hit this path)
} else {
// from app store
}
这项技术来自 HockeyApp SDK.我个人在商店中有使用这种技术的应用程序,当然还有许多分发的应用程序包括 HockeyApp SDK.
This technique is from the HockeyApp SDK. I personally have applications in the store that use this technique, and of course there are many apps distributed that include the HockeyApp SDK.
基于我在来自应用商店"路径中的特定应用程序版本中意外发布的即时崩溃,Apple 团队将遵循不是来自应用商店"路径.让我的损失成为你的收获.:)
Based on an immediate crash I accidentally released in a particular build of my application in the "from app store" path, Apple's team will follow the "not from app store" path. Let my loss be your gain on that one. :)
这篇关于检查iOS应用是否在应用商店中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:检查iOS应用是否在应用商店中
基础教程推荐
- Android:STATE_SELECTED不工作 2022-01-01
- 如何将多个组件添加到 PickerView? 2022-01-01
- 新的@SystemApi 注解是什么意思,和@hide 有什么区别 2022-01-01
- - (CGRect)convertRect:(CGRect)rect toView:(UIView *)view 如何工作 2022-01-01
- 在 iOS8 中无法获得正确的键盘高度值 2022-01-01
- 在 appComponent dagger 2 中动态添加测试模块? 2022-01-01
- 在 Android 模拟器中激活网络位置提供程序? 2022-01-01
- 我的 UIImageView 的任务 2022-01-01
- 突出显示朗读文本(在 iPhone 的故事书类型应用程序中) 2022-01-01
- 可可/目标C(OSX不是iOS)从子对象访问父对象 2022-01-01
