plasmo_xcodeproj 1.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +19 -0
  3. data/README.md +95 -0
  4. data/bin/xcodeproj +10 -0
  5. data/lib/xcodeproj/command/config_dump.rb +91 -0
  6. data/lib/xcodeproj/command/project_diff.rb +56 -0
  7. data/lib/xcodeproj/command/show.rb +60 -0
  8. data/lib/xcodeproj/command/sort.rb +44 -0
  9. data/lib/xcodeproj/command/target_diff.rb +43 -0
  10. data/lib/xcodeproj/command.rb +63 -0
  11. data/lib/xcodeproj/config/other_linker_flags_parser.rb +73 -0
  12. data/lib/xcodeproj/config.rb +386 -0
  13. data/lib/xcodeproj/constants.rb +465 -0
  14. data/lib/xcodeproj/differ.rb +239 -0
  15. data/lib/xcodeproj/gem_version.rb +5 -0
  16. data/lib/xcodeproj/helper.rb +30 -0
  17. data/lib/xcodeproj/plist.rb +94 -0
  18. data/lib/xcodeproj/project/case_converter.rb +90 -0
  19. data/lib/xcodeproj/project/object/build_configuration.rb +255 -0
  20. data/lib/xcodeproj/project/object/build_file.rb +84 -0
  21. data/lib/xcodeproj/project/object/build_phase.rb +369 -0
  22. data/lib/xcodeproj/project/object/build_rule.rb +109 -0
  23. data/lib/xcodeproj/project/object/configuration_list.rb +117 -0
  24. data/lib/xcodeproj/project/object/container_item_proxy.rb +116 -0
  25. data/lib/xcodeproj/project/object/file_reference.rb +338 -0
  26. data/lib/xcodeproj/project/object/group.rb +506 -0
  27. data/lib/xcodeproj/project/object/helpers/build_settings_array_settings_by_object_version.rb +72 -0
  28. data/lib/xcodeproj/project/object/helpers/file_references_factory.rb +245 -0
  29. data/lib/xcodeproj/project/object/helpers/groupable_helper.rb +260 -0
  30. data/lib/xcodeproj/project/object/native_target.rb +751 -0
  31. data/lib/xcodeproj/project/object/reference_proxy.rb +86 -0
  32. data/lib/xcodeproj/project/object/root_object.rb +100 -0
  33. data/lib/xcodeproj/project/object/swift_package_product_dependency.rb +29 -0
  34. data/lib/xcodeproj/project/object/swift_package_remote_reference.rb +33 -0
  35. data/lib/xcodeproj/project/object/target_dependency.rb +94 -0
  36. data/lib/xcodeproj/project/object.rb +534 -0
  37. data/lib/xcodeproj/project/object_attributes.rb +522 -0
  38. data/lib/xcodeproj/project/object_dictionary.rb +210 -0
  39. data/lib/xcodeproj/project/object_list.rb +223 -0
  40. data/lib/xcodeproj/project/project_helper.rb +341 -0
  41. data/lib/xcodeproj/project/uuid_generator.rb +132 -0
  42. data/lib/xcodeproj/project.rb +874 -0
  43. data/lib/xcodeproj/scheme/abstract_scheme_action.rb +100 -0
  44. data/lib/xcodeproj/scheme/analyze_action.rb +19 -0
  45. data/lib/xcodeproj/scheme/archive_action.rb +59 -0
  46. data/lib/xcodeproj/scheme/build_action.rb +298 -0
  47. data/lib/xcodeproj/scheme/buildable_product_runnable.rb +55 -0
  48. data/lib/xcodeproj/scheme/buildable_reference.rb +129 -0
  49. data/lib/xcodeproj/scheme/command_line_arguments.rb +162 -0
  50. data/lib/xcodeproj/scheme/environment_variables.rb +170 -0
  51. data/lib/xcodeproj/scheme/execution_action.rb +86 -0
  52. data/lib/xcodeproj/scheme/launch_action.rb +179 -0
  53. data/lib/xcodeproj/scheme/location_scenario_reference.rb +49 -0
  54. data/lib/xcodeproj/scheme/macro_expansion.rb +34 -0
  55. data/lib/xcodeproj/scheme/profile_action.rb +57 -0
  56. data/lib/xcodeproj/scheme/remote_runnable.rb +92 -0
  57. data/lib/xcodeproj/scheme/send_email_action_content.rb +84 -0
  58. data/lib/xcodeproj/scheme/shell_script_action_content.rb +77 -0
  59. data/lib/xcodeproj/scheme/test_action.rb +394 -0
  60. data/lib/xcodeproj/scheme/xml_element_wrapper.rb +82 -0
  61. data/lib/xcodeproj/scheme.rb +375 -0
  62. data/lib/xcodeproj/user_interface.rb +22 -0
  63. data/lib/xcodeproj/workspace/file_reference.rb +79 -0
  64. data/lib/xcodeproj/workspace/group_reference.rb +67 -0
  65. data/lib/xcodeproj/workspace/reference.rb +40 -0
  66. data/lib/xcodeproj/workspace.rb +277 -0
  67. data/lib/xcodeproj/xcodebuild_helper.rb +108 -0
  68. data/lib/xcodeproj.rb +29 -0
  69. metadata +208 -0
