Giter VIP home page Giter VIP logo

Comments (5)

mdiep avatar mdiep commented on May 22, 2024

Depending on Xcode to Just Work™ is a dangerous game. 🚎

from carthage.

jspahrsummers avatar jspahrsummers commented on May 22, 2024

Related to/dependent upon #39.

from carthage.

jspahrsummers avatar jspahrsummers commented on May 22, 2024

After reviewing Xcode's plethora of build settings, and what other people are doing to solve this kind of “universal framework” problem, here's what I've found:

  • There are seemingly no build paths that are guaranteed to include a platform component, although some happen to sometimes.
  • Most people distribute fat iOS device + simulator binaries by manually running lipo at the end of their build. Oh, and this hasn't changed in multiple Xcode major versions (I can attest). 😞

Since we're apparently not going to get any help from the toolchain, here's what I propose:

  1. carthage build either builds for OS X or iOS, not both at once. This means we'll need to thread platform information (from the application project) through every dependency somehow. It may even disallow OS X and iOS binaries from existing in parallel, if necessary.
  2. For iOS, we automatically perform separate builds for the iphoneos and iphonesimulator SDKs, then roll them together with lipo. This depends on the built .framework having the same structure on both, but that should be acceptable, since we're only going to be building a single target (with different settings).
  3. We automatically place the built framework somewhere that is not dependent upon Xcode build settings.

This definitely has some drawbacks over my initial suggestion (most notably the first item above), but it seems good enough for a first release, and doesn't involve stepping on Xcode's toes.

@Carthage/carthage Any thoughts?

from carthage.

joshvera avatar joshvera commented on May 22, 2024

carthage build either builds for OS X or iOS, not both at once.

So I understand, we'd have to do this because the build paths don't include a path component?

For iOS, we automatically perform separate builds for the iphoneos and iphonesimulator SDKs, then roll them together with lipo.

👍

from carthage.

jspahrsummers avatar jspahrsummers commented on May 22, 2024

we'd have to do this because the build paths don't include a path component?

If you meant “platform component,” yes, that's correct.

Although it occurred to me that we could structure our built binaries in a way that allows both to exist side-by-side. For example, if the application project contained a Binaries folder, maybe we could set up Binaries/iOS and Binaries/Mac, and just ask the user to link whichever platform(s) they care about.

from carthage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.