简体   繁体   中英

How to programatically install a ipa file in iOS 6

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...

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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