Git Product home page Git Product logo

tuist's Introduction

header
CI status Commit Activity Twitter Followers Slack Workspace Slack Workspace
Book us with Cal.com

πŸ•Ί What's Tuist

Tuist is a command line tool that leverages project generation to abstract intricacies of Xcode projects, and uses it as a foundation to help teams maintain and optimize their large modular projects.

It's open source and written in Swift.

⬇️ Install

The recommended installation method is to install mise and then run mise install tuist to install Tuist.

You can check out the documentation to learn more about the rationale behind our installation approach and alternative approaches.

πŸŒ€ Bootstrap your first project

tuist init --platform ios
tuist edit # Customize your project manifest
tuist generate # Generates Xcode project & workspace
tuist build # Builds your project

Check out the project "Adopting Tuist" guide to learn more about Tuist and all its features.

πŸ“ Documentation

Do you want to know more about what Tuist can offer you? Or perhaps want to contribute to the project and you need a starting point?

You can check out the project documentation.

πŸ”¬ Sample projects

You can find some sample projects in the fixtures folder or the awesome Tuist repo! πŸŽ‰

πŸ’° Sponsors

The financial sustainability of the project is possible thanks to the ongoing contributions from our GitHub Sponsors and Open Collective Backers. From them, we'd like to give a special mention to the following sponsors:

πŸ₯‡ Gold Sponsors

mondaycom_logo Monday.com is a cloud-based work operating system (Work OS) that empowers teams to run projects and workflows with confidence. It's a versatile platform that combines features of project management, workflow automation, and team collaboration to streamline the way teams work together.
lapse_logo Lapse is an app designed to reclaim how we take and share memories. A camera for living in the moment and a private photo journal for friends, not followers.

πŸ₯ˆ Silver sponsors

stream_logo Stream helps build scalable in-app chat or activity feeds in days. Product teams trust Stream to launch faster, iterate more often, and ship a better user experience.
runway_logo Runway streamlines collaboration and automation for mobile app releases, from kickoff to rollout.
emerge_logo Emerge Tools is a suite of revolutionary products designed to supercharge mobile apps and the teams that build them.
codemagic_logo Codemagic is a CI/CD tool for building world-class mobile apps.

πŸ₯‰ Bronze sponsors

macpaw_logo asana_logo

πŸ’ͺ Companies using Tuist

tv2_logo depop_logo bendingspoons_logo globekeeper_logo getyourguide_logo
emplate_logo hh_logo trendyol_logo angrynerds_logo compass_logo
wefox_logo hedvig_logo takeoutcentral_logo olx_logo justeattakeaway_logo
dodopizza_logo olimpbet_logo vk_logo kinopoisk_logo qnips_logo
telepass_logo crunchyroll_logo

πŸ™‡β€ ️Supported by great companies

Great companies support the project by giving us access to their service through an open-source program.

1password_logo bugsnag_logo calcom_logo codemagic_logo

πŸ§‘β€πŸ’» Want to contribute?

You can use our contribution docs to get started. If you don't have a specific issue in mind, we are more than happy to help you, just ask for help in a given issue or on our Slack. You can find good issues for first-time contributors here. We also offer issue bounties for some highly-valued issues.

✨ Core Team


Pedro PiΓ±era


Marek FoΕ™t


Kas


Daniele Formichelli


Mike Simons

πŸš€ Core Alumni

The following people were once core contributors helping steer the project in the right direction and ensuring we have a reliable foundation we can build new features upon:


Natan Rolnik


Andrea Cipriani


Oliver Atkinson


Romain Boulay


Kamil Harasimowicz


Luis Padron

Alfredo Delli Bovi

✨ Contributors

Thanks goes to these wonderful people:


kalkwarf

Marek FoΕ™t

Kas

Natan Rolnik

svastven

Bernhard Huemer

Daniel Jankowski

Facundo Menzella

Eric Ito

Kamil Harasimowicz

Jakub OlejnΓ­k

ldindu

George Tsifrikas

