fix(ios): stop the config plugin dropping the app's URL schemes - #280
Open
rlods wants to merge 1 commit into
Open
fix(ios): stop the config plugin dropping the app's URL schemes#280rlods wants to merge 1 commit into
rlods wants to merge 1 commit into
Conversation
ensureURLScheme wrote ios.infoPlist.CFBundleURLTypes, which trips the property guard around Expo's own withScheme mod, so expo.scheme never reached Info.plist. Only top up a CFBundleURLTypes list the app already owns, and read array scheme / ios.scheme values instead of falling back to the bundle identifier. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rlods
marked this pull request as ready for review
September 11, 2026 16:02
Author
|
@V3RON I hope you don't mind all those fixes, but they are real blockers! 🙏 |
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
Adding
@use-voltra/ios-clientto an app silently removes the app's own URL schemes from the builtInfo.plist: after a prebuild,CFBundleURLTypesno longer containsexpo.scheme, so every deep link into the app fails (LSApplicationWorkspaceerror 115 for us).Ironic for a plugin whose job is to make sure
widgetURLcan open the app. 😄Root cause
ensureURLSchemewritesios.infoPlist.CFBundleURLTypesin the config.Expo's own
withSchememod, which is what actually fills that key fromexpo.scheme/expo.ios.schemeplus the bundle identifier, is wrapped increateInfoPlistPluginWithPropertyGuard, and that guard skips the mod entirely as soon asios.infoPlist.CFBundleURLTypesis set.The guard reads
modRawConfig, a clone taken after all plugins have run, so a plugin's own write trips it.Net effect: the plugin replaces Expo's whole scheme list with a single entry instead of adding to it.
Secondary bug in the same function:
typeof config.scheme === 'string'misses the documented array form ofscheme, so a multi-scheme app fell back to the bundle identifier.Fix
Only top up a
CFBundleURLTypeslist the app already owns. If the app hasn't set the key, leave it alone and let Expo'swithSchemedo its job (it already appends the bundle identifier, which is what the previous fallback was after).Collect schemes from both
schemeandios.scheme, string or array, and add the ones missing from a hand-written list.Testing
New
urlScheme.node.test.ts(4 cases) + fullexpo-pluginjest suite green.Verified on a real app with
expo prebuild --platform ios: before the fixInfo.plistcarried only the bundle identifier, after it the app'sexpo.schemeentries are back and deep links work again.