Skip to content

Instantly share code, notes, and snippets.

@phamquochoan
Last active March 23, 2016 03:40
Show Gist options
  • Save phamquochoan/386a775e98bac214483a to your computer and use it in GitHub Desktop.
Save phamquochoan/386a775e98bac214483a to your computer and use it in GitHub Desktop.
Carthage build different targets with same name

####1. Framework Dog - for iOS ######-- target 1: Labrador ######-- target 2: GoldenRetriever Target 2 have a custom Swift Compiler Flag: -D FUR (I still don't know what -D mean)

class Dog {
  #if FUR
    var furLength: Double = 10
  #endif
  ....
}

####2. Problem I'm working on 2 apps that use this framework

So, on first app, I have to write #import Labrador

And on second app, #import GoldenRetriever

####3. Wanted solution

Is there anyway to build a specific scheme using Carthage ? i.e.

carthage build --no-skip-current; carthage archive Dog (with something that make it build only Lab or Golden..)

or

carthage build--no-skip-current; carthage archive Lab and it returns Dog.framework

In both projects, I just want to write #import Dog.

And in the future, I don't have to write #import Corgi or sth else ...

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