Privezentsev Yura

Fero

Heberti Almeida

Ben Scheirman

Jared Sorge

Joe Blau

David Chavez

Roman Podymov

Marcin Religa

Alfredo Delli Bovi

Jake Prickett

Daniele Formichelli

Sergey Petrachkov

Jinwoo, Kim

David Harris

Dmytro Mishchenko

Sam Pettersson

Josh Holtz

Jierong Li

Shai Mishali

Franz Busch

TΓ­arnΓ‘n McGrath

Vitaly Chupryk

Roman Blum

Giovanni Filaferro

AndrΓ©s PizΓ‘ BΓΌckmann

Gabriel Coutinho

Riccardo

Mauro Bolis

Peter Weishapl

Cruz

Sven MΓΌnnich

Santiago A. Delgado

Wojciech Kulik

Iain Smith

Max Kraev

Mustafa Yusuf

Daniel Barden

Zofia Kulus

David Peterson

Ikko Ashimine

Seto Elkahfi / ε‘žζ‰˜Β·εŸƒε°”ε‘θ²

apps4everyone

Lorenzo

Darko Damjanovic

Marvin Nazari

Robin Malhotra

Astromonkee

ezraberch

Christopher Constable

Yi Wang

Mustafa Dur

Luca Bartoletti

Sujata Chakraborty

Pavel Trafimuk

Alejandro Silva FernΓ‘ndez

Jake Adams

Sam Watts

Erk Ekin

Denis Morozov

orbitekk

Park Jae Hyun

Sean Berry

Isaac Halvorson

Mohit Saxena

MikoΕ‚aj Chmielewski

Tope Akinwande

TheInkedEngineer

Alexander Weiß

kyungpyoda

Ville Witt

paul.s

aniltaskiran

Javier Vieira

Aris Sarris

kimxwan0319

Florian Fittschen

Jesus (iOS)

Nicholas Kim

Alexandros Smponias

Go

Alberto Garcia

Andrea Scuderi

Diogo Autilio

Shahzad Majeed

Dan

Nikita Ivanchikov

Anastasia Kazantseva

Michael McGuire

Michael Collins

YoHan Cho

euriasb

MontakOleg

oozoofrog

Martin Strambach

sh-a-n

Batuhan Saka

SooHwanCho

Gary Riches

mustiikhalil

Serhii Butenko

Petrukha Ivan

Mathias Schreck

Yen-Chia Lin

Mary

Hyunjin

Kevin Aguilar

Andrew Roan

ibrahim oktay

Dmitriy Kulakov

Jaewon-Yun

tatagrigory

Denil Chungath

Victor Sarda

tzxdtc10

Thieme

Clemens Beck

Paul Taykalo

Vitaly Kravtsov

dc

baegteun

VinΓ­cius Couto Tasso

μ•ˆμ§€ν›ˆ

Dimash

danibachar

ν•œμ„ν˜Έ(MilKyo)

Hai Feng Kao

Antti Laitala

PushedCrayon

Stefano Mondino

Łukasz Lech

costapombo

Ihor Savynskyi

tuist's People

Contributors

actions-user avatar adamkhazi avatar adellibovi avatar alexanderwe avatar allcontributors[bot] avatar andreacipriani avatar danieleformichelli avatar danyf90 avatar dependabot-preview[bot] avatar dependabot[bot] avatar depfu[bot] avatar ezraberch avatar facumenzella avatar fortmarek avatar hisaac avatar kodiakhq[bot] avatar kwridan avatar lakpa avatar laxmorek avatar luispadron avatar marciniwanicki avatar mollyiv avatar natanrolnik avatar olejnjak avatar ollieatkinson avatar pepicrft avatar regularberry avatar romainboulay avatar vytis avatar waltflanagan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tuist's Issues

Document ProjectDescription models

Context πŸ•΅οΈβ€β™€οΈ

ProjectDescription is the framework that contains models to define projects. Since this is one of the public interfaces of Tuist, it's important that it's well documented.

