Added the Shared package for the libraries that would be shared between the Locations and Wikipedia targets.

This commit is contained in:
Javier Cicchelli 2023-04-08 18:46:01 +02:00
parent 4d4529028b
commit e95062119f
4 changed files with 47 additions and 0 deletions

View File

@ -122,6 +122,7 @@
46EB332929E1CE05001D5EAF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
46EB332B29E1CE05001D5EAF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
46EB333229E1CFD9001D5EAF /* Libraries */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Libraries; sourceTree = "<group>"; };
46EB333429E1D158001D5EAF /* Shared */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Shared; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -138,6 +139,7 @@
46EB325029E1BBD1001D5EAF = {
isa = PBXGroup;
children = (
46EB333429E1D158001D5EAF /* Shared */,
46EB325729E1BCAB001D5EAF /* Apps */,
46EB32EE29E1CD20001D5EAF /* Products */,
);

28
Shared/Package.swift Normal file
View File

@ -0,0 +1,28 @@
// swift-tools-version: 5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Shared",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Shared",
targets: ["Shared"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Shared",
dependencies: []),
.testTarget(
name: "SharedTests",
dependencies: ["Shared"]),
]
)

View File

@ -0,0 +1,6 @@
public struct Shared {
public private(set) var text = "Hello, World!"
public init() {
}
}

View File

@ -0,0 +1,11 @@
import XCTest
@testable import Shared
final class SharedTests: XCTestCase {
func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(Shared().text, "Hello, World!")
}
}