@claudiosvccAs promised some time ago, I am posting regarding offline mode on iOS and an issue opening apps. The problem is that offline apps only seem to open reliably if they have been opened online within about 24 hours. Otherwise, while they do appear in the app listing (unlike on Win10), they will not open provided they have some sort of data source in the app. Apps that don't have any data sources seem to open fine outside of the 24 hour window. We primarily use Azure SQL DB as our data source, so it could be something to do with that in particular. We don't have any apps that use only SharePoint or another source, so I haven't tested those scenarios.
The behavior I am seeing is one of two variants. One is that the app will throw a message that "This app isn't opening correctly", stating that the owner may need to republish the app. I am guessing that this is what happens when a new version of the app exists but hasn't been downloaded as that seems to be the common denominator in my limited testing of this issue.
The second is that the app will appear to open, presenting the initial launch screen with the app name and four pulsing dots but it will be without the app logo. I have tried letting it sit on this screen for a number of minutes to make sure it wouldn't open and it never does. I am sure that this behavior is easily reproducible by simply not opening an app (that contains a data connection, preferably Azure SQL DB) for 24 hours and then putting the iOS device in airplane mode and then trying to launch the app.
What makes this a bit troublesome for our field employees is that when they come back from days off, if they go to a jobsite that doesn't have internet (which is more common then one might think in the state of Wyoming) then they don't have use of our apps and instead have to leave the job site to hunt down an internet connection.
Any assistance on this would be greatly appreciated! Thank you!
To open an app offline, a user must have previosly downloaded the app before. So if you make changes over night, they need to download the new version. I don't believe there is any work around to that, as in an "optional update" or something, like there is for other apps.
If you're trying to access a SQL server in something like the "OnStart" of the app without an internet connection, it could also cause an issue (at least that was the case with us). Obviosly, no internet connection, no SQL data. You can use "Connection.connected" to check for a connection. You may need to put some alternate logic for if a user is not connected.
Are you familiar with SaveData() and LoadData()? These are function to Save collections locally to the phone. If there is data in SQL server that is necessary for the app to function, you may need to save that locally to the phone each time there is an internet connection.
Are you already implementing these features?
@samuelJYes, we are implementing the features you described but thank you for suggesting them. As a general rule, I don't use the OnStart field anymore; instead, I use a custom loading screen and handle all the loading behavior there.
The app works great offline; it is just opening it seems to be a problem if it hasn't been opened online within 24 hours. If I launch the app online, close everything, put the device in airplane mode, and then launch PowerApps and the app, it behaves exactly as expected. If I launch the app online, close everything, wait a day or more, put the device in airplane mode, and then launch PowerApps and the app, it behaves as described above.
Thanks for reporting that.
Can you please provide a session id for the first issue (opening the app)?
The icon not showing shouldn't affect the app opening itself, but surely we should fix it as well. Session id wouldn't help here.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.