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

Adding Carthage support by marking the scheme as Shared. #4

Merged
merged 1 commit into from
May 6, 2017

Conversation

mrubin
Copy link

@mrubin mrubin commented May 4, 2017

@Jitsusama
Copy link
Owner

Interesting. I have heard of Carthage, but never dug into it. I read over their GitHub page quickly and am just wondering about a few things.

First, is all that is required is to have a xcshareddata available on your GitHub project and Carthage will automagically build it when it is define in your projects Cartfile?

Second, will Carthage automatically build the library to match your application's target platform?

@Jitsusama Jitsusama self-assigned this May 4, 2017
@mrubin
Copy link
Author

mrubin commented May 4, 2017

is all that is required is to have a xcshareddata available

Apparently so

will Carthage automatically build the library to match your application's target platform?

Yes

I am making use of this change via Carthage and it has worked as expected. Thank you for your consideration.

@Jitsusama
Copy link
Owner

Groovy. I'll hopefully take a closer look tonight at this.

@Jitsusama
Copy link
Owner

Xcode is trying to make me give up. I've tried to test that Carthage will work with just the introduction of a shared build, but when I make a simple CLI app to include my library when built via Carthage (including a Cartfile pointing to a local git repo with the change present, running cartage update and then dragging the UInt128.framework file to Linked Frameworks and Libraries), I get a runtime linking error as so:

dyld: Library not loaded: @rpath/UInt128.framework/Versions/A/UInt128
  Referenced from: /Users/jitsusama/Library/Developer/Xcode/DerivedData/TestUInt128-bkjjngsxognslugbtpineupspnms/Build/Products/Release/TestUInt128
  Reason: image not found
Program ended with exit code: 9

I set Always Embed Swift Standard Libraries to Yes and I even set Runtime Search Paths to $(inherited) @executable_path/../Frameworks @loader_path/Frameworks, but it still is being a nasty face.

Have you tried this with any of your own applications against UInt128? If so, was there a magical Xcode invocation that was required to get it to work with a Carthage built Framework?

@Jitsusama
Copy link
Owner

Alright, I figured out that those issues were not related to UInt128, or the Carthage built products, and instead is just inanity involved with CLI programs and Swift.

@Jitsusama Jitsusama merged commit 5280379 into Jitsusama:master May 6, 2017
@Jitsusama
Copy link
Owner

Thanks for the pull request! Having finally figured out how to test it, it looks great, so I've merged it in.

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

Successfully merging this pull request may close these issues.

None yet

2 participants