Repository navigation
feat!: add the production platform - #117
Merged
Merged
Conversation
Work in progress on RFC 0008: moves location and biometrics into first-party plugins and removes the camera and notifications modules from the core.
…re recovery Work in progress on RFC 0008.
Add examples/fieldnotes, the reference app for RFC 0008, with its server, tests, flows, and docs. Building it found four framework bugs: - Android builds with an app icon failed on duplicate launcher resources. - Android SVG icons drew nothing, because optional unions decoded to a non-optional JSON null case and shapes never inherited root paint. - Screens restored after Android process death were blank. - KeyboardAvoidingView subtracted the keyboard twice below API 35. Also make ExoPlayer stop at the end of a clip as AVPlayer does, read uploads off the render loop, report event errors under the documented "event" phase, and mark RFC 0008 as implemented.
…a front camera The e2e suite's strict mypy check rejected plain-str state passed to Literal props and an f-string over a str-or-bytes message. The default CI AVD has only a back camera, so the camera flow's flip to the front camera reported unavailable. Pass -camera-front emulated, matching the local AVD the flow was written against.
CI's Android emulator is 320x640, so results below a map, a button row, or the availability list sit below the fold. The maps, notifications, and sensors flows now scroll to each result instead of asserting it in place. Verified on an emulator resized to 320x640 at 160 dpi.
…vents The script installs and launches the app itself, so Maestro's launchApp, which grants permissions, only runs on a retry. On the first attempt the camera prompt covered the Camera demo before open_demo saw its title. The video flow's events sit below the player on CI's 320x640 screen, so each one is scrolled to rather than waited for in place.
The editor asks for location in an effect after it renders, so the prompt can arrive after the flow's one optional tap has already passed, then cover the fields. The flows now answer it until the lookup it started is over.
…chases - android.files now copies only from inside the plugin or from a file the app named in a path option, like every other plugin source. Before, a plugin could copy any file on the build machine into the app. - Surface recovery stops when the fallback screen can't mount either, instead of remounting it forever. - WebSocket closes its connection when opening fails, so a refused handshake doesn't leak it. Overlapping pings each get their pong, so a ping during a heartbeat no longer closes a healthy connection. IPv6 hosts keep their brackets in the Host header. - set_error_fallback accepts every ErrorBoundary form through the same dispatch the boundary uses, including an element or no arguments. - The fake store consumes only with consume=True, as Google Play does, and a failed listen() is retried by the next on_update subscriber.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements RFC 0008: the production platform, or the layer Expo adds on top of React Native. It's breaking by design, with no shims. The RFC lists every removal.
What changed
pn_plugin.jsonnow covers Info.plist keys, entitlements, privacy manifests, Android manifest fragments, Gradle plugins, options with${option}substitution, requirements, and browser preview code. It stays declarative, with no build-time code. Apps turn plugins on with[plugins].useand[plugins.<name>].pythonnative.<name>:audio,background,biometrics,camera,location,maps,notifications,pickers,purchases,push,sensors,video.Camera,Location,Biometrics, andNotificationsmoved out of the core.AppDelegateandMainActivityno longer call specific modules.pn submit ios|android,pn links,pn run --release, release gates, and artifact checks that a project using no capabilities doesn't reference sensitive frameworks.pn build ios --uploadis gone.pn.set_error_fallback,pn.set_error_handler, and bounded surface restarts.pn.WebSocket, multipart uploads with progress, and streaming responses.pythonnative.__all__is down to 197 names.examples/fieldnotes), a reference app that makes every capability exceptpushwork together, with a dev sync server, Maestro flows, and a guided tour in the docs.Framework bugs Field Notes found
These predate this PR, and per-feature tests had missed them. All are fixed here:
Iconand tab bar icon drew nothing. Codegen madeOptional[Union[...]]a non-optional union with a JSON null case, so shapes never inherited root paint. This regenerates the native contracts, andPNActivityIndicatorColorbecomesPNViewBorderColor.KeyboardAvoidingViewsubtracted the keyboard twice on Android below API 35. Android now reportsoverlapbesideheight.Also: ExoPlayer stops at the end of a clip as AVPlayer does, uploads are read off the render loop, and event errors use the documented
"event"phase rather thanevent 'on_press'.Verified
On an iOS 26.2 simulator and an API 31 Android emulator:
capabilitiessuite andplugin_configflow on both. On Android,videoandwebsocketpassed in a rerun after a fix tovideo; the full suite wasn't repeated after the later keyboard fixsmokeandjournalflows in release on both, built with its icon and no manual patchingmkdocs build --strict, browser acceptance tests,check-e2e-coveragecheck-release-artifactson both platformscheck-distributions.pycouldn't check the local wheel, because it rejects this Mac's platform tag, which isn't in the release matrix. CI's wheel job is the real check.Not verified
This needs hardware, credentials, or accounts I didn't have. Please don't read this PR as saying these work:
pn submitran only against a fake Play server and a stubbedaltool.capture_failed.AVAudioRecorderhung in Core Audio on this host's simulator and times out asrecording_failedafter 20 seconds. Playback was exercised, but nothing was heard.BGTaskSchedulerlaunch on iOS.ACTION_PICK_IMAGES.KeyboardAvoidingViewon API 35+, where windows are edge-to-edge. Only API 31 was available, so that path is reasoned from platform behavior. It's the first thing to check on a newer emulator.Known rough edges, not fixed here
Nonechildren are dropped before diffing, so a conditional child remounts its siblings. Field Notes works around it with keys.TextInputhas no placeholder whenmultiline. AndroidTextInputignores padding and always shows its clear button. The iOS 26Switchoverflows its box.AVAudioRecorderis referenced by any app usingaudio, so App Store review might flag a playback-only app for a missing microphone purpose string.