-
Notifications
You must be signed in to change notification settings - Fork 74
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
Swift 5 and Swift Package Manager #698
base: master
Are you sure you want to change the base?
Conversation
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!
C4/Core/Color.swift
Outdated
@@ -337,15 +337,15 @@ public class Color { | |||
public extension UIColor { | |||
/// Initializes a UIColor object from a Color object. | |||
/// - parameter color: The C4 color object. | |||
public convenience init?(_ color: Color) { | |||
convenience init?(_ color: Color) { |
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.
Please use spaces for indentation.
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.
Oops. Moved 'em back to spaces.
C4/UI/AudioPlayer.swift
Outdated
@@ -48,7 +48,7 @@ public class AudioPlayer: NSObject, AVAudioPlayerDelegate { | |||
/// ```` | |||
public init?(_ name: String) { | |||
do { | |||
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback) | |||
try AVAudioSession.sharedInstance().setCategory(.playback) |
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.
All these indentation changes need to be reverted.
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.
Oops. Moved 'em back to spaces.
I still see a lot to tabs and other spacing changes... |
Ok. I think I've got everything now. |
C4/UI/AudioPlayer.swift
Outdated
@@ -48,7 +48,7 @@ public class AudioPlayer: NSObject, AVAudioPlayerDelegate { | |||
/// ```` | |||
public init?(_ name: String) { | |||
do { | |||
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback) | |||
try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category(rawValue: convertFromAVAudioSessionCategory(AVAudioSession.Category.playback))) |
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.
This can all be just .playback
C4/UI/AudioPlayer.swift
Outdated
// Helper function inserted by Swift 4.2 migrator. | ||
private func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String { | ||
return input.rawValue | ||
} |
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.
This is not necessary.
Hello. Any updates with this? |
Support for Swift 5 and Swift Package Manager