Building native iOS apps using Codea Libraries in Projects

I am attempting to build a native iOS application with Codea on a Mac. The Codea app has a main and two subclasses, and there are project dependinces to another project on my machine. Testing works fine, so the project dependencies are being picked up.

When I build the app in XCode, I don’t see the dependencies getting picked up. I have made a new project, removed the original Project.codea folder, renamed my folder (from my Mac copy off of the iPad) to Project.codea, added the other project libraries in the Classes folder in XCode, and compiled. I made sure to use “create folder references” when copying the folders into XCode

All compiles well, but when the app is run, it doesn’t pick up the other libraries. aditionally, when the other library code is hit, the debug window shows “attempt to call global ‘Utilities’ (a nil value)” Utilities is my project library.

Copying the lua files into the directory doesn’t work, most likely because the info.plist in the project only references the original files in the “main” project, and has no refernce to the subprojects (which have their own info.plist. I do notice that there is a “dependencies” entry, which has the proper name of the referenced projects, so it seems that there is a way -or a plan- to do this.

So, what magic do I need to make a reference work and get picked up in the compiler so that it knows it’s there?

As a hack, you could edit the info.plist and add the dependent filenames to the main list.

Agreed, but as I have 5 or so files, this means that I have to not only hack info.plist, but I also have to copy them into the project.codea folder, thereby elminiating the advantage of the project library to begin with.

Changing and copying files to the project.codea folder will work, as I hae already tested that. It’s quite messy, though. Hopefully someone can change the AppDelegate.m (I think) to iterate,a s well as whatever Codea is using to discover the LUA scripts.

That certainly sounds like a good idea - you should add it to the issue tracker. My suggestion was purely a hack for if you needed something right now and hadn’t thought of that.

Added Issue #168 in the issue tracker. Good idea.