What 🌱

Make sure all the models that are part of the framework are well documented. Moreover, make sure that the Jazzy configuration generates the right documentation for those models.

Note: Since we plan to add support for other manifest formats such as .json or .yaml, it's important that attributes specify the key that should be used for those formats.

Dependencies via HTTPs

First of all, thanks for open sourcing this amazing project. 🎩 off

Issue
I recently faced the same issue described by #73 when installing Tuist in a new machine in which I did not have my SSH certificates configured yet.

Since Github started recommending HTTPs over SSH to clone repos, I think this issue might be faced for more people in the future.

I think defining the dependencies via HTTPs might avoid those issues.

Additional context

Definition of dependencies via SSH
https://github.com/tuist/tuist/blob/master/Package.swift#L15

The documentation to install Tuist via Homebrew also relies on SSH:
https://github.com/tuist/tuist/blame/master/README.md#L24

Github recommends HTTPs over SSH here
https://help.github.com/articles/which-remote-url-should-i-use/#cloning-with-https-urls-recommended

Updating from the command doesn't work

Describe the bug
If you try to update the app running xpm update it fails after downloading the new version.

To Reproduce
Steps to reproduce the behavior:

  1. Get an old version of xpm.
  2. Run xpm update.
  3. It fails.

Expected behavior
The app should get updated.

Notes
Since xpm is a command line tool, we can maybe get rid of the Sparkle complexity and build something ourselves. It'd need to pull the zip from the releases page, unzip the app, and replace the current one.

Auto-update Carthage dependencies

Context πŸ•΅οΈβ€β™€οΈ

Targets can depend on precompiled frameworks. Tuist checks that those frameworks exit in the project before running anything. If those frameworks are generated by Carthage, the developer might forget to run Carthage before using Tuist, resulting oinan error from Tuist that cannot continue unless those files exist.

What 🌱

Since we can infer from the path whether a framework is generated or not by Carthage, we could run the Carthage update command ourselves. If we detect Carthage needs to be run, we compare the Cartfile with the Cartfile.lock file and if it changed, we pull the Carthage dependencies before continuing executing anything.

Set up build phases for extensions

Context πŸ•΅οΈβ€β™€οΈ

Products of type extension are copied into the app that they are extending through a build phase. The current generation logic doesn't take that into account and thus, defining extensions in xpm is not fully supported.

What 🌱

Ensure that all kinds of extensions are supported. That includes, watch, iMessage, stickers and tv extension.

  • Add the following linting:
    • Watch extension has the right bundle id.
    • Watch extensions have a dependency with the app that they are extending. The app exists and the platform its platform is compatible with the extension's.

Don't fail if a Carthage framework doesn't exist in the folder

Context πŸ•΅οΈβ€β™€οΈ

If you try to run any Tuist command on a project that depends on a Carthage framework that doesn't exist, it fails.

What 🌱

Instead of failing, print a warning telling developers to update the Carthage dependencies.

Auto-create schemes

Context πŸ•΅οΈβ€β™€οΈ

Since the API hides the concept of a scheme, which is considered aanXcode implementation detail, we need to generate a basic list of schemes that allows developers:

  • Build and test targets individual targets
  • Build and test all the targets of a project.

What 🌱

  • Create a scheme per target.
  • Create a scheme for all the targets.

Project playgrounds

Is your feature request related to a problem? Please describe.
Xcode Playgrounds are very useful for:

  • Documenting a framework.
  • Showing some examples of how to use the API of a framework.

Describe the solution you'd like
It'd be great if a project could specify a list of playgrounds that would get added to the project.

Option 1
Pass a path to a folder where all the playgrounds are contained:

let project = Project(playgrounds: ["./Playgrounds"])

Option 2
Don't pass anything and read the playgrounds from the Playgrounds directory in the folder where the project is defined.

Describe alternatives you've considered
Not having support for Playgrounds at all.

Version 1.0 checklist

Context πŸ•΅οΈβ€β™€οΈ

