Skip to content
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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Swift 5 and Swift Package Manager #698

wants to merge 11 commits into from

Conversation

joshbillions
Copy link

Support for Swift 5 and Swift Package Manager

Copy link
Member

@alejandro-isaza alejandro-isaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -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) {
Copy link
Member

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.

Copy link
Author

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.

@@ -48,7 +48,7 @@ public class AudioPlayer: NSObject, AVAudioPlayerDelegate {
/// ````
public init?(_ name: String) {
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
try AVAudioSession.sharedInstance().setCategory(.playback)
Copy link
Member

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.

Copy link
Author

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.

@alejandro-isaza
Copy link
Member

I still see a lot to tabs and other spacing changes...

@joshbillions
Copy link
Author

Ok. I think I've got everything now.

@@ -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)))
Copy link
Member

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

// Helper function inserted by Swift 4.2 migrator.
private func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String {
return input.rawValue
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary.

@yoching
Copy link

yoching commented Jul 21, 2022

Hello. Any updates with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants