iOS OTA install is not working with Firebase Storage, and my guess is it is because the storage URL has query strings attached to it like so:
https://firebasestorage.googleapis.com/v0/b/some_project%2Fmanifest.plist?alt=media&token=some_token
When I use the Amazon S3 URL that ends with .plist
it works fine, and when I erase the query part, the following code at leasts responds--although it says it can't connect:
let url = URL(string: "itms-services://?action=download-manifest&url=\(str)")!
UIApplication.shared.openURL(url)
With the query string in place, it doesn't even respond.
I did some searching, and it's not because the URL is not percent escaped. The S3 URL also had no percent escape, but it worked fine.
In short, my question is
- Is it possible to install with Firebase Storage?
- If not, is it possible to install the app having download the plist file in advance?
Thank you.
The issue was that using the
itms-services
scheme, the query string could not be parsed. Also percent escaping the URL doesn't work because Firebase will not recognize the URL and return a 404.This however can be circumvented using Google URL shortener. The shortened URL is parsed without error.
It's also worth mentioning that the URLs in the
manifest.plist
file do not have to be shortened--although you could. However, if you decide to use the URLs as they are, make sure the&
in the URL are escaped with&
in the XML.I mention this because while Xcode escapes
&
s for you, the URL for the.ipa
file can be known only after uploading to Firebase storage, and it's easy to forget to escape ampersands when you modify theplist
file manually to update the installation file URL.plist
file does not work.