The correct content type is specified, but the .ipa file is treated as a .zip file

I wrote a small Rails application in which I can upload three files that I needed to distribute adhoc assemblies on the air. This includes a .ipa file, a .mobileprovisioning file, and a .plist file.

The problem is now, when I click on the link to the .ipa file, the file is processed as a normal download, and my iDevices ask me where to store the file.

curl -I example.com/path/to/App.ipa 

generates this output

 HTTP/1.1 200 OK Date: Thu, 25 Oct 2012 13:55:08 GMT Cache-Control: public, max-age=0 Last-Modified: Thu, 25 Oct 2012 10:23:07 GMT ETag: "742-1351160587000" Content-Type: application/octet-stream Accept-Ranges: bytes Content-Length: 742 Connection: keep-alive 

I think application / octet-stream is the right type of content. What am I doing wrong?

Thank you in advance for your reply.

Regards, Buk

+4
source share
1 answer

An .ipa file is just a (not very well masked) zip file (it is simply renamed to .ipa ). Perhaps when you set the general application/octet-stream MIME type, the Safari browser on iOS looks at the actual contents of the file, finds out that it is actually a ZIP archive and continues. By the way, it seems to me that you want to make some native applications for iOS or ad-hoc. In this case, you really have to direct the user to the manifest.plist file, which (the URL starts with itms-services:// ) so that iOS knows that it needs to look for the application package and then download and install it.

The documentation is here.

+6
source

Source: https://habr.com/ru/post/1442071/


All Articles