fix: apply presentationStyle in chooseFromGallery - #15
Merged
Conversation
andredestro
requested review from
ItsChaceD,
OS-pedrogustavobilro,
OS-ruimoreiramendes,
jcesarmobile,
markemer and
theproducer
April 22, 2026 14:01
OS-pedrogustavobilro
approved these changes
Apr 22, 2026
OS-pedrogustavobilro
left a comment
Contributor
There was a problem hiding this comment.
Tested here by pointing the Capacitor plugin's Package.swift to this PR's branch and changing the Presentation Style option in the "Gallery" screen, and it's correctly changing the UI for the photo picker. Approved 🤌
capacitor-bot
pushed a commit
that referenced
this pull request
Apr 23, 2026
## [1.0.4](1.0.3...1.0.4) (2026-04-23) ### Bug Fixes * **ios:** apply presentationStyle in chooseFromGallery ([#15](#15)) ([05241b8](05241b8))
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.
Problem
The
presentationStyleoption was silently ignored when callingchooseFromGalleryon iOS, always presenting the gallery in fullscreen regardless of the configuration passed.Two root causes:
IONCAMRGalleryOptionsdid not have apresentationStyleproperty — the field was never declared, never added toCodingKeys, and never decoded from JSON. As a result,JSONDecoderdiscarded it silently.IONCAMRGalleryBehaviour.displayPhotoLibraryViewhardcoded.fullScreen— even if the property had existed, the presentation style was never applied to theUINavigationController.For comparison,
takePhotohandled this correctly:IONCAMRTakePhotoOptionsextendsIONCAMRMediaOptions(which haspresentationStyle) andIONCAMRPickerBehaviourapplies it viamediaOptions.presentationStyle.uiModalPresentationStyle.Changes
IONCAMRGalleryOptionspresentationStyle: IONCAMRPresentationStyleproperty (default.fullscreen)presentationStyletoCodingKeysandinit(from decoder:)IONCAMRGalleryBehaviourchooseFromGallery(with:)now passesoptions.presentationStyletodisplayPhotoLibraryViewdisplayPhotoLibraryViewacceptspresentationStyleas a parameter and applies it tonavController.modalPresentationStyleinstead of the hardcoded.fullScreenNotes