tuist: Xcode 13 - Dependencies.swift - bitcode not enabled for dependency error
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:
- building with Xcode 13
- building for device or archiving
- the Apollo dependency is linked in framework which is linked in the app
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
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"),
]
),
]
)
Dependencies.swift
import ProjectDescription
let dependencies = Dependencies(
swiftPackageManager: [
.remote(url: "https://github.com/apollographql/apollo-ios.git", requirement: .upToNextMajor(from: "0.43.0")),
],
platforms: [.iOS]
)
Generate the project/workspace:
tuist dependencies fetch
tuist generate
Desktop (please complete the following information):
- Tuist: 1.51.1
- OS: macOS Monterey
- Version 12.0 Beta (21A5506j)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 21 (14 by maintainers)
Try flipping
ENABLE_TESTING_SEARCH_PATHS = YESin any of the xcodeproj files for a converted SPM module toNOas I believe that will fix it.@thedavidharris there’s a way to do that through Dependencies.swift file?
@zdnk could you update the first message with: