How to programatically install a ipa file in iOS 6

不打扰是莪最后的温柔 提交于 2019-12-09 10:53:33

问题


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);

But, in iOS 6, this method (pMobileInstallationInstall) always return -1.

Can somebody help me ? Thanks a lot...


回答1:


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>


来源:https://stackoverflow.com/questions/13817569/how-to-programatically-install-a-ipa-file-in-ios-6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!