I use the iOS private framework MobileInstallation to install/update a new version of my application without using the App Store (this point is very important) in iOS 7. I use this method :
IPAResult UpdateIpa(NSString *path){
void *lib = dlopen("/System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation", RTLD_LAZY);
if (lib)
{
IPAResult ret = IPAResultFail;
MobileInstallationInstall pMobileInstallationInstall = (MobileInstallationInstall)dlsym(lib, "MobileInstallationInstall");
if (pMobileInstallationInstall){
if(![[NSFileManager defaultManager] fileExistsAtPath:path])
return IPAResultFileNotFound;
ret = (IPAResult)pMobileInstallationInstall(path, [NSDictionary dictionaryWithObject:kUser forKey:kApplicationType], 0, path);
}
dlclose(lib);
return ret;
}
Note : IPAResult is a custom enum that says if an error has occur during the process.
This method runs well because pMobileInstallationInstall returns 0, but when I'll launch the new version of my app, it crash at launch, and I really don't know why.
I read here and here that I have to add a entitlement file to my .app file with this kind of content :
<key>com.apple.private.mobileinstall.allowedSPI</key>
<array>
<string>Install</string>
<string>Browse</string>
<string>Uninstall</string>
<string>Archive</string>
<string>RemoveArchive</string>
</array>
I used ldid to perform that, but it still doesn't work. Is what I use the right method to do this ? Do you know any other solution to install, or update my application without using the App store ?
Thanks for your reply.