Streamlit to iPhone app

Turn your Streamlit app into a real iPhone app

Borel turns a Streamlit app into a native iPhone app. Paste the address of your deployed app: Borel photographs its first screen and, from that picture and your screenshots, writes the screens again in Swift with SwiftUI. Python doesn't come along: simple logic is rewritten in Swift, and a model that must stay in Python is called on your server. Try it on a live iOS Simulator, then publish.

Updated

9:41
Idea Pipeline, a video idea tracker Borel built, on its Ideas tab
iPhone
9:41
A recipe app Borel built, with recipes grouped by meal
iPhone
9:41
A budget app Borel built, showing what is left to spend this month
iPhone
9:41
A workout log Borel built, with this week's totals
iPhone

Native apps built by Borel, in the iOS Simulator.

Streamlit

How does a Streamlit app work?

Streamlit is an open-source framework for data apps. Its docs put it this way: you turn your data into interactive apps and dashboards, written in plain Python.

Deployed on Streamlit Community Cloud, an app gets a subdomain on streamlit.app, and anyone you send the link to opens it in a browser.

The iPhone question

Is a Streamlit app an App Store app?

It is a web app: a Python script on a server. Streamlit's docs explain that every time someone changes an input, Streamlit reruns your script from top to bottom, and the page in the browser shows the result. The browser is only the display, and the work happens on the server.

Streamlit's deployment docs end at a web address, and describe no step for the App Store. Opening that address inside an app frame is the wrapper Apple's guideline 4.2 is about, and it would still need the server for every tap. A native app keeps its screens on the phone and asks a server only for what it can't work out itself.

Apple's rule

Why a rebuild beats a wrapper

Apple reviews every app before it reaches the App Store, and a website in an app's frame is what its guideline 4.2 is about.

“Your app should include features, content, and UI that elevate it beyond a repackaged website. If your app is not particularly useful, unique, or “app-like,” it doesn’t belong on the App Store.”
App Store Review Guidelines, 4.2 Minimum Functionality, Apple

Borel never wraps your Streamlit app. It writes a separate app in Swift with SwiftUI, Apple’s own language and interface framework, so the screens, scrolling and controls are the iPhone’s.

Step by step

How to turn your Streamlit app into an iPhone app

  • 1

    Copy the streamlit.app address

    Or wherever the app is deployed, with https:// first. It has to open without a login for Borel to see it.

  • 2

    Split screens from calculations

    Send the prompt below. List the inputs, what is computed and what is shown. Attach screenshots of each state you care about, up to four per message.

  • 3

    Inputs and results, natively

    Borel photographs the first screen at phone and desktop size and, from that picture and your screenshots, writes SwiftUI forms for your inputs and screens for the results, with the arithmetic you described in Swift.

  • 4

    Try it on an iPhone

    Try the app in the iOS Simulator in your browser, free. Borel Companion, on Pro, installs it on your iPhone, to use away from your desk.

  • 5

    Publish it

    With Pro and Apple's Developer Program, Borel compiles and signs the app on its own Mac and uploads it to App Store Connect.

Just for you? Skip step 5: personal apps need no App Store.

Your first message

A prompt to start from

Put your address where it says, fill in the brackets, and send it as your first message.

Paste into Borel’s chat
Rebuild my Streamlit app at <your address> as a native iPhone app. Inputs: [list them]. It calculates [what, and how]. It shows [tables, numbers or results]. Keep the title and wording. People sign in with email and their past [runs or entries] are saved.

Moving over

What moves over, and what is made new

Borel works from what your app shows, the screenshots you add and the words you write. It doesn't copy code or accounts out of another platform.

What moves from Streamlit to the iPhone app
In your Streamlit appIn the iPhone app
Title and wordingMoves over. Taken from the photograph of the first screen and your screenshots.
InputsMoves over. Sliders, pickers and text boxes become native SwiftUI controls.
Result screensMoves over. Rebuilt from that photograph and the screenshots you attach.
Python logicMade new. Not run on the phone. Calculations you describe are written again in Swift.
Models, pandas and other librariesStays. On your server. The app can call them if you put them behind an API that takes a key.
Data files and session stateMade new. What the app must remember goes into tables in Borel's cloud, each row private to the person who saved it.
The Streamlit appStays. Still deployed, for anyone on a laptop.

Frequently asked questions

No. A Borel app is Swift, and nothing imports a script or a repository. Describe what the code computes and Borel writes it in Swift; for anything heavy, keep Python where it is and call it.

It stays on your server. Put it behind an API that takes a key, save the key under Tools › Keys after the first build, and ask Borel to call it. The key is kept on Borel's server, not in the app.

Not automatically. Borel sees a chart as a picture, not the data behind it, so say which numbers each one plots. How charts are added to an iPhone app is covered in the post linked at the end of this page.

Only if people should keep something. Without accounts the app can hold its data on the phone; with email sign-in, saved runs follow the person to a new device.

No. Borel builds with Xcode on its own Mac and streams the simulator to your browser, so Windows and Chromebooks work too.

Paste your Streamlit app

See your data app as a native iPhone app, with Python left on the server.