Skip to content

Commit

Permalink
better xcode 12 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
grabbou committed Dec 11, 2020
1 parent 5407353 commit d8c3e90
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,24 @@ def flipper_post_install(installer)
end
end
end

def react_native_post_install(installer)
projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
.push(installer.pods_project)

arm_value = `/usr/sbin/sysctl -n hw.optional.arm64 2>&1`.to_i

projects.each do |project|
project.build_configurations.each do |config|
if arm_value == 1 then
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
else
config.build_settings.delete("EXCLUDED_ARCHS[sdk=iphonesimulator*]")
end
end

project.save()
end
end

0 comments on commit d8c3e90

Please sign in to comment.