Small apps testing Flet binary Python packages
To test an app on Android device:
- In Android studio, add new device with Tools -> Devices
- In terminal, in the same folder where
pyproject.toml
for your app is, runflet build apk -v
command. It will createbuild
folder withapk
folder andapp-release.apk
file in it. - Install apk on the Android device by draging and dropping
app-release.apk
to the device. - Open the app and click on the button to run the test.
To test an app on iPhone simulator
- In xCode, open Simulator
- In terminal, in directory where
pyproject.toml
for your app is, runflet build ipa -v
command. It will createbuild
folder withflutter
,ipa
andsite-packages
folders. - Set environment variable
export SERIOUS_PYTHON_SITE_PACKAGES=[Path-to-site-packages]
- When in
flutter
folder, runflutter run
command - On prompt, select iPhone simulator as your device -> the app will open in Simulator
- Open the app and click on the button to run the test.