Skip to content

Commit 5652811

Browse files
cipolleschihuntie
authored andcommitted
[RN][iOS] Fix flags
1 parent 7b20c5b commit 5652811

File tree

1 file changed

+4
-3
lines changed
  • packages/react-native/scripts/cocoapods

1 file changed

+4
-3
lines changed

packages/react-native/scripts/cocoapods/utils.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def self.apply_xcode_15_patch(installer, xcodebuild_manager: Xcodebuild)
137137

138138
# fix for weak linking
139139
self.safe_init(config, other_ld_flags_key)
140-
if self.is_using_xcode15_or_greter(:xcodebuild_manager => xcodebuild_manager)
140+
if self.is_using_xcode15_0(:xcodebuild_manager => xcodebuild_manager)
141141
self.add_value_to_setting_if_missing(config, other_ld_flags_key, xcode15_compatibility_flags)
142142
else
143143
self.remove_value_from_setting_if_present(config, other_ld_flags_key, xcode15_compatibility_flags)
@@ -321,7 +321,7 @@ def self.remove_value_from_setting_if_present(config, setting_name, value)
321321
end
322322
end
323323

324-
def self.is_using_xcode15_or_greter(xcodebuild_manager: Xcodebuild)
324+
def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
325325
xcodebuild_version = xcodebuild_manager.version
326326

327327
# The output of xcodebuild -version is something like
@@ -332,7 +332,8 @@ def self.is_using_xcode15_or_greter(xcodebuild_manager: Xcodebuild)
332332
regex = /(\d+)\.(\d+)(?:\.(\d+))?/
333333
if match_data = xcodebuild_version.match(regex)
334334
major = match_data[1].to_i
335-
return major >= 15
335+
minor = match_data[2].to_i
336+
return major == 15 && minor == 0
336337
end
337338

338339
return false

0 commit comments

Comments
 (0)