From e39e9c4a60a54d3280d8516d5891cec05d5ab793 Mon Sep 17 00:00:00 2001 From: CHEN Xian-an Date: Tue, 23 Jul 2024 03:21:28 -0700 Subject: [PATCH] Not all the targets have a defined `symbol_type` (#45591) Summary: Errors occurred on running `pod install`: ``` [!] An error occurred while processing the post-install hook of the Podfile. undefined method `symbol_type' for # [redact]/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:53:in `block in get_application_targets' ``` ## Changelog: [iOS] [Fixed] - Fix error on handling privacy manifest Pull Request resolved: https://github.com/facebook/react-native/pull/45591 Reviewed By: cipolleschi Differential Revision: D60107607 Pulled By: dmytrorykun fbshipit-source-id: 316220fe54174b18c9b61775f807d5d05d9f0240 --- .../react-native/scripts/cocoapods/privacy_manifest_utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb b/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb index 098dc41206d75c..922a87abddf26d 100644 --- a/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb +++ b/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb @@ -50,7 +50,7 @@ def self.add_aggregated_privacy_manifest(installer) end def self.get_application_targets(user_project) - return user_project.targets.filter { |t| t.symbol_type == :application } + return user_project.targets.filter { |t| t.respond_to?(:symbol_type) && t.symbol_type == :application } end def self.read_privacyinfo_file(file_path)