-
-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enclose package name inside quotes if it contains spaces (#6264)
* Enclose package name inside quotes if it contains spaces * Add test
- Loading branch information
1 parent
60aceac
commit 03c54ac
Showing
18 changed files
with
223 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...pp_with_spm_dependencies/App/Resources/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
..._app_with_spm_dependencies/App/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"platform" : "ios", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
fixtures/ios_app_with_spm_dependencies/App/Resources/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...with_spm_dependencies/App/Resources/Preview Content/Preview Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
fixtures/ios_app_with_spm_dependencies/App/Sources/AppApp.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import SwiftUI | ||
|
||
@main | ||
struct AppApp: App { | ||
var body: some Scene { | ||
WindowGroup { | ||
ContentView() | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
fixtures/ios_app_with_spm_dependencies/App/Sources/ContentView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Buy | ||
import Pay | ||
import SwiftUI | ||
|
||
struct ContentView: View { | ||
init() { | ||
// Use Mobile Buy SDK | ||
_ = Card.CreditCard(firstName: "", lastName: "", number: "", expiryMonth: "", expiryYear: "") | ||
_ = PayAddress() | ||
} | ||
|
||
var body: some View { | ||
VStack { | ||
Image(systemName: "globe") | ||
.imageScale(.large) | ||
Text("Hello, world!") | ||
} | ||
.padding() | ||
} | ||
} | ||
|
||
#Preview { | ||
ContentView() | ||
} |
20 changes: 20 additions & 0 deletions
20
fixtures/ios_app_with_spm_dependencies/AppTests/AppTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import XCTest | ||
@testable import App | ||
|
||
final class AppTests: XCTestCase { | ||
override func setUpWithError() throws { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
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. | ||
// Any test you write for XCTest can be annotated as throws and async. | ||
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. | ||
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import ProjectDescription | ||
|
||
let project = Project( | ||
name: "App", | ||
targets: [ | ||
.target( | ||
name: "App", | ||
destinations: .iOS, | ||
product: .app, | ||
bundleId: "io.tuist.app", | ||
deploymentTargets: .iOS("14.0"), | ||
infoPlist: .default, | ||
sources: "App/Sources/**", | ||
resources: "App/Resources/**", | ||
dependencies: [ | ||
.external(name: "Buy"), | ||
.external(name: "Pay"), | ||
] | ||
), | ||
.target( | ||
name: "AppTests", | ||
destinations: .iOS, | ||
product: .unitTests, | ||
bundleId: "io.tuist.app.tests", | ||
deploymentTargets: .iOS("14.0"), | ||
infoPlist: .default, | ||
sources: "AppTests/**", | ||
dependencies: [.target(name: "App")] | ||
), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# iOS app with SPM dependencies | ||
|
||
An iOS application project with various SPM dependencies. |
15 changes: 15 additions & 0 deletions
15
fixtures/ios_app_with_spm_dependencies/Tuist/Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"originHash" : "6ed714a381b77d6163cdedad8446d73742573b78187635c59175fa22d0a3df2c", | ||
"pins" : [ | ||
{ | ||
"identity" : "mobile-buy-sdk-ios", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/Shopify/mobile-buy-sdk-ios", | ||
"state" : { | ||
"revision" : "6bd23c2f6243f73ef6ec135723d4909bc068409e", | ||
"version" : "12.0.0" | ||
} | ||
} | ||
], | ||
"version" : 3 | ||
} |
10 changes: 10 additions & 0 deletions
10
fixtures/ios_app_with_spm_dependencies/Tuist/Package.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// swift-tools-version: 5.10 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "PackageName", | ||
dependencies: [ | ||
// Has space symbols in package name | ||
.package(url: "https://github.com/Shopify/mobile-buy-sdk-ios", exact: "12.0.0"), | ||
] | ||
) |