I’ve confronted with very unusual subject throughout splitting massive monolith venture on submodules.
I am making an attempt to construct EventTracking framework and add checks to it.
we’ve got a a number of totally different servers that have to be configured with totally different Configurations = .debug(title: "Develop-Debug"), .debug(title: "Stage-Debug")... and so forth.
Now we have a separated framework for community administration and a few further helpers(named Internal_Framework_With_Helpers and Internal_Networking_Framework accordingly)
Each Undertaking.swift
information for frameworks(Internal_Framework_With_Helpers and Internal_Networking_Framework) additionally comprises entire record of customized configurations.
All initiatives generates and builds efficiently with out errors.
BUT when I attempt to write some check for EventTracking submodule and add @testable
macro to import EventTracking
I am bought error Module ‘EventTracking’ was not compiled for testing
I’ve tried to take away customized configurations from EventTracking submodule’s Undertaking.swift
file and generate venture.
On this case I am NOT bought error Module ‘EventTracking’ was not compiled for testing
However my entire venture cease constructing in any respect and I am receiving quite a lot of errors
Right here is an my EventTracking submodule Undertaking.swift
file
let venture = Undertaking(
title: "EventTracking",
organizationName: "com.organizationName",
choices: .choices(
automaticSchemesOptions: Undertaking.Choices.AutomaticSchemesOptions.enabled(
targetSchemesGrouping: .byNameSuffix(
construct: [
"",
"Interface",
"Testing"
],
check: ["Tests"],
run: []
),
codeCoverageEnabled: true,
testingOptions: []
)
),
settings: .settings(
base: [
"OTHER_LDFLAGS": "$(inherited) -ObjC"
],
configurations: [
.debug(name: "Develop-Debug"),
.debug(name: "Stage-Debug"),
.debug(name: "Prod-Debug"),
.debug(name: "Test1-Debug"),
.debug(name: "Test2-Debug"),
.debug(name: "Test3-Debug"),
.debug(name: "Test4-Debug"),
.release(name: "Develop-Release"),
.release(name: "Stage-Release"),
.release(name: "Prod-Release"),
.release(name: "Test1-Release"),
.release(name: "Test2-Release"),
.release(name: "Test3-Release"),
.release(name: "Test4-Release"),
],
defaultSettings: .really useful
),
targets: [
.target(
name: "EventTracking",
destinations: [
.iPhone,
.macWithiPadDesign
],
product: .framework,
bundleId: "com.organizationName.EventTracking",
deploymentTargets: DeploymentTargets.iOS("15.0"),
sources: .paths(
["Sources/**/*.swift"]
),
dependencies: [
TargetDependency.package(
product: "AppsFlyerLib"
),
TargetDependency.project(
target: "Internal_Framework_With_Helpers",
path: .relativeToRoot("Projects/Internal_Framework_With_Helpers")
),
TargetDependency.project(
target: "Internal_Networking_Framework",
path: .relativeToRoot("Projects/Internal_Networking_Framework")
)
],
settings: .settings(
base: [
"DEVELOPMENT_ASSET_PATHS" : [""]
],
configurations: [],
defaultSettings: .really useful
)
),
.goal(
title: "EventTrackingTests",
locations: [
.iPhone,
.macWithiPadDesign
],
product: .unitTests,
bundleId: "com.organizationName.EventTrackingTests",
deploymentTargets: DeploymentTargets.iOS("15.0"),
sources: .paths(
["Tests/**/*.swift"]
),
dependencies: [
TargetDependency.project(
target: "EventTracking",
path: .relativeToRoot("Projects/Data/EventTracking")
),
TargetDependency.project(
target: "Internal_TestingSupport_Framework",
path: .relativeToRoot("Projects/Data/Internal_TestingSupport_Framework")
)
],
settings: .settings(
base: [
"DEVELOPMENT_ASSET_PATHS" : [""]
],
configurations: [],
defaultSettings: .really useful
)
)
],
additionalFiles: [],
resourceSynthesizers: [
.assets(),
.files(extensions: ["json"]),
]
)
Can anyone clarify me what i am doing fallacious and the way I could make my EventTracking submodule testable with customized configurations
Thanks