This issue contains all the work that needs to be done for the first tool release.

What 🌱

  • Update Init command to generate a Workspace.swift, Project.swift and Config.swift.
  • Validate dependencies (platforms, products, bundle_ids)
  • Generate ProjectDescription target that contains the .swift manifests.
  • Add a launch check that fails the execution if the version of Swift in the system is not compatible with the version of Swift the frameworks were compiled with.
  • Framework embedder.
  • Add version command.
  • Fix auto-updater not working.
  • Implement macOS application.

Build settings are passed as user-defined value

Describe the bug
Build setting passed as user-defined value in generated projects

To Reproduce

        Target(
            name: "______",
            platform: .iOS,
            product: .app,
            bundleId: "com.xcodepm._____",
            infoPlist: "____/Info.plist",
            sources: "____/**",
            entitlements: "____/____dev.entitlements",
            dependencies: [
                .carthage("Alamofire"),
            ],
            settings: Settings(
                base: ["SWIFT_OBJC_BRIDGING_HEADER": "${PROJECT_DIR}/___/BridgingHeader.h"],
                debug: nil,
                release: nil
            )
        )

Expected behavior
Set bridging header build setting to desired value.

Screenshots
screenshot 2018-08-21 at 00 10 14

Desktop (please complete the following information):

  • OS: macOS Mojave
  • Version beta

Test command

Context πŸ•΅οΈβ€β™€οΈ

SPM alike, Tuist can provide a command to test the project in the current directory. The command would wrap xcodebuild, simplifying the interface and inferring things whenever it's possible. For instance, we know the path to the project and workspace.

Here's the other issue to something similar for building the target.

What 🌱

Being in a folder where a project is defined, a developer could execute:

tuist test # main/default target
tuist test target

Proposal πŸŽ‰

  • Add test command which is a gateway to xcodebuild.
  • Proxy the arguments passed to xcodebuild. For example, if a -destination command is passed, we should pass it to xcodebuild.
  • Print the output from xcodebuild without any formatting. We might add some improvements here in the future, but for now, let's keep the raw output.

Build command

Context πŸ•΅οΈβ€β™€οΈ

SPM alike, Tuist can provide a command to build the project in the current directory. The command would wrap xcodebuild, simplifying the interface and inferring things whenever it's possible. For instance, we know the path to the project and workspace.

What 🌱

Being in a folder where a project is defined, a developer could execute:

tuist build # main/default target
tuist build target

Proposal πŸŽ‰

  • Add build command which is a gateway to xcodebuild.
  • Proxy the arguments passed to xcodebuild. For example, if a -destination command is passed, we should pass it to xcodebuild.
  • Print the output from xcodebuild without any formatting. We might add some improvements here in the future, but for now, let's keep the raw output.

Danger check to fail when error catching don't include the error type

Context πŸ•΅οΈβ€β™€οΈ

The current error handling strategy processes and reports all the errors that blow up to the command. In order for the strategy to work, it's crucial that errors are not captured elsewhere. That can happen if you use the Swift do { } catch { } clause without specifying the type of error that should be caught.

What 🌱

Since we don't want errors to go unnoticed, we should enforce that any error handling clause includes the error. To do that, we can implement a danger check that does pattern matching on the content of the modified files. If an issue is found, Danger should fail.

Folders are being parsed as build files

Describe the bug
If the glob pattern includes folders, we try to add them as if they were files. They are not so we should filter them out.

