Maybe a naive question

Would anyone mind listing a few use cases for lua on iOS?

I bought the app because I fell in love with programming and I wanted to figure out the best options for coding on iOS. I work a full time job, I’m a husband and a father of 6 so being able to sit at a desktop isn’t an option for me and realistically, I have a MacBook Pro but I hardly have time for that either.

One thing I always have on me is my phone so it’s the most viable option.

Codea seems to be great for building games but what about user interfaces? Would this app have any utility there?

Codea has a bridge with objective-c, which is the foundation of iOS. You can’t do everything but you can do a lot. Having learned objective-c I can say lua is a lot easier, but I don’t think you’ll be able use the bridge without at least a little knowledge of how objective-c and UIKit work.

That said, a fully-iOS-native UI in Codea is technically feasible but I haven’t seen it done extensively. There are some pretty thorough demos on the forums that make it seem not too hard, though.

I think you might find Codea to be a good app for you. As a father of two and very little time over for hobby programming I find Codea quite usable. I mostly use it on my iPhone for the same reason as you.

Try it out and use the reference guide to write some small programs. It’s not mainly build for UIs I would say, but rather for building small prototypes och graphical programs.

Regarding the user interface, the good news is that you don’t have to learn the various UI controls provided by the iOS SDK, nor be limited by their functionalities; you can freely create a user interface that best reflects your personal style.
The bad news is that you have to write these basic elements yourself.

However, that was the case for the previous versions.

Now, the version 4 (which is still in the Beta testing phase) has added support for the native iOS SDK functionalities, including various typical iOS controls. This requires you to have knowledge of UIKit, as @UberGoober mentioned, accessing it through bridging.

Additionally, I remember that @John wrote some lightweight user interface control classes in the style of Codea, which are available in the built-in examples of Codea. You might want to take a look at those for reference.

It’s also worth mentioning that many many users (including me) have written custom UI code for Codea. Mine just did buttons, but some have gone way beyond that, including one called Oil, which is included in the WebRepo project.

There’s a lot of great introductory stuff you can download in WebRepo, which gets updated all the time and is usually near the top of the forum topics. I recommend checking it out!

Hi, @Kizik, and welcome!

I’m also primarily a mobile iOS user. I don’t have as many kids but I’m a long distance commuter and work at multiple locations so not near a desktop that I can use for non-work programming much besides the weekends. I’ve also very much been interested in using Codea for non-game UI interfaces. As others mentioned, Codea hasn’t had complete turn-key UI functionality in the past, but (as the other community members alluded to) that has changed dramatically over the last year-- primarily driven by @jfperusse’s Objective-C bridge to Codea lua which opens up the capability of using all of Apple’s built-in powerful UI features. As @UberGoober mentioned, you previously needed to learn Objective-C to do that, and if you haven’t already experience with Objective-C, I’ve posted some projects over the last year (with the especially kind help of @jfperusse) of how to use that Objective-C bridge to add different GUI functions. I’m not on the beta-testing, but it sounds like from @binary blues that some in the beta versions of Codea that some of the powerful Objective-C features might even be added to standard Codea api which would make your objective even more feasible.

Good luck-- there are a lot of community members around to help if you want to try something’s out on your own. :blush:

The objc library is available in the current App Store version for both the modern and legacy renderers. You can access it the same way in both, via the objc. syntax. It can be tricky to use, though

Thanks for all the replies. This really is a great community.

1 Like