PHP for iPad, or other solutions

2020-05-01 22:02发布

Here's a tricky one.

I'm developing a web app for iPads that will be installed as kiosks. The app is essentially a quiz. Wont need to store data in a database, but will need to process data from 1 page to another page (from questions page to results page).

Original solution was simple PHP. I have now been informed that wi-fi/3g will be unavailable to the kiosks, so they wont have access to the webserver w/ php that has been working like a charm. App needs to be browser-based.

Looked around for solutions for installing PHP on iPad, like PHPPOD from Cydia, but unsure if that is even an option for iPad...and we wont be jailbreaking them. Can this even be done w/o php?

3条回答
Evening l夕情丶
2楼-- · 2020-05-01 22:26

Without wifi/3G you would need local storage won't you? For this you need not jailbreak your iPad & force it to work through PHP. You could do that following -

  1. Jailbreak the app & maybe try to get your PHP solution working on iPad.
  2. Build a native app with local storage (using sqlite or core data) & handle the display through UIWebView.
  3. Build a HTML5 app with local storage is easy to do nowadays, again UIWebView would be used.
  4. As Amber suggests, you could build all your quizzing logic in javascript, but I am concerned here as to where you'll store data. You need to refer to point 3.

Hope this helps...

查看更多
劳资没心,怎么记你
3楼-- · 2020-05-01 22:27

If you're not jailbreaking them, then you will NOT be able to get any un-approved apps onto them. Apple does NOT want you to bypass the app store, because they want their 30% cut. Installing a PHP interpreter on an iphone/ipad would allow you to build apps outside of Apple's control - this is THE main reason why Flash will never been on an iphone - it's not just for playing movies, it's actually a pretty full runtime environment.

You could try using HTML5 local storage, or use the native SQLlite database in iOS.

查看更多
该账号已被封号
4楼-- · 2020-05-01 22:35

If you won't be jailbreaking them, trying to get a working PHP interpreter on them might not be impossible, but it'll probably be at the very least annoyingly difficult (and it's unlikely Apple would approve random PHP interpreters in their app store).

I'd suggest trying to port the app to Javascript instead. If it's just a simple questions -> results flow, writing a basic Javascript web app with jQuery to help out if need be shouldn't be too painful.

查看更多
登录 后发表回答