From 8a761ba9ac36062088f983fec950581c6d0fd1ee Mon Sep 17 00:00:00 2001 From: Chris Zubak-Skees Date: Thu, 11 Jan 2024 19:35:19 +0800 Subject: [PATCH] fix: use real_path to find plist files is update_ats Cocoapod util --- .../scripts/cocoapods/__tests__/test_utils/InstallerMock.rb | 2 ++ packages/react-native/scripts/cocoapods/utils.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/__tests__/test_utils/InstallerMock.rb b/packages/react-native/scripts/cocoapods/__tests__/test_utils/InstallerMock.rb index 6c0bfc7a353e76..b5fd92a4bce23a 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/test_utils/InstallerMock.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/test_utils/InstallerMock.rb @@ -134,10 +134,12 @@ def save() class PBXFileRefMock attr_reader :name attr_reader :path + attr_reader :real_path def initialize(name) @name = name @path = name + @real_path = name end end diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index d93183dbbe478d..a616041ef8e6b6 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -566,7 +566,7 @@ def self.get_plist_paths_from(user_project) def self.update_ats_in_plist(plistPaths, parent) plistPaths.each do |plistPath| - fullPlistPath = File.join(parent, plistPath.path) + fullPlistPath = plistPath.real_path plist = Xcodeproj::Plist.read_from_path(fullPlistPath) ats_configs = { "NSAllowsArbitraryLoads" => false,