51 karma · joined August 2, 2021
We also have functionality in bitrig to build your app and send it to App Store Connect so you can deploy it on TestFlight.
In a sense, this isn't very different from what React Native does (run interpreted code that calls out into native code), just with Swift instead of JavaScript. There used to be JavaScript-specific requirements in the guidelines, but that has been loosened since Swift Playgrounds was released. Now there are Python IDEs, Jupyter Notebooks, and other apps running arbitrary code in the App Store.
The places you can hit performance issues are things like when the app itself has a tight loop that's doing a lot of work.
Bitrig runs Swift apps which are dynamically generated by an LLM on the iPhone, despite the iPhone strict security provisions (e.g. inability to write executable pages of memory). The way we do this is by parsing the generated Swift code and mapping that to the compiled calls to the libraries that come in the OS. It's pretty weird, but we think it's worth it to get the ability to immediately render the generated code on the phone.
We're very interested in using the interpreter to improve the Swift developer experience in more ways like that.
I'll take a look at camera access and see what's going wrong there.
I think there's also work when need to do in the system prompt to guide the model away from all of the placeholder data (or at least so that when it adds it there's a better affordance to transform it to real data).
You can get a compiled build of your app from bitrig: go to Distribute App which will build your app on our server and then upload it to TestFlight for you (this requires a paid Apple Developer Account). This lets you install the compiled app on your Home Screen. You could also always export the code if you want to build it yourself.
That said, we think this same approach could work really well on Android, and it’d be interesting to expand there too.
If we hit issues we can try to pull in just a subset, but one nice thing about Swift is the frameworks have .swiftinterface files which list all the APIs in them, so we’ve generally been able to pull in whole frameworks at a time.
We also have a discord here: https://discord.com/invite/C7ndWKKq2S
Could you send us feedback from your project? (Go to the ... menu, then Send Feedback.) If you're not able to use the UI from within your project you can long-press on it from the main screen and choose Recovery Mode, and then enter the project with the interpreter disabled.
I really like the idea of a platform for people sharing mini-apps! It would be great if people could make lightweight specialized apps for different niches and share them with less friction.
Our background is more in making developer tools, so bitrig was the first product we were excited about, but I think there's a lot of overlap with dynamic UI generation, and we'd love to explore that too.
Moving in and out of the project while messages are sending is a more fragile area of the app and we have some bugs to fix there.
I think most of that would work pretty well for making SwiftUI desktop apps too.