Closed acwright closed 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.
APPLICATION_EXTENSION_API_ONLY = YES
Quoting the doc:
When enabled, this causes the compiler and linker to disallow use of APIs that are not available to app extensions and to disallow linking to frameworks that have not been built with this setting enabled. [APPLICATION_EXTENSION_API_ONLY]
I do not really get it. Who is affected by this flag? The Mustache project itself (me), or the project that embeds the Mustache framework (the library user)? What kind of problem does it prevent? Why is it required?
MACOSX_DEPLOYMENT_TARGET = 10.10
Why is it required? Isn't Swift able to run on 10.9? How is it related to Swift support for iOS7?
IPHONEOS_DEPLOYMENT_TARGET = 8.1
Why is it required?
Thanks! I'm happy to help!
APPLICATION_EXTENSION_API_ONLY = YES
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.
MACOSX_DEPLOYMENT_TARGET = 10.10
IPHONEOS_DEPLOYMENT_TARGET = 8.1
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...
Thanks @acwright for your answer. It's pretty clear even though some mysteries remain :-) Welcome to the GRMustache.swift committers!
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!