Using an iOS app to keep a Xojo Web App Active

Hey guys,

One of the problems I have with my Xojo web app on an iOS device is that after some period of time, iOS drops the connection to the web server. Then the web app doesn’t work. So for example, if you have the web app loaded and using it, then turn the screen off on the iPad, the connection drops. If you come back to the iPad after say 30 minutes and turn the screen on, the web app is still there with all the controls. They appear active but the app does nothing as the session to the server has been killed.

So I’m thinking about writing an iOS app that does nothing but load the page into an HTML viewer and then refreshes it by reloading the page every 3 minutes or whenever the app is activated.

Will I run into problems doing this? I don’t think so. And I think it will solve a lot of problems my users have with the web app right now…

[quote=182373:@Jon Ogden]Hey guys,

One of the problems I have with my Xojo web app on an iOS device is that after some period of time, iOS drops the connection to the web server. Then the web app doesn’t work. So for example, if you have the web app loaded and using it, then turn the screen off on the iPad, the connection drops. If you come back to the iPad after say 30 minutes and turn the screen on, the web app is still there with all the controls. They appear active but the app does nothing as the session to the server has been killed.

So I’m thinking about writing an iOS app that does nothing but load the page into an HTML viewer and then refreshes it by reloading the page every 3 minutes or whenever the app is activated.

Will I run into problems doing this? I don’t think so. And I think it will solve a lot of problems my users have with the web app right now…[/quote]

The problem is Apple will never approve your app.

Why not?

And anyhow, I can do some ad hoc distributions for some of my customers who need this.

So why would they not approve it?

They will use the following to reject it:

Well, I’ll just have to see what they say. It’s not meant to be marketed to the masses…

Probably be best to make a password needed to use the iOS app, it may get accepted that way, or use an enterprise iOS lisence to distribute the app yourself.

Reloading the page every few minutes doesn’t get you much. Every refresh starts a new session and if the user was in the middle of something, they’ll lose their work. Also, you’re not saving yourself anything. The embedded browser will have the same problem if the iPad is put to sleep.

Reloading changes session on you. Another way is to use a thick client. Instead of letting your app simply display the web app, you build the UI in the iOS app and use an API of your web app to send it the data and collect the response. That way you app is always alive, unlike a web UI one. You will need to conduct a thorough analysis of your UI, and come up with ways to exchange with the web app, but it is far from impossible.

Actually, the app I have right now in the iOS App Store uses a web app to install fonts on the device, all through HTTPSocket. The process is transparent to the user.

[quote=182385:@Robert Schofield]They will use the following to reject it:
2.2.1 Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected[/quote]

If all the app does is connecting to a web app, it will probably be rejected. But it seems widely possible to conceive what I describe above, where most of the logic remains within a web app, and the iOS app just acts as an intelligent terminal. I believe that is how Facebook and most banking apps work.

The Facebook app whet native a few releases back, before that it was a self contained web app, with the logic in the app.

You idea may pass, but you want all the logic possible in the app.

The truth is a native app IS better than a web app. Don’t forget 80 % of iPads sold and 100 % of iPod touches are WIFI only.

[quote=182588:@Robert Schofield]The Facebook app whet native a few releases back, before that it was a self contained web app, with the logic in the app.

You idea may pass, but you want all the logic possible in the app.

The truth is a native app IS better than a web app. Don’t forget 80 % of iPads sold and 100 % of iPod touches are WIFI only.[/quote]

For the record I worked in prehistoric days for a French service analogous to Compuserve called CalvaCom. Back in the early eighties they were text based, and the fastest modem was a blazing 2400 bauds. There were thick clients developed for Mac, PC and Apple II/III. The Mac one was the most spectacular, using the trickle from the server to present data in the most beautiful of ways. And, since the connection was not permanent, the app saved everything locally for the user to be able to work.

Since you can never know if the device is connected, letting it tap into the API when it is able to do is highly preferable to a framework that aks every minute “are you still there ?” and disconnects after five seconds without reply.

We are lucky to have Xojo iOS. It should be possible to do a whole lot better in terms of UI than a web app.