2016-05-11 9 views
0

Ich möchte ein ipa auf einem Jailbreak-i-Gerät installieren. Ich bekomme diesen Code unten auf Google. Hier ist der CodeMobileInstallationInstall Fortschritt

#import "dlfcn.h" 


typedef int (*MobileInstallationInstall)(NSString *path, NSDictionary *dict, void *na, NSString *path2_equal_path_maybe_no_use); 


    void *lib = dlopen("/System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation", RTLD_LOCAL); 
    if (lib) 
    { 
     MobileInstallationInstall pMobileInstallationInstall = (MobileInstallationInstall)dlsym(lib, "MobileInstallationInstall"); 
     if (pMobileInstallationInstall) 
     { 
      int ret = pMobileInstallationInstall(path, [NSDictionary dictionaryWithObject:@"User" forKey:@"ApplicationType"], nil, path); 
      dlclose(lib); 

      return ret; 
     } 
    } 
    return -1; 

Aber das ist nicht genug.Ich möchte den Installationsfortschritt.Just wie Download-Fortschritt. Leider bekomme ich nichts auf google.any Ideen?

+0

; (; (; (; (; (; (; (; ( –

+0

) MobileInstallation Framework ist wahrscheinlich veraltet, da viele Funktionen daraus entfernt wurden. Vielleicht möchten Sie sich dieses https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/MobileCoreServices.framework ansehen /LSApplicationWorkspace.h Das ist, was moderne iOS-Versionen verwenden – creker

Antwort

0

müssen Sie MobileInstallationInstall

void MobileInstallationCallback(CFDictionaryRef information){ 
    NSLog(@"%@",information); 
} 

int ret = pMobileInstallationInstall(path, [NSDictionary dictionaryWithObject:@"User" forKey:@"ApplicationType"], & MobileInstallationCallback, path); 

alle Informationen über die Parameter Informationen MobileInstallationCallback gesendet werden, um eine Callback-Funktion auf dem dritten Parameter angeben