@@ -0,0 +1,86 @@
1
+ module Xcodeproj
2
+ class Project
3
+ module Object
4
+ # Apparently a proxy for a reference object which might belong another
5
+ # project contained in the same workspace of the project document.
6
+ #
7
+ # This class is used for referencing the products of another project.
8
+ #
9
+ class PBXReferenceProxy < AbstractObject
10
+ # @!group Attributes
11
+
12
+ # @return [String] the name of the reference.
13
+ #
14
+ attribute :name, String
15
+
16
+ # @return [String] the path of the referenced filed.
17
+ #
18
+ attribute :path, String
19
+
20
+ # @return [String] the file type of the referenced filed.
21
+ #
22
+ attribute :file_type, String
23
+
24
+ # @return [PBXContainerItemProxy] the proxy to the project that
25
+ # contains the object.
26
+ #
27
+ has_one :remote_ref, PBXContainerItemProxy
28
+
29
+ # @return [String] the source tree for the path of the reference.
30
+ #
31
+ # @example
32
+ # "BUILT_PRODUCTS_DIR"
33
+ #
34
+ attribute :source_tree, String
35
+
36
+ #---------------------------------------------------------------------#
37
+
38
+ public
39
+
40
+ # @!group Helpers
41
+
42
+ # Checks whether the reference is a proxy.
43
+ #
44
+ # @return [Bool] always true for this ISA.
45
+ #
46
+ def proxy?
47
+ true
48
+ end
49
+
50
+ #---------------------------------------------------------------------#
51
+
52
+ def ascii_plist_annotation
53
+ " #{name || path && File.basename(path)} "
54
+ end
55
+
56
+ # @return [String] A name suitable for displaying the object to the
57
+ # user.
58
+ #
59
+ def display_name
60
+ return name if name
61
+ return path if path
62
+ super
63
+ end
64
+
65
+ # @return [Array<PBXBuildFile>] the build files associated with the
66
+ # current reference proxy.
67
+ #
68
+ def build_files
69
+ referrers.grep(PBXBuildFile)
70
+ end
71
+
72
+ # In addition to removing the reference proxy, this will also remove any
73
+ # items related to this reference.
74
+ #
75
+ # @see AbstractObject#remove_from_project
76
+ #
77
+ # @return [void]
78
+ #
79
+ def remove_from_project
80
+ build_files.each(&:remove_from_project)
81
+ super
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,100 @@
1
+ module Xcodeproj
2
+ class Project
3
+ module Object
4
+ # This class represents the root object of a project document.
5
+ #
6
+ class PBXProject < AbstractObject
7
+ # @!group Attributes
8
+
9
+ # @return [ObjectList<AbstractTarget>] a list of all the targets in
10
+ # the project.
11
+ #
12
+ has_many :targets, AbstractTarget
13
+
14
+ # @return [Hash{String => String}] attributes the attributes of the
15
+ # target.
16
+ #
17
+ # @note The hash might contain the following keys:
18
+ #
19
+ # - `CLASSPREFIX`
20
+ # - `LastUpgradeCheck`
21
+ # - `ORGANIZATIONNAME`
22
+ #
23
+ attribute :attributes, Hash,
24
+ 'LastSwiftUpdateCheck' => Constants::LAST_SWIFT_UPGRADE_CHECK,
25
+ 'LastUpgradeCheck' => Constants::LAST_UPGRADE_CHECK
26
+
27
+ # @return [XCConfigurationList] the configuration list of the project.
28
+ #
29
+ has_one :build_configuration_list, XCConfigurationList
30
+
31
+ # @return [String] the compatibility version of the project.
32
+ #
33
+ attribute :compatibility_version, String, 'Xcode 3.2'
34
+
35
+ # @return [String] the development region of the project.
36
+ #
37
+ attribute :development_region, String, 'en'
38
+
39
+ # @return [String] whether the project has scanned for encodings.
40
+ #
41
+ attribute :has_scanned_for_encodings, String, '0'
42
+
43
+ # @return [Array<String>] the list of known regions.
44
+ #
45
+ attribute :known_regions, Array, %w(en Base)
46
+
47
+ # @return [PBXGroup] the main group of the project. The one displayed
48
+ # by Xcode in the Project Navigator.
49
+ #
50
+ has_one :main_group, PBXGroup
51
+
52
+ # @return [PBXGroup] the group containing the references to products of
53
+ # the project.
54
+ #
55
+ has_one :product_ref_group, PBXGroup
56
+
57
+ # @return [String] the directory of the project.
58
+ #
59
+ attribute :project_dir_path, String, ''
60
+
61
+ # @return [String] the root of the project.
62
+ #
63
+ attribute :project_root, String, ''
64
+
65
+ # @return [Array<XCRemoteSwiftPackageReference>] the list of Swift package references.
66
+ #
67
+ has_many :package_references, XCRemoteSwiftPackageReference
68
+
69
+ # @return [Array<ObjectDictionary>] any reference to other projects.
70
+ #
71
+ has_many_references_by_keys :project_references,
72
+ :project_ref => PBXFileReference,
73
+ :product_group => PBXGroup
74
+
75
+ def name
76
+ project.path.basename('.xcodeproj').to_s
77
+ end
78
+
79
+ def ascii_plist_annotation
80
+ ' Project object '
81
+ end
82
+
83
+ def to_hash_as(method = :to_hash)
84
+ hash_as = super
85
+ if !hash_as['packageReferences'].nil? && hash_as['packageReferences'].empty?
86
+ hash_as.delete('packageReferences') if !hash_as['packageReferences'].nil? && hash_as['packageReferences'].empty?
87
+ end
88
+ hash_as
89
+ end
90
+
91
+ def to_ascii_plist
92
+ plist = super
93
+ plist.value.delete('projectReferences') if plist.value['projectReferences'].empty?
94
+ plist.value.delete('packageReferences') if !plist.value['packageReferences'].nil? && plist.value['packageReferences'].empty?
95
+ plist
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,29 @@
1
+ module Xcodeproj
2
+ class Project
3
+ module Object
4
+ # This class represents a Swift package product dependency.
5
+ #
6
+ class XCSwiftPackageProductDependency < AbstractObject
7
+ # @!group Attributes
8
+
9
+ # @return [XCRemoteSwiftPackageReference] the Swift package reference.
10
+ #
11
+ has_one :package, XCRemoteSwiftPackageReference
12
+
13
+ # @return [String] the product name of this Swift package.
14
+ #
15
+ attribute :product_name, String
16
+
17
+ # @!group AbstractObject Hooks
18
+ #--------------------------------------#
19
+
20
+ # @return [String] the name of the Swift package.
21
+ #
22
+ def display_name
23
+ return product_name if product_name
24
+ super
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,33 @@
1
+ module Xcodeproj
2
+ class Project
3
+ module Object
4
+ # This class represents a Swift package reference.
5
+ #
6
+ class XCRemoteSwiftPackageReference < AbstractObject
7
+ # @!group Attributes
8
+
9
+ # @return [String] the repository url this Swift package was installed from.
10
+ #
11
+ attribute :repositoryURL, String
12
+
13
+ # @return [Hash] the version requirements for this Swift package.
14
+ #
15
+ attribute :requirement, Hash
16
+
17
+ # @!group AbstractObject Hooks
18
+ #--------------------------------------#
19
+
20
+ def ascii_plist_annotation
21
+ " #{isa} \"#{File.basename(display_name)}\" "
22
+ end
23
+
24
+ # @return [String] the name of the Swift package repository.
25
+ #
26
+ def display_name
27
+ return repositoryURL if repositoryURL
28
+ super
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,94 @@
1
+ module Xcodeproj
2
+ class Project
3
+ module Object
4
+ # Represents a dependency of a target on another one.
5
+ #
6
+ class PBXTargetDependency < AbstractObject
7
+ # @!group Attributes
8
+
9
+ # @return [PBXNativeTarget] the target that needs to be built to
10
+ # satisfy the dependency.
11
+ #
12
+ has_one :target, AbstractTarget
13
+
14
+ # @return [PBXContainerItemProxy] a proxy for the target that needs to
15
+ # be built.
16
+ #
17
+ # @note Apparently to support targets in other projects of the same
18
+ # workspace.
19
+ #
20
+ has_one :target_proxy, PBXContainerItemProxy
21
+
22
+ # @return [String] the name of the target.
23
+ #
24
+ # @note This seems only to be used when the target dependency is a
25
+ # target from a nested Xcode project.
26
+ #
27
+ attribute :name, String
28
+
29
+ # @return [String] the platform filter for this target dependency.
30
+ #
31
+ attribute :platform_filter, String
32
+
33
+ # @return [Array<String>] the platform filters for this target dependency.
34
+ #
35
+ attribute :platform_filters, Array
36
+
37
+ # @return [String] the product reference for this target dependency.
38
+ #
39
+ attribute :product_ref, String
40
+
41
+ public
42
+
43
+ # @!group AbstractObject Hooks
44
+ #--------------------------------------#
45
+
46
+ # @return [String] The name of the dependency.
47
+ #
48
+ def display_name
49
+ return name if name
50
+ return target.name if target
51
+ return target_proxy.remote_info if target_proxy
52
+ end
53
+
54
+ def ascii_plist_annotation
55
+ " #{isa} "
56
+ end
57
+
58
+ # @return [String] uuid of the target, if the dependency
59
+ # is a native target, otherwise the uuid of the
60
+ # target in the sub-project if the dependency is
61
+ # a target proxy
62
+ #
63
+ def native_target_uuid
64
+ return target.uuid if target
65
+ return target_proxy.remote_global_id_string if target_proxy
66
+ raise "Expected target or target_proxy, from which to fetch a uuid for target '#{display_name}'." \
67
+ "Find and clear the PBXTargetDependency entry with uuid '#{@uuid}' in your .xcodeproj."
68
+ end
69
+
70
+ # @note This override is necessary because Xcode allows for circular
71
+ # target dependencies.
72
+ #
73
+ # @return [Hash<String => String>] Returns a cascade representation of
74
+ # the object without UUIDs.
75
+ #
76
+ def to_tree_hash
77
+ hash = {}
78
+ hash['displayName'] = display_name
79
+ hash['isa'] = isa
80
+ hash['targetProxy'] = target_proxy.to_tree_hash
81
+ hash
82
+ end
83
+
84
+ # @note This is a no-op, because the targets could theoretically depend
85
+ # on each other, leading to a stack level too deep error.
86
+ #
87
+ # @see AbstractObject#sort_recursively
88
+ #
89
+ def sort_recursively(_options = nil)
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end