New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update project for Swift 5 and Xcode 11 #91
Conversation
@@ -8,5 +8,9 @@ Pod::Spec.new do |spec| | |||
spec.source = { :git => 'https://github.com/GitHawkApp/MessageViewController.git', :tag => spec.version.to_s } | |||
spec.source_files = 'MessageViewController/*.swift' | |||
spec.platform = :ios, '9.0' | |||
spec.swift_version = '4.2' | |||
if spec.respond_to?(:swift_versions) then | |||
spec.swift_versions = ['4.2', '5.0'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered putting 5.1 here, but this is supposed to match possible values for SWIFT_VERSION
, and Xcode 11 doesn't show 5.1
as a possible value 🤷♂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird! Do you have any theories on why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best guess: it's not a major upgrade that would trigger Xcode to initiate migrations of any kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today I learned about supporting multiple Swift versions for one pod, neat!
Here's a copy of the fixed deprecation: extension String.Index {
/// The offset into a string's code units for this index.
@available(swift, deprecated: 4.2, message: "encodedOffset has been deprecated as most common usage is incorrect. Use utf16Offset(in:) to achieve the same behavior.")
@inlinable public var encodedOffset: Int { get }
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -8,5 +8,9 @@ Pod::Spec.new do |spec| | |||
spec.source = { :git => 'https://github.com/GitHawkApp/MessageViewController.git', :tag => spec.version.to_s } | |||
spec.source_files = 'MessageViewController/*.swift' | |||
spec.platform = :ios, '9.0' | |||
spec.swift_version = '4.2' | |||
if spec.respond_to?(:swift_versions) then | |||
spec.swift_versions = ['4.2', '5.0'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird! Do you have any theories on why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -8,5 +8,9 @@ Pod::Spec.new do |spec| | |||
spec.source = { :git => 'https://github.com/GitHawkApp/MessageViewController.git', :tag => spec.version.to_s } | |||
spec.source_files = 'MessageViewController/*.swift' | |||
spec.platform = :ios, '9.0' | |||
spec.swift_version = '4.2' | |||
if spec.respond_to?(:swift_versions) then | |||
spec.swift_versions = ['4.2', '5.0'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today I learned about supporting multiple Swift versions for one pod, neat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, could you add a line to the changelog? 🙏
No problem! I've updated the changelog to include the 0.2.0 release as well. 0.2.1 seemed mostly release/version related, so I omitted it. I'm happy to update it for 0.2.1 as well, if you think that's needed. |
34f2cda
to
0c1bced
Compare
All good :) |
SWIFT_VERSION
from target level to project level and bumped it to5.0
String.Index.encodedOffset