ronanociosoig / Tuist-Pokedex

A simple project to demonstrate how to refactor an iOS app into using one based on tuist which generates the Xcode project and workspace, and refactor it into a modular architecture. This is the accompanying articles written on Medium.com
https://ronanociosoig.medium.com
MIT License
69 stars 5 forks source link

Failed to generate project and workspace via tuist #9

Open ChaseChoi opened 2 years ago

ChaseChoi commented 2 years ago
$ tuist version 
2.6.0

$ tuist generate
`JGProgressHUD` is not a valid configured external dependency
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
icedice commented 2 years ago

I'm seeing this as well. My guess is that this is related to SPM and that Tuist uses whatever SPM version you have on your machine and that newer versions makes it fail, but this is just speculation for now.

I swapped out the SPM dependency for Carthage and now the project is generated correctly..

icedice commented 2 years ago

I figured it out. It seems like reason changes to the format of Package.resolved was causing the issue. Switching to the Swift 5.5 toolchain resolved the issue.

I would love to see Tuist either embed and use the correct toolchain or at least check that a compatible toolchain is being used...

ChaseChoi commented 2 years ago

Thank you @icedice , I have generated the project successfully.

  1. Update file Tuist-Pokedex/Tuist/Dependencies.swift
    // Tuist-Pokedex/Tuist/Dependencies.swift
    let dependencies = Dependencies(
    carthage: [
        .github(path: "JonasGessner/JGProgressHUD", requirement: .upToNext("2.0.0")),
    ],
    platforms: [.iOS]
    )
  2. Generate project
    $ tuist dependencies fetch
    $ tuist generate
ronanociosoig commented 1 year ago

FYI the most up-to-date version of this project is in another account

https://github.com/ronanociosoig-200/Tuist-Pokedex

Sorry for the slow response and confusion