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

Support for 'macOS' #28

Closed
KevinVitale opened this issue Aug 19, 2016 · 18 comments
Closed

Support for 'macOS' #28

KevinVitale opened this issue Aug 19, 2016 · 18 comments

Comments

@KevinVitale
Copy link

Just saw the video presentation, and I'm eager to use the framework. Curious what the delta is to supporting macOS, also?

@plivesey
Copy link
Owner

I haven't worked with macOS before. I don't think it would be much...Rocket Data only relies on Foundation so that should be fine right?

Consistency Manager has a depenedency on UIKit but this is only for handling UIApplicationDidReceiveMemoryWarningNotification. Is this different on macOS?

@nicksnyder
Copy link
Contributor

As a data point, it wasn't that difficult to support macOS for LayoutKit. Just need to create a new target (make sure it produces the same named library) and shim things if possible.

https://github.com/linkedin/LayoutKit/pull/11/files

@plivesey
Copy link
Owner

So UIKit is not OK for tvOS? It that's the main thing that's different, it should be really easy. But, not sure how to handle memory warnings on tvOS.

@nicksnyder
Copy link
Contributor

iOS -> UIKit (e.g. UIView, UIApplication, etc.)
macOS -> AppKit (e.g. NSView, NSApplication, etc.)

tvOS has UIKit (but this issue is about macOS)

To support both, I was able to just create shims for UIKit and AppKit
https://github.com/linkedin/LayoutKit/blob/master/LayoutKit/UIKitSupport.swift
https://github.com/linkedin/LayoutKit/blob/master/LayoutKit/AppKitSupport.swift

e.g. my code uses View which maps to UIView on iOS and NSView on macOS.
The API aren't guaranteed to be identical but they mostly are.

@plivesey
Copy link
Owner

oh haha...just noticed this is asking about macOS not iOS. Yeah, that makes sense.

So yeah, I think supporting this should be trivial. I'll take a look later today and see where I get.

@plivesey
Copy link
Owner

Update: I've worked out the code changes necessary to do this, but can't work out the code signing issues. Whenever I run tests, it says: Failed to code sign "ConsistencyManagerTests".. Unclear why it cares for mac but not for iOS...

@plivesey
Copy link
Owner

@nicksnyder did you have any problems with this for LayoutKit?

@nicksnyder
Copy link
Contributor

I don't remember running into codesign issues. I created a separate target for the macOS tests, did you do that too?

@KevinVitale
Copy link
Author

I believe Code Signing can be disabled for macOS targets

@plivesey
Copy link
Owner

I disabled it...but it still complains. My branch is osx if you have time to take a look. Will investigate more soon.

@plivesey
Copy link
Owner

@plivesey
Copy link
Owner

@plivesey
Copy link
Owner

Running into more problems with Rocket Data. It looks like I may need multiple workspaces to support this if I want to use cocoapods. I don't think you can have a Podfile which supports multiple platforms.

@asowers1
Copy link

asowers1 commented Jan 7, 2017

Howdy 👋 Would the help wanted request also apply to tvOS? I've already made some headway with ConsistencyManager: https://github.com/asowers1/ConsistencyManager-iOS/tree/as/tvOS . Also, I think you can have a Podfile that supports multiple platforms in the same workspace.

@plivesey
Copy link
Owner

plivesey commented Jan 7, 2017 via email

@asowers1
Copy link

asowers1 commented Jan 7, 2017

@hebertialmeida
Copy link
Contributor

I guess we can close this, now that we support iOS, macOS, tvOS...

@plivesey
Copy link
Owner

Agreed.

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