简体   繁体   中英

Install an ipa file on iphone programatically in ios

Could someone please advise whether it is possible to install an ipa file programmatically in iOS that has been generated by Adhoc release ?

I have an application that when clicking on a button, it install another application, that is an ipa file (fetched from a server).

I have tried the following, but it does not work:

   string url = "https://192.168.27.45/apps/TruckApp.iOS.plist";
   NSString stringUrl =  new NSString("itms-services://?action=download-manifest&url="+url);
   NSUrl fileUrl = new NSUrl(stringUrl);

   UIApplication.SharedApplication.OpenUrl(fileUrl);

There are several things to be checked:

  • In which way doesn't it work? Is there anything going on, or do you simply see nothing on the device?
  • Ensure that UIApplication.SharedApplication.CanOpenUrl(fileUrl); returns true
  • Did you specify the correct values (eg bundle identifier etc.) in the manifest file ( TruckApp.iOS.plist )?
  • Check on the web server if the manifest / .ipa is being accessed (eg downloaded)
  • Does the web server return the correct content type for the .ipa type - it is supposed to be application/octet-stream . If you are using Microsoft IIS, it sometimes "misbehaves"

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