Ambly App Bootstrapping
A couple of weeks ago Ambly gained the ability to work with ClojureScript apps that bootstrap themselves.
A simple app illustrating this need is Shrimp, where the first screen shown upon launch is a list of items taken from its database. In Shrimp’s case, the code used to populate the list is derived from ClojureScript.
Also, when developing an app, you should be able to launch it without requiring a REPL to first connect to it as a launch dependency.
The approach being taken with Ambly involves having the developer first invoke
"out" directory. The Xcode project refers to this
"out" directory in order to include it in the app bundle. Then the challenge becomes: When the iOS app launches, the ClojureScript environment needs to be bootstrapped within the app without the REPL.
Ambly's solution effectively duplicates the bootstrapping logic which was previously in the Clojure REPL implementation in Objective C in order to handle this case. This way, during the app initialization sequence, things can be properly set up and the app can begin running.
This approach has a side benefit in that it allows the developer to disconnect the REPL and reconnect it again later, with subsequent reconnects avoiding unnecessary bootstrapping.
This gets Ambly in good shape to help support targeting ClojureScript to React Native.