CodeFlow Features

Code, update, experiment, and create Apps…
live for iOS, Mac OS or tvOS!

Combining the simplicity of Lua, the flexibility of Live Application Update, and the full power of the Apple SDKs, CodeFlow is packed with features that will boost your apps projects.

Live-code

Test your code in real time in the running application!

  • live app code update from the IDE
  • instant feedback
  • no app restart needed
  • app state preserved after update
  • automatic / on-demand code updates

CodeFlow brings the flexibility of live-coding to the development of iOS applications.

So when you change in CodeFlow the code of an application while it is running, this app gets updated immediately and you can test right away the effects of your changes, without leaving the app current screen, and without loosing the test case that took you so long to reproduce…

This makes live coding a huge time-saver in apps development. But more importantly, live coding brings a whole new developer experience, that unleashes your creativity by making experimentation much easier, and finally helps you to create better apps.

Live-resources

Check resource edits in the target app!

  • live app resource update
  • use your preferred resource editors
  • instant feedback when you save
  • unlimited resource types
  • drag & drop a resource to update it

Resources are an essential part of any application. That's why CodeFlow offers live resource update: to let you experience any change in a resource in its real application context.

You want to modify an image in your app? Simply open this image in your favorite image editor, do some changes and save it. CodeFlow instantly reloads the image and makes it visible it in the app. So you can iterate and continue improving the image, until you are fully satisfied with the way it looks in the app on the target device.

Live update works right out of the box with major resource types, like images, text, plist, nib files… And you can easily add your own resource types if needed.

And because resource designers and code developers usually are different people, live resource update is a great enabler that helps designers, artists, and developers to work closely together on an application development project, with a truly interactive feedback right in the running application.

Lua with Cocoa

Mix the elegant simplicity of Lua and the power of Cocoa!

  • Lua programming language
  • transparent Lua to Objective-C bridge
  • easy access to Objective-C classes, methods, properties, blocks... in Lua
  • supports all major cocoa design patterns
  • subclass / extend Objective-C classes in Lua
  • call Lua code from Objective-C

Celedev has selected the Lua language for writing dynamic code in CodeFlow. Dynamic, powerful, flexible, fast, lightweight, and very easy-to-learn, Lua is a perfect fit for Live-Coding.

In addition, we have created an easy-to-use Object-Oriented Framework that makes Lua fully interoperable with Objective C: using Objective-C objects and methods in Lua, subclassing or extending an Objective-C class in Lua, or making a Lua class conform to a protocol, all this is straightforward and works just as expected.

So with CodeFlow, you can easily combine the comfort and dynamicity of Lua with all Cocoa APIs and design patterns. This is a great help for bringing your creativity to the next level.

Native SDK

Access the entire SDK of your target platform in Lua!

  • flexible bindings packages, exposing C and Objective-C SDK APIs to Lua
  • simple & natural access to C enums, structs, globals variables and functions in Lua
  • SDK bindings included for all supported platforms: iOS, OS X and TV OS
  • SDK bindings packages available for several Xcode versions
  • Fast availability of bindings for new SDKs, including beta SDKs

With CodeFlow, your Lua code can use the familiar iOS or OS X SDK APIs, thanks to interface packages called Bindings Libraries. Selecting a SDK Bindings Library in a CodeFlow project makes virtually all the types and APIs in the corresponding SDK available to the Lua code in this project.

When you download CodeFlow, it includes SDK bindings for the SDKs of the current Xcode release. And if you're using a different Xcode version for your app, no problem: CodeFlow is flexible. Just download the SDK bindings for your Xcode version and you are ready to work!

As a result, CodeFlow makes the full power of the iOS SDK available to your App. And because our SDK bindings generation process is mostly automated, you can always benefit quickly from the latest SDK features in live-coding mode.

Project APIs

Use your app native APIs from Lua!

  • specific C and Objective-C APIs exposed to Lua via project bindings
  • automatic generation and update of project bindings
  • fine-grain control of exposed APIs
  • subclass or extend project classes in Lua
  • expose CocoaPods and 3rd-party SDKs to Lua

Because the live code in your app generally needs access to helper libraries, 3rd-party SDKs or to any other native class or API in the application, CodeFlow features the management of project bindings.

The principle is simple: you select the set of C / Objective-C header files in the application's Xcode project that you want to be accessible from Lua, and CodeFlow automatically generates the necessary interfaces for every type or API declared in these header files.

Project bindings generation is a key feature that benefits from CodeFlow's outstanding integration with Xcode. From a user perpective, it means that you can use in your Lua program any C / Objective-C API defined in your application, and "it just works!".

Superfast runtime

Run your live code at full speed!

  • highly optimized Lua VM integration
  • small memory footprint
  • multi-threaded Lua execution
  • multiple Lua contexts
  • support for live code / resources update
  • optimized support for debug and monitoring

Embedded in your app as a library, the CodeFlow runtime is the engine powering the live-code execution in the target application. Built around the excellent Lua virtual machine, it executes the Lua code at full speed, and has a very small memory footprint.

When connected to the CodeFlow IDE, the runtime also takes care of the live update of code and resources in the app, keeping the app in sync with the IDE.

And there is a lot more about the CodeFlow runtime: optimized multi-threaded architecture, transparent memory management, support of multiple Lua execution contexts, … everything is in place for running your app safe and fast!

Great Debugger

Monitor, inspect, debug, control your program!

  • advanced Lua debugger
  • live variables inspector
  • context-aware Lua command console
  • multi-threads debugging
  • flexible runtime errors detection

Debug tools are essential to any serious development environment. That's why CodeFlow includes great debug tools, specially designed to make live coding easy and practical.

