Skip to content

Commit

Permalink
Fix for X-Code Version 15+ - Updates deployment target to 12 for each…
Browse files Browse the repository at this point in the history
… target used by react native.
  • Loading branch information
NidhiDixit09 committed Aug 8, 2024
1 parent 9ca5a54 commit f60d8e9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions branch-sdk-automation-testbed/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ target 'branch_sdk_react_native_app' do
use_flipper!()


def __xcode_15_workaround(installer)
xcode_version_output = `xcodebuild -version`
xcode_version_match = xcode_version_output.match(/Xcode (\d+(\.\d+)?)/)

if xcode_version_match
xcode_version = Gem::Version.new(xcode_version_match[1])
if xcode_version >= Gem::Version.new('15.0')
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
end
end

post_install do |installer|
react_native_post_install(installer)
Expand All @@ -42,5 +57,7 @@ target 'branch_sdk_react_native_app' do
end
end
end
__xcode_15_workaround(installer)
end

end

0 comments on commit f60d8e9

Please sign in to comment.