Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - Creating a dynamic User Interface from a database

I have a requirement that I need to build a View for an iPAD application from reading values from a database.

When loading the application, I will make a server call to PHP and PHP will return JSON back to me. From that result set, I would like to be able to dynamically build my UI on the iPAD.

Can someone please point me in the right direction or give me some suggestions?

like image 592
majors44 Avatar asked Oct 13 '22 17:10

majors44


1 Answers

There's a WWDC 2010 session video on exactly this method. Was called "Building a server-driven user experience".

You have a server send an app XML, JSON, or a compressed plist (recommended), with all the UI object coordinates, colors, visibility, text, images, etc., then parse the data, and instantiate the apps UI from that data. Save the UI data in a local database for offline use. etc.

You are not allowed to download scripts (*) to an App store app, but you can include lots of built-in script options from which you select at runtime the desired behavior.

  • Added: As of 2017 (dev agreement section 3.3.2), Apple now allows downloading certain kinds of scripts to apps, but only for educational/tutorial purposes, not if they significantly change the behavior of the app.
like image 58
hotpaw2 Avatar answered Oct 18 '22 01:10

hotpaw2