File tree 1 file changed +10
-1
lines changed
packages/react-native-video/src/expo-plugins
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,25 @@ export const writeToPodfile = (
11
11
const podfilePath = path . join ( projectRoot , 'ios' , 'Podfile' ) ;
12
12
const podfileContent = fs . readFileSync ( podfilePath , 'utf8' ) ;
13
13
14
- if ( podfileContent . includes ( `$${ key } =` ) ) {
14
+ // This is for internal purposes only. We are removing the ENV checks from the Podfile.
15
+ // If this conflicts with your project's setup, please let report it to us.
16
+ const regex =
17
+ / i f E N V \[ ' R N V _ S A M P L E _ E N A B L E _ A D S ' \] \s * \n \s * \$ R N V i d e o U s e G o o g l e I M A \s * = \s * ( t r u e | f a l s e ) \s * \n e n d \n * | i f E N V \[ ' R N V _ S A M P L E _ V I D E O _ C A C H I N G ' \] \s * \n \s * \$ R N V i d e o U s e V i d e o C a c h i n g \s * = \s * ( t r u e | f a l s e ) \s * \n e n d \n * / g;
18
+
19
+ const podfileContentWithoutEnv = `{${ podfileContent } }` . replace ( regex , '' ) ;
20
+
21
+ if ( podfileContentWithoutEnv . includes ( `$${ key } =` ) ) {
15
22
console . warn (
16
23
`RNV - Podfile already contains a definition for "$${ key } ". Skipping...` ,
17
24
) ;
18
25
return ;
19
26
}
20
27
21
28
if ( testApp ) {
29
+ console . log ( 'RNV - Writing to Test App Podfile' ) ;
22
30
mergeTestAppPodfile ( podfileContent , podfilePath , key , value ) ;
23
31
} else {
32
+ console . log ( 'RNV - Writing to Expo Podfile' ) ;
24
33
mergeExpoPodfile ( podfileContent , podfilePath , key , value ) ;
25
34
}
26
35
} ;
You can’t perform that action at this time.
0 commit comments