简体   繁体   English

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

[英]How to programatically install a ipa file in iOS 6

we use iOS private framework MobileInstallationInstall , it worked fine in iOS 5 like this: 我们使用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);

But, in iOS 6, this method ( pMobileInstallationInstall ) always return -1. 但是,在iOS 6中,此方法( pMobileInstallationInstall )始终返回-1。

Can somebody help me ? 有人能帮助我吗? Thanks a lot... 非常感谢...

please follow How do I change my iOS applications' entitlements? 请关注如何更改iOS应用程序的权利? to sign your app and you need to add the following to the xml file. 要对您的应用进行签名,您需要将以下内容添加到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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM