Skip to content

Commit

Permalink
Support for Xcode 11 new attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkoutso committed Jun 4, 2019
1 parent 4ad5b68 commit 5f0cace
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

##### Enhancements

* None.
* Updated latest SDK versions for the release of Xcode 11.0.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#687](https://github.com/CocoaPods/Xcodeproj/pull/687)

##### Bug Fixes

Expand Down
7 changes: 4 additions & 3 deletions lib/xcodeproj/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ module Constants

# @return [String] The last known object version to Xcodeproj.
#
LAST_KNOWN_OBJECT_VERSION = 51
LAST_KNOWN_OBJECT_VERSION = 52

# @return [String] The last known object version to Xcodeproj.
#
LAST_UPGRADE_CHECK = '1020'
LAST_UPGRADE_CHECK = '1100'

# @return [String] The last known object version to Xcodeproj.
#
LAST_SWIFT_UPGRADE_CHECK = '1020'
LAST_SWIFT_UPGRADE_CHECK = '1100'

# @return [String] The version of `.xcscheme` files supported by Xcodeproj
#
Expand Down Expand Up @@ -126,6 +126,7 @@ module Constants
# @return [Hash] The compatibility version string for different object versions.
#
COMPATIBILITY_VERSION_BY_OBJECT_VERSION = {
52 => 'Xcode 11.0',
51 => 'Xcode 10.0',
50 => 'Xcode 9.3',
48 => 'Xcode 8.0',
Expand Down
2 changes: 2 additions & 0 deletions lib/xcodeproj/project/object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ def inspect
end

# Now load the concrete subclasses.
require 'xcodeproj/project/object/swift_package_remote_reference'
require 'xcodeproj/project/object/swift_package_product_dependency'
require 'xcodeproj/project/object/build_configuration'
require 'xcodeproj/project/object/build_file'
require 'xcodeproj/project/object/build_phase'
Expand Down
8 changes: 8 additions & 0 deletions lib/xcodeproj/project/object/build_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ class PBXBuildFile < AbstractObject
PBXReferenceProxy,
]

# @return TODO
#
has_one :product_ref, XCSwiftPackageProductDependency

# @return TODO
#
attribute :platform_filter, String

#---------------------------------------------------------------------#

public
Expand Down
10 changes: 7 additions & 3 deletions lib/xcodeproj/project/object/native_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class AbstractTarget < AbstractObject
#
has_many :dependencies, PBXTargetDependency

# @return [ObjectList<XCSwiftPackageProductDependency>] TODO
#
has_many :packageProductDependencies, XCSwiftPackageProductDependency

public

# @!group Helpers
Expand Down Expand Up @@ -309,7 +313,7 @@ def new_shell_script_build_phase(name = nil)
# Adds a file reference for one or more system framework to the project
# if needed and adds them to the Frameworks build phases.
#
# @param [Array<String>, String] name
# @param [Array<String>, String] names
# The name or the list of the names of the framework.
#
# @note Xcode behaviour is following: if the target has the same SDK
Expand Down Expand Up @@ -359,7 +363,7 @@ def add_system_framework(names)
# Adds a file reference for one or more system dylib libraries to the project
# if needed and adds them to the Frameworks build phases.
#
# @param [Array<String>, String] name
# @param [Array<String>, String] names
# The name or the list of the names of the libraries.
#
# @return [void]
Expand All @@ -385,7 +389,7 @@ def add_system_library_extension(names, extension)
# Adds a file reference for one or more system tbd libraries to the project
# if needed and adds them to the Frameworks build phases.
#
# @param [Array<String>, String] name
# @param [Array<String>, String] names
# The name or the list of the names of the libraries.
#
# @return [void]
Expand Down
4 changes: 4 additions & 0 deletions lib/xcodeproj/project/object/root_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class PBXProject < AbstractObject
#
attribute :project_root, String, ''

# @return TODO
#
has_many :package_references, XCRemoteSwiftPackageReference

# @return [Array<ObjectDictionary>] any reference to other projects.
#
has_many_references_by_keys :project_references,
Expand Down
19 changes: 19 additions & 0 deletions lib/xcodeproj/project/object/swift_package_product_dependency.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Xcodeproj
class Project
module Object
# TODO
#
class XCSwiftPackageProductDependency < AbstractObject
# @!group Attributes

# @return [XCRemoteSwiftPackageReference] TODO
#
has_one :package, XCRemoteSwiftPackageReference

# @return [String] TODO
#
attribute :product_name, String
end
end
end
end
19 changes: 19 additions & 0 deletions lib/xcodeproj/project/object/swift_package_remote_reference.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Xcodeproj
class Project
module Object
# TODO
#
class XCRemoteSwiftPackageReference < AbstractObject
# @!group Attributes

# @return [String] TODO
#
attribute :repositoryURL, String

# @return [Hash] TODO
#
attribute :requirement, Hash
end
end
end
end

0 comments on commit 5f0cace

Please sign in to comment.