CodeFlow optimized Lua debugger is always available if you want to set a breakpoint or interrupt the program execution. The variables inspector shows you the content of all variables in stopped threads, as well as the live content of global variables. Naturally, you can expand objects, Lua tables, and C structs to examine their internal fields. And you can change simple values right from the inspector.

For more complex debug actions, CodeFlow includes a Lua command console that let you execute code snippets of any complexity in the context of the selected callstack frame.

Runtime errors in CodeFlow help you to quickly detect and fix potential errors in your program. They behave like breakpoints, so you can easily find out the cause of the error. And as a benefit of live coding, you can generally fix the error right away, and resume the execution without having to restart the application.

Unleashed Devices

Test on real devices and feel the true app experience!

  • live app creation on real device
  • super-easy device discovery and connection
  • wireless app development
  • live code on multiple devices
  • avoid the Simulator Syndrome

CodeFlow makes app development on a real device so natural that you probably won't want to use the simulator anymore in most cases. The reason for this: wireless live-coding real-device experience.

Once the app is on the device, you can unplug the USB cable and the rest of the development can go wirelessly. Meaning that you can monitor the app from CodeFlow, load and update code and resources, use the debugger, as long as the device is connected to the Wifi.

Developing wirelessly on the actual target device is great, because it enables you to test your app in the exact same condition as your users, and it makes easy for you to use features that are not available or poorly implemented in the simulator. Combined with live-coding, this is a good way of keeping your app away from the sad Simulator Syndrome

And because testing on a single device is not enough, In addition, CodeFlow multi-device features allows to test your changes simultaneously on devices with different screen sizes, hardware capabilities or OS versions. And automatic device discovery makes connection to a new device as simple as selecting this device in a list.

Project History

Try, experiment, and rewind at will!

  • unlimited live-coded undo / redo
  • complete code and resource history
  • revert to an old project version with live-update
  • code-history-aware debugger

When you develop in live-coding mode, you have the power to experiment quickly many different ideas for improving your application. And at some point, you may want to review the changes you made, or to revert to a previous state of the application.

To make this easy, CodeFlow keeps track of every change you made in the project, at several levels. First you have unlimited undo available, that are propagated to the running application, just like regular code or resource updates. Then you can revert to a previous version of your CodeFlow project and see the running application revert to this version too on every connected device.

And finally, the Loaded Items History in CodeFlow presents the complete history of code modules and resources that have been loaded to each connected device. You can visualize these loaded items and revert to any of them with a simple drag & drop.

Xcode Control

CodeFlow works hand in hand with Xcode to make your app development easier!

  • optional associated Xcode project
  • automatic Xcode project configuration
  • project bindings creation from Xcode project
  • export CodeFlow project to Xcode

Using Xcode is required when you develop applications for the Apple® ecosystem, but configuring an Xcode project tends to complex and cumbersome. CodeFlow relieves you from this tedious task, saving your time for the important part of the job: app creation.

For every CodeFlow project you can set an associated Xcode project, and CodeFlow will automatically update its configuration, so that building and running your app from Xcode will always succeed.

In addition CodeFlow generates project bindings, that enable C and Objective-C APIs defined in the associated Xcode project to be used from Lua.

And when you want to convert your CodeFlow project into a standalone application, you simply select the Export command in CodeFlow, and it adds all necessary files to the associated Xcode projet. Rebuild the application in Xcode, and you are done: your app is ready to be sent to your testers or published in the App Store.

Flexible Editors

Use CodeFlow powerful Lua editor or choose your own!

  • advanced syntax-driven Lua code editor
  • integrated resource viewer
  • optional use of external code editor
  • resources editing in external applications

The advanced code editor in CodeFlow has been specially designed for Lua. Based on the real Lua syntax tree of the edited source code, its features are more powerful and accurate than those provided by traditional text-based editors.

With features like advanced Lua syntax highlighting, real-time errors detection, syntax-aware selection, context-sensitive auto-completion, variables precise scoping and refactoring, and of course syntax-based detection of code updates, the CodeFlow Lua editor makes code writing simple and productive.

But if you prefer to use another editor for Lua code, CodeFlow supports this as well. CodeFlow can work transparently with any external code editor, detecting the changes in a Lua file when you save it. Code changes are immediately made visible in the integrated Lua editor and propagated to the app on the target device. And undo / redo in CodeFlow includes changes done in external editors.

Editing a resource in the project uses a similar mechanism: you can edit any resource with the specialized editor that you prefer; CodeFlow synchronizes with the changes as you save them, and propagates them immediately to the app on the target device.

In-app integration

You decide where to put the cursor!

  • use CodeFlow to create a new app from scratch
  • or add some live code and resources to an existing app
  • create modular reusable Lua components for your apps
  • and run them in independent Lua Contexts

Inside your app, a CodeFlow runtime is just a regular object instance, a Lua Context. You can create several Lua contexts in your app, and each Lua Context is an entirely independent environment environment that runs a given CodeFlow project.

Lua Contexts are very powerful, as the Lua code they run can do virtually anything traditional native code can do. You can even write an entire application as one CodeFlow project running in a single Lua Context. In this case, the associated Xcode project is a bare skeleton that creates the Lua Context and gives it the control of the application.

But Lua Contexts are also very lightweight and flexible. Meaning that it is perfectly fine as well to create a Lua Context for adding just a thin layer of customization to an existing Objective-C class. Or to use one for implementing a single ViewController or view in your application.

CodeFlow and Lua Contexts have been designed with the express goal of enabling a very wide range of integration patterns, and of being as unobtrusive as possible in the application's architecture design process.

So that you can stay in control at all time, and decide precisely where to put the cursor between traditional development in Xcode and live coding in CodeFlow!