Can I get the size of the Live Update package before download?

I added in a notification during startup that a new version of the app is available and it’s being downloaded rather than just having the splash screen open for a really long time. It works great!

However, Apple rejected it saying that I need to give the user an option to opt out of the update and also let them know the size of the update. I can do the opt out easy enough, but I can’t seem to find any way in the Deploy plugin that let’s me get the size of the new package.

Any ideas on how I might get this?

Apple is notorious when it comes to app rejections, unfortunately.

Currently, there is no way to know the size of the downloaded update. Generally, given how Apple is with rejections, it’s best to not make it interactive. We recommend the background update strategy.

Otherwise, you could try showing the download progress using the Live Update API. Here’s an example.

Background mode won’t work for me as it refreshes the app in the middle of doing work.

My users are quite often entering orders or scheduling appts, and I can’t have the app just randomly restart itself, even if it’s been in the background for a while.

If there was a way to tell background mode to download only and don’t restart and only apply the update on next app load, that would be the optimal solution.

OK, that all makes sense.

Potential “easiest” option would be to set the min background duration to a very high number, so it effectively is never reached. Then, the only time was the app would update is after it has been closed (user kills it, phone reboot, etc).

Alternatively, set the update method to “none” and handle the logic yourself. On app load, check for a new update, download it, extract it, then reload the app to apply it - using the API code examples I linked.

Ok, so I did this.

I set update mode to background and min-background-duration to 999999.

But now it never even downloads the update.

I think it won’t even check for a new version until the min-background-duration timeout hits. Can you confirm this?

Apologies - my advice & understanding above was incorrect. The new version won’t be applied until the min-background-duration is reached.

To accomplish what you’re going for here, you’ll need to use the Live Update API along with a custom implementaiton/code.


Thanks for double checking for me.

I’ll go a different path.