Repository navigation
Present the camera and photo pickers over sheets on iOS - #17
Merged
Merged
Conversation
The pickers were presented from the window's root view controller, which can't present while it's already presenting something. So when an app opened the camera or the photo library from a sheet, nothing happened. They now present from the topmost view controller, as the browser plugin does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
October 22, 2026 14:43
simonhamp
added a commit
to sonalidudhia/mobile-camera
that referenced
this pull request
Oct 22, 2026
NativePHP#17 landed on main with a smaller version of this fix, so the three picker call sites conflicted. This keeps CameraPresenter and drops NativePHP#17's topViewController helper, because CameraPresenter also waits for a sheet that is still closing before it presents. Everything else from main, including NativePHP#13, comes through unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
added a commit
to NativePHP/dev-null-app
that referenced
this pull request
Oct 22, 2026
… polls (#24) * Attach photos, start polls and preview from the composer sheet, and vote on polls The composer sheet gets the web composer's tools on a row under the field: photos from the library, a photo from the camera, a poll, and a preview. Photos come through the official camera plugin, up to three, each checked the way devnull checks them and moved into the app's storage until the commit goes. Each can have a description. A commit with photos is signed as multipart with the image hashes, the way the API asks, and sent from the background, so Commit spins while it uploads. A new commit or a quote can have a poll instead, with two to four options and a length, as on the web. The preview shows the draft as the commit it would become, and fills in the body devnull sends back for it. A commit page's reply bar has no room for these, so it gets an expand button that opens the reply in the same sheet, and the draft goes back to the bar if the sheet closes unsent. Polls in lists can now be voted on: pick an option, then Vote. The camera plugin is pinned to a branch until NativePHP/mobile-camera#17 is released, since its pickers did nothing when opened from a sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pin the composer's toolbar to the bottom of the sheet The tools, stash@{0} and the counter now sit in a bar under the scroll view instead of at the end of it, so they stay just above the keyboard while you write, and above the home indicator when it's down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
added a commit
to NativePHP/dev-null-app
that referenced
this pull request
Oct 22, 2026
The composer sheet needed NativePHP/mobile-camera#17 to open the camera and photo library over it, so the app tracked that PR's branch from a VCS repository. #17 was squash-merged and its branch deleted, which leaves composer update unable to resolve it. The fix shipped in 1.1.0, so require ^1.1 from Packagist and drop the repository entry. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
On iOS the camera, video and photo pickers are presented from the key window's root view controller. When the app is already showing a sheet, the root view controller is busy presenting it, so
presentdoes nothing: the photo picker's view service starts and is torn down straight away, and no event ever comes back.This presents them from the topmost view controller instead, walking
presentedViewControllerthe way the browser plugin already does inBrowserFunctions.swift. Nothing changes when no sheet is showing.I hit this in the devnull app, where the composer is a
native:bottom-sheetand its photo and camera buttons did nothing. With this change the photo picker opens over the sheet andMediaSelectedarrives as expected, checked on an iOS 27 simulator. The camera can't be tried on a simulator, but it goes through the same path.Worth knowing:
mainhas a few fixes 1.0.4 doesn't, including the HEIC to JPEG conversion (#7) and the persistent storage fix (#12). The devnull app needs both, so a 1.0.5 release with this would let it drop the branch.🤖 Generated with Claude Code