Search code examples
iosin-app-purchaseenterprise

DLC for enterprise iOS Apps


I would like to design an enterprise app for a company that allows their employees to download modules onto the app which contain information about a particular product, i.e. text, images, video, etc.

I know In-App purchases won't work with enterprise apps, and I'm not interesting in charging anyone for the downloaded content. I was just seeing how people usually go about adding on DLC functionality on enterprise apps.


Solution

  • My enterprise app downloads JSON data from a server which configures how the app should behave.

    For example the contents of almost every table view cell is comes from a complicated core data database which is basically a mirror of a MySQL database on the server, which is configured by admin users there. The action that occurs when you tap the cell also comes from the database, although there's no code so all possible actions need to be hard-coded into the app.

    Every few minutes, the app asks the server if any database records have changed since the date of the last communication, keeping it up to date with however the admins have setup the app.

    Another option you have, since enterprise apps do not have to comply with the developer guidelines, is to just download code and execute it, using bundles. I've never done this, and it's certainly not officially supported by Apple, but it is a common practice in Cocoa/OS X software and I'm pretty sure it will work on iOS as well. Apple prevents it by scanning the code during app review, I don't think they removed the API. Check the sample code for using NSBundle on OS X (for example, System Preference panes use them).

    Be sure to use an SSL certificate on any server that provides binary code, and make sure your download code actually checks that there is a valid SSL connection being used, incase a man in the middle strips off SSL.