I have an app that lets the user interact with several forms. I can easily get everything I need to create a form via a request to a remote server. But, each form needs its own class to handle input, data formatting and validation, display, and local storage. I have tried to write a generic class that can work for ANY form, but am running into many one-off situations. Also, if I change or add forms in the future with their own special cases, I don’t want to have to revise the code and issue an update.
Is it possible to serialize compiled code, send it in a server request, and store it in Core Data?
While it’s certainly possible, it’s also certainly quite complex. You’ll have to deal with many low level considerations, per example dynamically linking your code fragments.
As I understand, you do not need tons of code, and nothing excessively complex. It’s probably much easier then to use a scripting language you can embed in your application, like say, JavaScript, or Lua with a little more effort. Lua ain’t big and you can use precompiled fragments very easily.