2016-02-18 176 views
1

我有一個iOS應用程序將分佈在公司的員工。我知道爲此目的,我們需要採取企業開發者帳戶。我的疑問是,我將如何分配構建。蘋果是否提供企業商店?如果不是假設我通過diawi.com之類的服務來發布構建,那麼將如何安裝更新。當我推出更新時,用戶應該刪除舊版本然後重新安裝它。分佈的企業iOS應用程序

我試圖在很多地方搜索,我無法得到明確的答案。希望有人能幫助我清楚我的疑惑..提前

+0

Jobins,我想你可以使用一個特設分佈;與這樣一個團體。您可以簡單地將ipa文件複製到共享磁盤上,如Dropbox並告訴用戶通過iTunes進行安裝。至於如何管理它,你需要更新版本號和內部版本號,使用相同的方法辭職並分發?這聽起來可行嗎? – user3069232

+0

@ user3069232我正在開發的應用程序有將近260多個用戶。如果我作爲AdHoc構建發佈,那麼我將不得不收集這麼多的用戶UDID來創建配置文件。此外,還有可能會有新設備進入。 此外,當更新推出時,用戶是否應刪除現有應用並重新安裝,否則會自行構建。 –

+0

Jobis你有沒有嘗試建立一個Ad Hoc分佈;您無需爲將要安裝該軟件的用戶進行計費,而是通過您的ID獲得許可證。 Ad Hoc無限制;看到這個鏈接。 http://stackoverflow.com/questions/5916827/how-distribute-private-program-to-more-than-100-devices – user3069232

回答

3

您可以分發

感謝與企業證書從技術上儘可能多的設備,只要你願意,也有直通的協議你一些法律上的限制。

用戶將通過您提供的網站安裝應用程序。在這個網站上,你將有一個像這樣的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]; 
      }); 
     } 
    } 
} 

文檔是廣泛而良好:Distributing Apple Developer Enterprise Program Apps