![](/img/trans.png)
[英]Is there any limitation to distribution of apps in iOS enterprise program?
[英]Distribution of Enterprise iOS Apps
我有一个iOS应用程序,将在公司员工中分发。 我知道,为此,我们需要考虑企业开发人员帐户。 我的疑问是我将如何分发构建。 苹果是否提供企业商店? 如果不假设我通过诸如diawi.com之类的服务来分发构建,那么将如何安装更新。 当我推出更新时,用户应删除旧版本,然后重新安装它。
我试图在许多地方搜索,但无法得到明确的答案。 希望有人可以帮助我消除我的疑虑。
提前致谢
从技术上讲,您可以将企业证书分发到任意数量的设备,并且该协议有一些法律限制。
用户将通过您提供的网站安装该应用程序。 在此网站上,您将具有这样的manifest.plist链接。 使用存档>分发>企业版时,Xcode可以自动生成manifest.plist
<a href="itms-services://?action=download-manifest&url=https://yourserver/yourpath/manifest.plist">Download and Install</a>
下载并首次启动后,用户还将转到“首选项”>“常规”>“个人资料”>您的公司名称>“接受”
这是因为Apple建议您通过企业设备管理进行分发(这完全是另一个问题。)
要更新该应用,您需要在启动时检查是否有较新版本,并将用户指向新IPA。
static NSString* plistURL = @"https://yourserver/yourpath/manifest.plist";
@implementation YourAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self performSelectorInBackground:@selector(checkForUpdate) withObject:nil];
return YES;
}
- (void)checkForUpdate;
{
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:plistURL]];
NSData *plistData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
if (plistData) {
NSPropertyListFormat plistFormat;
NSDictionary *temp = [NSPropertyListSerialization propertyListWithData:plistData options:NSPropertyListImmutable format:&plistFormat error:nil];
NSString *onlineVersion = [[temp valueForKeyPath:@"items.metadata.bundle-version"] lastObject];
NSString *appVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
if (! [onlineVersion isEqualToString:appVersion]) {
dispatch_async(dispatch_get_main_queue(), ^{
UIAlertView* dialog = [[UIAlertView alloc] initWithTitle:@"A new version of «Your App» is available"
message:@"Would you like to update now? Caution: Since the app is very big, please install it while connected to a Wi-Fi network." delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Update...", nil];
[dialog show];
});
}
}
}
Apple提供的文档内容广泛而又好: 分发Apple Developer Enterprise Program应用程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.