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

Add support for building the framework and test targets universally across all supported SDKs #19

Merged
merged 1 commit into from
Jul 5, 2016

Conversation

tonyarnold
Copy link
Contributor

I'd love to use this with Carthage on my macOS projects, but the project was configured to provide iOS only (this is an Xcode limitation, I know). I've used the xcconfig approach in this PR on a few projects now, and it works quite well, but I'd understand any reluctance to merge it in.

The main downside is that the iOS Test App now thinks it can build on macOS and presents that option in the Xcode scheme switcher. Both the framework and tests can build across everything presented.

@osteslag
Copy link
Owner

osteslag commented Jul 5, 2016

Thanks a lot for the PR, @tonyarnold. The reason I’m unsure whether we should merge it in at this point is that I don’t think Changeset supports macOS at all.

I’m not sure because it’s been many years since I developed for OS X, and I haven’t had the time to look into it. So maybe you can help me out. Don’t NSTableView and NSCollectionView interpret the change indices differently from their UIKit counterparts? In other words, will Changeset even work on macOS?

Have you tried on your own setup? Would it make sense to make a test app to verify?

@tonyarnold
Copy link
Contributor Author

Changeset doesn't contain any platform-specific code, so it compiles and works just fine under the macOS SDK.

I've imported it into a project I'm working on at present and it functions as I'd expect it to (I'm using it with both NSTableView and an NSOutlineView).

It probably makes sense to create a macOS test app, much like you've done for iOS but I don't think it's necessary.

@osteslag
Copy link
Owner

osteslag commented Jul 5, 2016

It was not so much the compilation aspect as the way the AppKit collection views interpret the indices, and in what order, that concerned me. It was to eliminate this concern I was interested in the test target.

I’ll merge and consider the macOS support experimental at this point. Please update us if you learn more about it.

@osteslag osteslag merged commit 3c310c6 into osteslag:master Jul 5, 2016
@tonyarnold
Copy link
Contributor Author

Will do. I'll try to find some more time to implement a simple test project to keep in this repo alongside the iOS example (might be a week or two: kids, life, work, etc - you know how it is!).

Thanks for merging in my changes!

@osteslag
Copy link
Owner

osteslag commented Jul 5, 2016

You bet I know how it is! :-)

Don’t worry, the project doesn’t promise macOS support. Nevertheless, we got one step closer today. If somebody wants better support, they are free – and more than welcome – to add it.

@klaaspieter
Copy link
Contributor

@tonyarnold Any idea why I'm getting the following error when trying to use Carthage and the macOS framework:

carthage bootstrap --platform osx                                                                                                                 130
*** No Cartfile.resolved found, updating dependencies
*** Fetching Changeset
*** Checking out Changeset at "bf13edd31acce5f844ee039d2576fa84f909c776"
*** xcodebuild output can be found in /var/folders/yx/fmtkd7v13fg1k8jvjwycggz80000gn/T/carthage-xcodebuild.FbOLqA.log
*** Building scheme "Changeset" in Changeset.xcodeproj
Failed to write to /Users/klaaspieter/Developer/Projects/Bilder/macOS/Carthage/Checkouts/Changeset/Carthage/Build/Mac/Changeset.framework: Error Domain=NSCocoaErrorDomain Code=260 "The file “Changeset.framework” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/klaaspieter/Library/Developer/Xcode/DerivedData/Changeset-benhhhloplketfeuintrlmkuhsrh/Build/Products/Release-iphoneos/Changeset.framework, NSUnderlyingError=0x7fe461552850 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

Maybe related: I'm using the branch from #21.

@tonyarnold
Copy link
Contributor Author

Because the SDKROOT of the project has been set to iOS. It needs to be empty for Universal builds to work.

@tonyarnold tonyarnold deleted the feature/universal-framework branch October 7, 2016 03:23
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.

None yet

3 participants