Category: Uncategorized

ERROR_MESSAGE_MAIN iOS download problem

A customer reported a problem with downloading XLS files from one of our servers.
The error messages was a bit cryptic and we knew these did not come from our backend.

It seems that ERROR_MESSAGE_MAIN and ERROR_MESSAGE_REASON are messages from iOS. As always I Googled to find any tips & tricks on how to solve it but without luck.

We could isolate the error down to XLSX files. In PHP we pulled the content type by the following code:

This gave us “application/” which obviously did not work. But I was sure I’ve seen iOS handle XLS previews before. Something must be wrong with how the headers in our PHP download function worked.

After some trial and error I found out that iOS did not really know how to map “application/” to the preview function. So I tried a couple of different content types and ended up with this: “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”.

Now I’ve added a exception for XLS files like this and it seems to work like a charm.



Cryptic iOS error message.