如何在iOS 6中以编程方式安装ipa文件 [英] How to programatically install a ipa file in iOS 6
本文介绍了如何在iOS 6中以编程方式安装ipa文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们使用iOS私有框架 MobileInstallationInstall
,它在iOS 5中运行良好,如下所示:
we use iOS private framework MobileInstallationInstall
, it worked fine in iOS 5 like this:
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。
But, in iOS 6, this method (pMobileInstallationInstall
) always return -1.
有人能帮帮我吗?非常感谢...
Can somebody help me ? Thanks a lot...
推荐答案
请关注如何更改我的iOS应用程序的权利?以签署您的应用程序,您需要添加以下内容到xml文件。
please follow How do I change my iOS applications' entitlements? to sign your app and you need to add the following to the xml file.
<key>com.apple.private.mobileinstall.allowedSPI</key>
<array>
<string>Install</string>
<string>Browse</string>
<string>Uninstall</string>
<string>Archive</string>
<string>RemoveArchive</string>
</array>
这篇关于如何在iOS 6中以编程方式安装ipa文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文