File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,16 +39,20 @@ post_install do |installer|
3939
4040 if target . name == "geolocator_apple"
4141 target . build_configurations . each do |config |
42- config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] ||= [ '$(inherited)' , 'BYPASS_PERMISSION_LOCATION_ALWAYS=1' ]
42+ definitions = Array ( config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] )
43+ definitions << '$(inherited)' unless definitions . include? ( '$(inherited)' )
44+ definitions << 'BYPASS_PERMISSION_LOCATION_ALWAYS=1' unless definitions . include? ( 'BYPASS_PERMISSION_LOCATION_ALWAYS=1' )
45+ config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] = definitions
4346 end
4447 end
4548
4649 target . build_configurations . each do |config |
47- config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] ||= [
48- '$(inherited)' ,
49- 'PERMISSION_LOCATION=1' ,
50- 'PERMISSION_BLUETOOTH=1' ,
51- ]
50+ definitions = Array ( config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] )
51+ definitions << '$(inherited)' unless definitions . include? ( '$(inherited)' )
52+ definitions << 'PERMISSION_LOCATION_WHENINUSE=1' unless definitions . include? ( 'PERMISSION_LOCATION_WHENINUSE=1' )
53+ definitions << 'PERMISSION_BLUETOOTH=1' unless definitions . include? ( 'PERMISSION_BLUETOOTH=1' )
54+ definitions . delete ( 'PERMISSION_LOCATION=1' )
55+ config . build_settings [ 'GCC_PREPROCESSOR_DEFINITIONS' ] = definitions
5256 end
5357 end
5458
You can’t perform that action at this time.
0 commit comments