groue / GRMustache.swift

Flexible Mustache templates for Swift
http://mustache.github.com/
MIT License
597 stars 155 forks source link

Support Carthage #6

Closed acwright closed 9 years ago

acwright commented 9 years ago

Here are the necessary build settings changes I needed to allow GRMustache.swift compile with Carthage. A couple things of note:

Hope this is at least a start to getting Carthage support to work!

groue commented 9 years ago

Hi @acwright

First, well done: I could integrate your repo using Carthage in both an iOS and an OSX app: mission accomplished!

Before I merge your pull request, would you please answer a couple of question? I'm "using" you to get a little more information about Carthage: I want to understand the impact of supporting it.

acwright commented 9 years ago

Thanks! I'm happy to help!

This setting is NOT strictly required for Carthage support to work. I probably could have removed it before the pull request... However, it is most likely a good idea to make this change. If this setting is not set to YES, the compiler will output the following warning: "warning: linking against dylib not safe for use in application extensions" (and fail to submit to App Store) when linking GRMustache against an extension target. This setting could be removed from this pull request and debated in a new issue if necessary.

More info: https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html

These are the only changes that strictly must to be made to support Carthage. Why? I honestly can't explain. Perhaps this is an issue with Carthage? All I know is that if these are not set on the projects build settings (NOT the targets!) then Carthage will fail to compile. I wish I had a better explanation. Seems like a bit of magic sauce to me... :) For this reason I submitted this pull request as more of a signpost to lead the way towards Carthage support but perhaps more investigation is required...

groue commented 9 years ago

Thanks @acwright for your answer. It's pretty clear even though some mysteries remain :-) Welcome to the GRMustache.swift committers!