2012-12-11 36 views
7

我們使用的iOS專用框架MobileInstallationInstall,它在iOS 5中工作得很好像這樣安裝IPA文件:如何以編程方式在iOS 6中

typedef int (*MobileInstallationInstall)(NSString *path, NSDictionary *dict, void *na, NSString *path2_equal_path_maybe_no_use); 

int result=pMobileInstallationInstall(ipaPath,[NSDictionary dictionaryWithObject:@"User" forKey:@"ApplicationType"],nil,ipaPath); 

但是,在iOS 6中,這種方法(pMobileInstallationInstall)總是返回 - 1。

有人能幫助我嗎?非常感謝...

回答

1

請按照How do I change my iOS applications' entitlements?簽署您的應用程序,您需要將以下內容添加到xml文件中。

<key>com.apple.private.mobileinstall.allowedSPI</key> 
<array> 
    <string>Install</string> 
    <string>Browse</string> 
    <string>Uninstall</string> 
    <string>Archive</string> 
    <string>RemoveArchive</string> 
</array> 
+0

該解決方案仍然有效?我已經嘗試過,但沒有工作 –

+0

@mihirmehta你好,這個解決方案的工作,因爲它總是返回我-1。任何建議?在iOS6上的 –

+0

它不起作用 –

相關問題