如何以编程方式在iOS 6中安装ipa文件

7

我们使用iOS私有框架MobileInstallationInstall,它在iOS 5中工作正常,示例如下:

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个回答

1
请按照 如何更改我的iOS应用程序的权限? 进行操作以签署您的应用程序,并需要将以下内容添加到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>

@mihirmehta 你好,请问这个解决方案是否有效,因为它总是返回-1。有什么建议吗? - Deepika Lalra

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接