Closed zdnk closed 2 years ago
any pointer where/what is the issue?
same on 2.0.1
Hey @zdnk 👋 Could you please attach a sample project to reproduce the issue (e.g. as done here)?
I am unable to reproduce it in clean project :/ No idea what the issue is.
Figured it out, it only occurs when:
import ProjectDescription
let baseSettings = SettingsDictionary()
.bitcodeEnabled(true)
let project = Project(
name: "TuistApollo",
settings: .settings(base: baseSettings),
targets: [
// App
.init(
name: "App",
platform: .iOS,
product: .app,
productName: "TuistApollo",
bundleId: "com.TuistApollo.application",
deploymentTarget: .iOS(targetVersion: "14.0", devices: .iphone),
infoPlist: .default,
sources: [
"Targets/TuistApollo/Sources/*.swift",
],
dependencies: [
.external(name: "Apollo"),
.target(name: "API"),
]
),
.init(
name: "API",
platform: .iOS,
product: .framework,
productName: "API",
bundleId: "com.TuistApollo.api",
deploymentTarget: .iOS(targetVersion: "14.0", devices: .iphone),
infoPlist: .default,
sources: [
"Targets/TuistAPI/Sources/*.swift",
],
dependencies: [
.external(name: "Apollo"),
]
),
]
)
here is the whole example project: https://github.com/zdnk/tuist-apollo-dependency-example
@zdnk could you update the first message with:
Done, hope thats enough.
UPDATE: seems to happening for any dependency linked to framework which is then linked to app.
Any idea what's causing this? I had to revert back to using packages in Project.swift
I think the problem is the .bitcodeEnabled(true)
setting.
I think that in order to enable bitcode in your target, all its dependencies needs to have bitcode enabled as well.
Not sure if/how tuist is handling it at the moment (regardless of the SPM dependencies integration), maybe @kwridan, @pepibumur, or @fortmarek knows more 🙏
Well, as I mentioned, I check the projects generated for SPM dependencies and they actually have Bitcode enabled, so I don't know what is the issue.
I'm having the same issue. Everything working when building for simulators but I'm getting the same message for device builds.
Try flipping ENABLE_TESTING_SEARCH_PATHS = YES
in any of the xcodeproj files for a converted SPM module to NO
as I believe that will fix it.
@thedavidharris there's a way to do that through Dependencies.swift file?
version 2.1.0 or newer using tuist generate
just outputs
Using version 2.1.1 defined at
/ios-app/.tuist-version
And thats it, nothing is generated.
Using 2.0.0:
Couldn't find target 'CSQLite' at '
/Tuist/Dependencies/SwiftPackageManager/.build/checkouts/GRDB.swift' Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
Try flipping
ENABLE_TESTING_SEARCH_PATHS = YES
in any of the xcodeproj files for a converted SPM module toNO
as I believe that will fix it.
@thedavidharris After moving GRDB back to packages in Project.swift
this workaround works with 2.1.1 :)
Now does this break anything else, why is it causing this issue and how to fix it?
Now does this break anything else, why is it causing this issue and how to fix it?
I'm interested if this breaks anything, but I've added a PR which adds this change for all SPM packages to help test https://github.com/tuist/tuist/pull/3653
after checking with Tuist 2.3.0, the issue when running tuist generate
and it does not do anything when GRDB (https://github.com/zdnk/GRDB.swift) is in Dependencies.swift as SPM package is stil there.
also, Tuist/Dependencies/SwiftPackageManager
is empty
@zdnk this looks like a different error wrt the original one, could you please open a separate issue and provide all the required information? 🙏
Describe the bug When generating project with SPM dependencies in Dependencies.swift, and using Apollo and opening generated workspace in Xcode 13, the build fails because Apollo is not built with bitcode, I checked the Tuist generated Apollo project build settings and bitcode is enabled.
It works fine in Xcode 12!
Example project: https://github.com/zdnk/tuist-apollo-dependency-example
It only occurs when:
Last tested on Tuist 2.0.2, Xcode 13
UPDATE: seems to happening for any dependency linked to framework which is then linked to app.
To Reproduce Project.swift
Dependencies.swift
Generate the project/workspace:
Desktop (please complete the following information):