File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,16 @@ import { ConfigPlugin, withInfoPlist } from '@expo/config-plugins'
33const withPlist : ConfigPlugin = ( expoConfig ) =>
44 withInfoPlist ( expoConfig , ( plistConfig ) => {
55 const scheme = typeof expoConfig . scheme === 'string' ? expoConfig . scheme : expoConfig . ios ?. bundleIdentifier
6- if ( scheme ) plistConfig . modResults . CFBundleURLTypes = [ { CFBundleURLSchemes : [ scheme ] } ]
6+
7+ if ( scheme ) {
8+ const existingURLTypes = plistConfig . modResults . CFBundleURLTypes || [ ]
9+ const schemeExists = existingURLTypes . some ( ( urlType : any ) => urlType . CFBundleURLSchemes ?. includes ( scheme ) )
10+
11+ if ( ! schemeExists ) {
12+ plistConfig . modResults . CFBundleURLTypes = [ ...existingURLTypes , { CFBundleURLSchemes : [ scheme ] } ]
13+ }
14+ }
15+
716 return plistConfig
817 } )
918
You can’t perform that action at this time.
0 commit comments