To Reproduce

  1. Create a `Project.swift.
  2. Create a folder Sources.
  3. Add a sources build phase with the files Sources/
  4. Run swift generate.

Expected behavior
The Xcode project generated.

Bad install instructions

The install command does not work.
Also it seems from resolved issues that theres Homebrew support, but it is not documented or linked anywhere.

Hide logs when running tests

Context πŸ•΅οΈβ€β™€οΈ

Some tests are integration tests which run the commands without injecting any mock. As a consequence, there are some logs that are printed while running the tests, polluting the output of the test runner.

What 🌱

Ensure that we don't print any log when running the tests.

Proposal πŸŽ‰

Update those tests to use the MockPrinter, which doesn't print but collects the requests for printing for testing purposes.

Bugs reporter

Is your feature request related to a problem? Please describe.
We used to use Sentry but we removed it because it didn't add much value. Since we are using GitHub to track issues we could implement a utility within the project that creates issues when bugs are raised. It should first search if there's already another issue with the same error. If there is, we should point the developer to that one. If not, we should create one and let the developer know.

Describe alternatives you've considered

  • Tracking services: They are not free and most of them print logs, polluting the output from xpm.

Use Codable API instead of JSONConvertible

Is your feature request related to a problem? Please describe.
Currently there's a custom implementation for JSON - is there a reason that we don't use the Codable API?

Describe the solution you'd like
Remove https://github.com/xcode-project-manager/xpm/blob/master/Sources/ProjectDescription/JSON.swift and make the models implement Codable API. (https://developer.apple.com/documentation/swift/codable)

Describe alternatives you've considered
The alternative is to avoid doing the work and keep the current system

Broken root groups references

Describe the bug
The root groups in the generated projects don't refer the systems folder properly. If you do right click, and then "Show in Finder" it misleads to another folder.

To Reproduce

  1. Generate a project using xpm.
  2. Right click on one of the root groups.
  3. Select "Show in Finder"

Expected behavior
Open the right folder on Finder.

Deprecate the context classes/protocols

Context πŸ•΅οΈβ€β™€οΈ

Besides being able to inject dependencies through one instance, there isn't outstanding benefit to justify its usage.

What 🌱

Deprecate the context-related protocols and classes to avoid developers from using it in the future and warn them to refactor the code whenever it's possible to stop using it.

generate-xcodeproj fails fetching dependencies

Describe the bug

~ swift package generate-xcodeproj
Fetching https://github.com/apple/swift-package-manager
Fetching [email protected]:xcode-project-manager/xcodeproj.git
Fetching https://github.com/tadija/AEXML.git
Fetching [email protected]:Bouke/Glob.git
error: failed to clone; Cloning into bare repository '/Users/freak4pc/Work/Libs/xpm/.build/repositories/xcodeproj.git-7308023860412066479'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
'xpm' /Users/freak4pc/Work/Libs/xpm: error: product dependency 'Utility' not found
'xpm' /Users/freak4pc/Work/Libs/xpm: error: product dependency 'Utility' not found
'xpm' /Users/freak4pc/Work/Libs/xpm: error: product dependency 'Utility' not found
'xpm' /Users/freak4pc/Work/Libs/xpm: error: product dependency 'xcodeproj' not found
'xpm' /Users/freak4pc/Work/Libs/xpm: error: product dependency 'Utility' not found`

Not sure if I'm doing anything wrong.

Document ProjectDescription code

Context πŸ•΅οΈβ€β™€οΈ

The target ProjectDescription contains the public interface that developers have access to when they import the framework from their Project.swift files. Although some of the code there is documented, not all of it is.

What 🌱

Make sure everything is documented.

Don't include the tuistenv binary in the repository

Context πŸ•΅οΈβ€β™€οΈ

The tuistenv binary is currently included in the repository. As a consequence, working on the git repository might be a bit slow since the binary needs to be pulled.

What 🌱

There's no need to have the binary in the repository. We can tie its versioning with tuist's and include the binary as an artifact of the release.

Proposal πŸŽ‰

  • Remove all tuistenv references in the repository.
  • Update install the script to take the binary from the latest available release.
  • Mention in the release process that the binary needs to be attached to the release on GitHub.

Replace some dependencies with SPM

The following dependencies can be replaced by frameworks from the SPM project:

  • Unbox.
  • SwiftCLI.
  • ColorizeSwift.
  • SwiftShell.
  • PathKit.

The goal of this task is to replace those with the ones from the SPM and get rid of the Swifter dependency that is not being used. By depending on SPM packages we make sure those are actively maintained and the project is very aligned with Apple's standards.

