@@ -94,8 +94,21 @@ post_install do |installer|
9494 # :ccache_enabled => true
9595 )
9696
97+ installer . pods_project . build_configurations . each do |config |
98+ config . build_settings [ 'OTHER_LDFLAGS' ] ||= [ '$(inherited)' ]
99+ if config . name == "Debug"
100+ config . build_settings [ 'DEAD_CODE_STRIPPING' ] = 'YES'
101+ end
102+ end
103+
97104 installer . pods_project . targets . each do |target |
98105 target . build_configurations . each do |config |
106+ if target . name == "React"
107+ if config . name == "ReleaseDevApp"
108+ config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] ||= [ ]
109+ config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] |= [ '$(inherited)' , "DEBUG=1" ]
110+ end
111+ end
99112 # Specify 'Swift Version: 5.0' for resolving archieve errors.
100113 if target . name == 'react-native-video' || target . name == 'MendixNative'
101114 config . build_settings [ 'SWIFT_VERSION' ] = '5.0'
@@ -105,4 +118,16 @@ post_install do |installer|
105118 end
106119 end
107120 end
121+
122+ # Ensure deployment_target is set correctly for all projects
123+ installer . generated_projects . each do |project |
124+ project . targets . each do |target |
125+ target . build_configurations . each do |config |
126+ config . build_settings [ 'IPHONEOS_DEPLOYMENT_TARGET' ] = deployment_target
127+ end
128+ end
129+ project . build_configurations . each do |bc |
130+ bc . build_settings [ 'IPHONEOS_DEPLOYMENT_TARGET' ] = deployment_target
131+ end
132+ end
108133end
0 commit comments