SwiftBitmask icon indicating copy to clipboard operation
SwiftBitmask copied to clipboard

Updated for Swift 3

Open capnslipp opened this issue 7 years ago • 2 comments

Updated SwiftBitmask for Swift 3.  A bunch of syntax has changed but Swift 3 hasn't added anything that encompasses the functionality of SwiftBitmask— so it remains a much cleaner and better alternative to the Swift-default .rawValue crappery.


Eliminated usage of the Funky library, since it (still) hasn't been updated for Swift 3.

It's worth noting that the Swift 3 syntax for the things that Funky was doing here is surprisingly similar to Funky's syntax, and most cases more concise. It's plausible that the authors of Funky have abandoned work on their lib because Swift 3 added enough new functional-programming stuff to satisfy these types of workflows.

As a side-effect of removing Funky, SwiftBitmask is no longer dependent upon any CocoaPods, so removed all the CocoaPods stuff.

Unfortunately, leaving a Podfile without any required pods isn't an option— pod update warns that “[!] The Podfile does not contain any dependencies.” and the build fails with “…/SwiftBitmask/Pods/Target Support Files/Pods-SwiftBitmask/Pods-SwiftBitmask-resources.sh: No such file or directory”.

Auto-updated to Swift 3 syntax using Xcode 8.2.1, and made additional by-hand Swift 3 updates.

Performed Xcode's recommended setting updates.

capnslipp avatar Apr 10 '17 19:04 capnslipp

I also have a commit ready (that depends these changes) that makes SwiftBitmask compatible with iOS, tvOS, & watchOS.  I'll be happy to submit a PR for that if/when this Swift 3 compat is merged.

capnslipp avatar Apr 10 '17 20:04 capnslipp

Was there a problem with this PR?  I have a few other additions I'd like to contribute, but they're dependent upon Swift 3 compatibility.

Please let me know if there's anything you'd like me to do differently, or if you have any questions.  Also, if this is a case of you moving on from this library, I'd be happy to take over maintenance and upkeep of it.

capnslipp avatar Apr 16 '17 02:04 capnslipp