Missing documentation

Well, in general, but mostly for Configurations that we are using extensively with Schemes.

Throw if the Swift version is not compatible

Context πŸ•΅οΈβ€β™€οΈ

xcbuddy relies in some precompiled frameworks that are bundled in the application bundle. If the user updates its version of Xcode, which might include a new version of Swift, xcbuddy will stop working. This will change once Swift has the ABI stability.

What 🌱

Detect this and throws instead of crashing the app.

Validate there's one headers and sources build phase.

Is your feature request related to a problem? Please describe.
It can happen that the developer defines more than one headers or sources build phase in their targets. Although the manifest format supports it, Xcode projects don't.

Describe the solution you'd like
We should detect this and fail.

Dependency graph command

What 🌱

Since Tuist supports defining dependencies between targets and projects, and we have that information when we parse the manifests, we could offer a command that exports the dependency graph. Xcode doesn't provide such feature and I think it's very useful for modular projects where it can be hard to know what depends on what.

We can use the cocoapods-dependencies library as a reference, which does the same for CocoaPods dependencies.

Proposal πŸŽ‰

Add a command that looks like:

tuist dependencies

And export the dependencies using the given format. The first implementation can export it as a JSON and we can add more formats in the future:

{
  "TargetA": {
    "project_path": "/xxx/xxx.xcodeproj",
    "product_type": "application",
    "dependencies": [
      "TargetB"
    ]
  },
  "TargetB": {
    "project_path": "/xx/xx.xcodeproj",
    "product_type": "framework",
    "dependencies": []
  }
}

Manage Transitive Dependencies

I want to be able to include all transitive dependencies inside an executable bundle.

When building an app and breaking it up by features, I want to organise them by creating static libraries. If I link one of those static libraries in my App then I also need to link every single transitive dependency.

Example:
diagram_1

In the example above, when building App I have to ensure FeatureA, FeatureB and FeatureC are all included in the "Link Binary With Libraries" build phase. Otherwise App will fail to compile due to unresolved symbols.

App
  Linked Libraries:
      - FeatureA
      - FeatureB
      - FeatureC

It can get a little more complicated too, if we start to include resource bundles.

diagram_2

In this example, App must also include the the resource bundles which are dependencies for FeatureB and FeatureC. These will be included in an Copy Files Phase.

App
  Linked Libraries:
      - FeatureA
      - FeatureB
      - FeatureC
  Copy Files Phase:
      - FeatureBResources
      - FeatureCResources

We should have the ability to automate this, otherwise the overhead in maintenance of keeping these up-to date will be costly.

Consider a more contrived example when we introduce a test bundle for FeatureA

diagram_3

Here we now have to include all the transitive dependencies for FeatureA into the FeatureATest executable bundle.

FeatureATest
  Linked Libraries:
      - FeatureA
      - FeatureC
  Copy Files Phase:
      - FeatureCResources

Now scale this with more projects and more features and you then have quite a difficult task to manage them all.

Describe alternatives you've considered

This could be written externally from the project inside a different tool.
This could not be done at all, and transitive dependencies would have to manually be managed.

Additional context

Static Libraries do cause a bit of an issue when managing these transitive dependencies and trying to build them in the correct order. We need some way to force this, I experimented a few ways and have found the below method to be the least-intrusive method.

https://github.com/facebook/buck/blob/724d0741f130ede31671ecdbb65add1d2b6e02ac/src/com/facebook/buck/apple/project_generator/ProjectGenerator.java#L1117-L1127

If the current target, which is non-shared (e.g., static lib), depends on other focused targets which include Swift code, we must ensure those are treated as dependencies so that Xcode builds the targets in the correct order. Unfortunately, those deps can be part of other projects which would require cross-project references.

