我们使用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);
Run Code Online (Sandbox Code Playgroud)
但是,在iOS 6中,此方法(pMobileInstallationInstall)始终返回-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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3323 次 |
| 最近记录: |