【问题标题】:Distribution of Enterprise iOS Apps企业 iOS 应用分发
【发布时间】:2016-05-30 09:28:45
【问题描述】:

我有一个要分发给公司员工的 iOS 应用。我知道为此我们需要考虑企业开发者帐户。我的疑问是我将如何分发构建。苹果是否提供企业商店?如果不是假设我通过 diawi.com 或类似的服务分发构建,将如何安装更新。当我推出更新时,用户是否应该删除旧版本然后重新安装它。

我尝试了很多地方都没有得到明确的答案。希望有人能帮我解决我的疑惑..

提前致谢

【问题讨论】:

  • Jobins,我认为您可以使用 Ad Hoc 分发;与这样的一群人。您可以通过简单地将 ipa 文件复制到共享磁盘(如保管箱)并告诉人们通过 iTunes 安装它来分发它。至于如何管理它;您需要更新版本和内部版本号,辞职并使用相同的方法分发?这听起来可行吗?
  • @user3069232 我正在开发的应用程序有近 260 多个用户。如果我作为 AdHoc 构建分发,那么我将不得不收集这么多用户 UDID 来创建配置文件。也有可能会出现新设备。此外,当更新推出时,用户应该删除现有应用并重新安装,否则它将自行构建。
  • Jobis 您是否尝试过构建 Ad Hoc 发行版?您不需要考虑将安装软件的用户,它是通过您的 ID 获得的许可证。 Ad Hoc 没有限制;看到这个链接。 stackoverflow.com/questions/5916827/…
  • @user3069232 感谢您的意见。你能帮我解决一下更新场景吗?
  • 如果你发布了更新版本的应用,那么当他们点击ipa时;从理论上讲,他们的设备将识别其更新版本并提供更新路线。但是要小心;我在一个几乎 100% 是 Apple 的环境中工作,所以每个人都有 MBP/MBA 和 iPad。不知道 Windows 下运行的 iTunes 功能是否与 Apple 版本一样;你需要做一些测试;让我知道我很想知道。

标签: ios iphone app-store enterprise software-distribution


【解决方案1】:

从技术上讲,您可以将企业证书分发给任意数量的设备,但协议存在一些法律限制。

用户将通过您提供的网站安装应用程序。在这个网站上,您将有一个指向 manifest.plist 的链接,如下所示。当使用 Archive > Distribute > Enterprise 时,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 提供的文档内容广泛且内容丰富:Distributing Apple Developer Enterprise Program Apps

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-11
    • 2014-11-14
    相关资源
    最近更新 更多