Thankfully, there's an easy workaround because we can just create a phony copy phase which depends on the outputs of the deps (i.e., the static libs). The copy phase will effectively say "Copy libX.a from Products Dir into Products Dir" which is a nop. To be on the safe side, we're explicitly marking the copy phase as only running for deployment postprocessing (i.e., "Copy only when installing") and disabling deployment postprocessing (it's enabled by default for release builds).

By investigating into the above, these are the changes which get made to a modules xcodeproj when creating a copy files phase and adding a dependency to another module build product.

-- File Reference -- 

FE49F8B22101BD0200DF2D9E /* libFeatureA.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libFeatureA.a; sourceTree = BUILT_PRODUCTS_DIR; };

-- Build File --

FE49F8B32101BD0700DF2D9E /* libFeatureA.a in [MyProject] Dependencies */ = {isa = PBXBuildFile; fileRef = FE49F8B22101BD0200DF2D9E /* libFeatureA.a */; };

-- Group --

FE49F8B22101BD0200DF2D9E /* libFeatureA.a */,

-- Copy Phase --

FE49F8B02101BCE300DF2D9E /* [MyProject] Dependencies */ = {
    isa = PBXCopyFilesBuildPhase;
    buildActionMask = 8;
    dstPath = "";
    dstSubfolderSpec = 16;
    files = (
        FE49F8B32101BD0700DF2D9E /* libFeatureA.a in [MyProject] Dependencies */,
    );
    name = "[MyProject] Dependencies";
    runOnlyForDeploymentPostprocessing = 1;
};

Generate Project.swift from existing Xcodeproj

Is your feature request related to a problem? Please describe.
It would be nice to have the ability to convert an existing project to XPM, this would generally be a one-shot thing and would be done to easier on-board projects.

Describe the solution you'd like

An additional command for xpm to migrate an existing xcodeproj

xpm migrate

This would also have to resolve any dependencies, and would be great if it can traverse for other nested projects and automatically convert them too.

e.g.

.
β”œβ”€β”€ Modules
β”‚Β Β  β”œβ”€β”€ Core
β”‚Β Β  β”‚Β Β  └── Core.xcodeproj
β”‚Β Β  β”œβ”€β”€ FeatureA
β”‚Β Β  β”‚Β Β  └── FeatureA.xcodeproj
β”‚Β Β  └── Result
β”‚Β Β      └── Result.xcodeproj
β”œβ”€β”€ MyApp.xcodeproj
└── MyApp.xcworkspace

migrates to

.
β”œβ”€β”€ Modules
β”‚Β Β  β”œβ”€β”€ Core
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Core.xcodeproj
β”‚Β Β  β”‚Β Β  └── Project.swift
β”‚Β Β  β”œβ”€β”€ FeatureA
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ FeatureA.xcodeproj
β”‚Β Β  β”‚Β Β  └── Project.swift
β”‚Β Β  └── Result
β”‚Β Β      β”œβ”€β”€ Project.swift
β”‚Β Β      └── Result.xcodeproj
β”œβ”€β”€ MyApp.xcodeproj
β”œβ”€β”€ MyApp.xcworkspace
β”œβ”€β”€ Project.swift
└── Workspace.swift

Describe alternatives you've considered
The alternative is not integrating this directly into xpm but having an alternative tool which can be used to perform the migration.

Generate reference pages

What πŸ•΅οΈβ€β™€οΈ

Like CocoaPods does to document the syntax of the Podfile and the .podspec files, we should have a reference on the website as well. The reference is useful for developers to know which attributes are available in the API and their keys when defining the manifests as a yaml or json.

Ideas backlog

Context πŸ•΅οΈβ€β™€οΈ

This issue contains a backlog of ideas with high potential to become part of xpm in the future.

What 🌱

  • Tasks definition (i.e. Sake)
  • Certificates management
  • Apps publishing from the terminal

Bundle releases

Context πŸ•΅οΈβ€β™€οΈ

When tuistenv installs a new version, it pulls the source code, compiles it, and copies the files to the right folder in the system. That takes time which could be avoided if it pulled an already-compiled version of Tuist.

What 🌱

With every release, include a tuist.zip file that contains the release artifacts (binary, frameworks and swiftmodules). When tuistenv tries to install a new version, it pulls it if the bundle exist, otherwise, it falls back to the current process that compiles the source code.

Proposal πŸŽ‰

  • Create a make task that compiles and generates the release zip file.
  • Update the release document.
  • Change tuistenv to use the bundled release if it exists.

Document generation

Add a Rake task to generate xcbuddyKit documentation and include it as part of the release process.

Generate a scheme that includes all the targets

Is your feature request related to a problem? Please describe.
Generate a scheme that includes all the targets that are part of the project. We can call that scheme: XXXProject where XXX is the name of the project.

Describe the solution you'd like
Update the generator to generate that scheme.

Blog post title and description not showing up when sharing it

Describe the bug
If you share a blog post on the social networks, the generated card doesn't show up the blog post title and description.

To Reproduce

  1. Share blog post.
  2. Look at the generated preview.

Expected behavior
The share item should have the blog post title and description.

Screenshots
image

Support initialising a React Native app

Context πŸ•΅οΈβ€β™€οΈ

The current version of the init command only supports initializing an app or a framework for iOS, macOS and tvOS.

What 🌱

The goal of this task is to support initializing an app for React Native:

tuist init --platform ios --product application --react-native

Support JSON and YAML manifests

Is your feature request related to a problem? Please describe.
The current version of Tuist outputs the Swift manifests as a JSON and then reads them. We could easily add support for other formats such as .json and .yaml.

Describe the solution you'd like

  • Change ManifestLoader to support reading files with other extensions.
  • Update mentions to Project.swift or Workspace.swift files and remove the extension.

Describe alternatives you've considered
The alternative would be keeping the Swift format as the only supported one. This format has clear advantages over the other formats, like reusability and editability using Xcode, but we should allow developers choose the format suits their needs best.

Additional context

  • For JSON we can use the JSON decoder that is provided by Foundation.
  • For Yaml we can use Yams

Run command

Context πŸ•΅οΈβ€β™€οΈ

When you are developing an app, the most common action that developers perform is running the app on the system or on a simulator. Unfortunately, this action is not supported by xcodebuild which only allows building or testing a scheme.

What 🌱

Provide a run action from tuist:

tuist run Target

Proposal πŸŽ‰

When we execute the action:

  • It compiles the given target.
  • Looks up the build product.
  • Installs it on the simulator that the developer selects
  • Launches the app and the simulator.

We could remember the last simulator that the developer used and suggest using that one the next time.

[Error] Cannot find Carthage framework

Describe the bug
Generating a project with Carthage dependency ends up with error.

❌ Error: /bin/bash: file /Users/__/projects/___/____/Carthage/Build/iOS/Alamofire.framework/Alamofire: No such file or directory

To Reproduce
Steps to reproduce the behavior:
Add carthage dependency to target with .framework(path: "Carthage/Build/iOS/Alamofire.framework"),

Expected behavior
Generates projects with linked binary to Alamofire.framework

Desktop (please complete the following information):

  • OS: macOS 10.14 Mojave
  • Version Beta 5

Cartfile

github "Alamofire/Alamofire"

Project.swift:

import ProjectDescription

let project = Project(name: "tuistTest",
                      targets: [
                        Target(name: "tuistTest",
                               platform: .iOS,
                               product: .app,
                               bundleId: "com.xcodepm.tuistTest",
                               infoPlist: "Info.plist",
                               sources: "Sources/**",
                               dependencies: [
                                    .framework(path: "Carthage/Build/iOS/Alamofire.framework")
                                ]),
                        Target(name: "tuistTestTests",
                               platform: .iOS,
                               product: .unitTests,
                               bundleId: "com.xcodepm.tuistTestTests",
                               infoPlist: "Info.plist",
                               sources: "Tests/**",
                               dependencies: [
                                    .target(name: "tuistTest")
                               ])
                      ])

command tuist generate

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.