sean7512 / RestEssentials

Lightweight REST and JSON library for Swift.
MIT License
37 stars 12 forks source link

Make RestEssentials compatible with OSX #24

Closed H1p3ri0n closed 4 years ago

H1p3ri0n commented 4 years ago

I was looking for a true simple cross-platform Rest library when I came across RestEssentials. It is good on iOS, WatchOS and TvOS, but not for OSX.

Looking at the code, I realized you can simply put a IFDEF around the class

/// A Deserializer for UIImage public class ImageDeserializer: Deserializer {

to use NSImage instead of UIImage, and import AppKit instead of UIKit, in order to make it truly universal on all Apple OSs.

I tested the change on MacOS, and it worked great.

Do you have any plans to make a quick update to make this official?

Thanks a lot.

sean7512 commented 4 years ago

@timevision That would be a great addition, do you mind putting up a pull request with your change?

I just never had the need to use MacOS, which is why it didn't support it.

sean7512 commented 4 years ago

@timevision Version 5,0 is now compatible with OSX. It will be available on Cocoapods or Swift Package Manager later today. Thanks for the feedback!

sean7512 commented 4 years ago

Closing, please use 5.0.1 with Swift Package Manager or Cocoapods for OSX support