我们使用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。
有人能帮助我吗?非常感谢...
答案 0 :(得分: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>