Installing iOS Apps from a local plist (null) would like to install

前端 未结 2 1865
故里飘歌
故里飘歌 2021-01-13 01:17

I\'m trying to install an iOS app from a plist on the device\'s filesystem.

NSString *launchNewPlistURL = [NSString stringWithFormat:@\"itms-services://?act         


        
相关标签:
2条回答
  • 2021-01-13 01:39

    You can use the project MongooseDaemon to create an HTTP local server.

    With a domain similar to: http://192.168.xxx.xxx/yourplist.plist to install it.

    Anyhow, I think you can't use it with an large IPA. I have tried with my IPA greater than 15MB and it is very, very slow to start the install.

    0 讨论(0)
  • 2021-01-13 01:46

    I was in a similar situation, and went through the route of using Mongoose originally, but just today stumbled upon CocoaHttpServer.

    With Mongoose, I was only getting about a 20% success rate serving up local plist/IPA files. Sometimes the localhost would like to install dialog never came up, sometimes install started and failed about halfway in, and sometimes it actually worked. Even worse, once an App failed, I had to completely uninstall and reinstall it, so all data was lost. I was never able to successfully "fix" a failed install.

    So far, with just about 10-15 minutes of testing, the CocoaHttpServer hasn't failed, yet. I know this is a very small sample size, but my Mongoose success rate was around 10%.

    self.httpServer = [[HTTPServer alloc] init];
    [self.httpServer setType:@"_http._tcp."];
    [self.httpServer setPort:8080];
    //This is just a path where I save my IPA and Plist file locally.  
    //In my case it's /{NSDocumentDirectory}/install/
    [self.httpServer setDocumentRoot:[self pathForLocalInstallFiles]];
    

    Then the URL to the plist on the disk:

    NSURL *plistUrl = [NSURL URLWithString:@"itms-services://?action=download-manifest&url=http://localhost:8080/appname.plist"];
    [[UIApplication sharedApplication] openURL:plistUrl];
    

    Inside the plist, where you have your URL that points to the local IPA file, I had success using either file:// or http://localhost/.

    0 讨论(0)
提交回复
热议问题