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

Discussions about cross platform support. #337

Open
Khalian opened this issue Dec 13, 2016 · 9 comments
Open

Discussions about cross platform support. #337

Khalian opened this issue Dec 13, 2016 · 9 comments

Comments

@Khalian
Copy link
Collaborator

Khalian commented Dec 13, 2016

So I have always thought of EZSwiftExtensions as a standard library (kind of like Apache Commons).

Standard libraries of languages have the characteristic of being cross platform. So as a consequence I decided to investigate the feasibility of cross platform support.

I tried spinning up a docker container using https://github.com/swiftdocker/docker-swift. After that I tried https://swift.org/package-manager/ to bundle the module in linux. I was able to get the foundation code to work but not the IOS specific code - (UIKit).

This issue is a discussion if we want to pursue cross platform support and a plan for the same.

  1. Isolate Foundation and UI Extensions into two directories.
  2. Use swift package manager to build it in linux. Keep the devops flow using xcodebuild in IOS.
  3. Write a travis.yml script for linux only builds.
  4. Bundle and distribute the foundation subset of EZSwiftExtensions (This one is an open question on how to best address it).
@lfarah
Copy link
Collaborator

lfarah commented Dec 13, 2016

I believe our iOS framework should already come with both Foundation and UI Extensions. I don't think our iOS users should have to install both EZSwiftExtensions-UI and EZSwiftExtensions-Foundation directories separately.

@Esqarrouth
Copy link
Owner

Esqarrouth commented Dec 13, 2016

This issue was brought up about a year ago too. It wasn't ready at that time and there weren't enough non-Apple related uses of Swift back then. But times are changing.

I think instead of making 2 separate directories which will confuse the user, we could just add if cases and only compile the code the user can compile?

Like: #if os(iOS)

Also version compatibility is another similar issue. Ideally the user should be able to use the latest version of EZSwift even if they have a different version of Swift. This can be achieved by adding checks like: #if swift(>=3.0) everywhere.

@lfarah
Copy link
Collaborator

lfarah commented Dec 13, 2016

I agree with everything but the last paragraph. I think it will look like a shitshow with those #if swift(>=3.0) everywhere....

@Khalian
Copy link
Collaborator Author

Khalian commented Jan 2, 2017

Ok then should I go ahead and add #if os(iOS) on all UIKit classes (its a little concerning for me to make it architecture specific instead of separating the concerns into different folders).

@Esqarrouth
Copy link
Owner

Yeah, go ahead. But before check if there is an easier way of doing it, there just might be.

@AppsIncorporated
Copy link

Thanks guys, this will be helpful. For my MacOS and Linux apps I've had to copy code into my project that could be based on Foundation rather than UIKit. I'll much prefer being able to use the code without having to modify it.

@Khalian Khalian mentioned this issue May 28, 2017
@Khalian
Copy link
Collaborator Author

Khalian commented May 28, 2017

I am prioritizing this and started the ball rolling in : #431

@Khalian
Copy link
Collaborator Author

Khalian commented Sep 11, 2017

MacOSx support is complete as of e26ca72. I will begin work on WatchOS when I get the free time.

@lfarah
Copy link
Collaborator

lfarah commented Sep 11, 2017

Thanks @Khalian. You did an awesome job

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

No branches or pull requests

5 participants