Skip to content

Commit 2c047ce

Browse files
committed
Remove submodule and use SPM for Snapshots library
1 parent 21878a4 commit 2c047ce

File tree

11 files changed

+70
-186
lines changed

11 files changed

+70
-186
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22
path = Submodules/WeTransfer-iOS-CI
33
url = https://github.com/WeTransfer/WeTransfer-iOS-CI.git
44
branch = master
5-
[submodule "Submodules/ios-snapshot-test-case"]
6-
path = Submodules/ios-snapshot-test-case
7-
url = https://github.com/uber/ios-snapshot-test-case.git

.swiftpm/xcode/xcshareddata/xcschemes/WeScan.xcscheme

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@
2020
ReferencedContainer = "container:">
2121
</BuildableReference>
2222
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "WeScan_WeScanTests"
32+
BuildableName = "WeScan_WeScanTests"
33+
BlueprintName = "WeScan_WeScanTests"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
2337
</BuildActionEntries>
2438
</BuildAction>
2539
<TestAction
@@ -28,6 +42,16 @@
2842
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2943
shouldUseLaunchSchemeArgsEnv = "YES">
3044
<Testables>
45+
<TestableReference
46+
skipped = "NO">
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "WeScanTests"
50+
BuildableName = "WeScanTests"
51+
BlueprintName = "WeScanTests"
52+
ReferencedContainer = "container:">
53+
</BuildableReference>
54+
</TestableReference>
3155
</Testables>
3256
</TestAction>
3357
<LaunchAction

Package.resolved

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ let package = Package(
99
.iOS(.v12)
1010
],
1111
products: [
12-
.library(name: "WeScan", type: .static, targets: ["WeScan"])
12+
.library(name: "WeScan", targets: ["WeScan"])
13+
],
14+
dependencies: [
15+
.package(url: "https://github.com/uber/ios-snapshot-test-case.git", from: "8.0.0")
1316
],
1417
targets: [
1518
.target(name: "WeScan",
@@ -20,6 +23,17 @@ let package = Package(
2023
],
2124
resources: [
2225
.process("Resources")
23-
])
26+
]),
27+
.testTarget(
28+
name: "WeScanTests",
29+
dependencies: [
30+
"WeScan",
31+
.product(name: "iOSSnapshotTestCase", package: "ios-snapshot-test-case")
32+
],
33+
path: "WeScanTests",
34+
resources: [
35+
.process("Resources")
36+
]
37+
)
2438
]
2539
)

Submodules/ios-snapshot-test-case

Lines changed: 0 additions & 1 deletion
This file was deleted.

WeScan.xcodeproj/project.pbxproj

Lines changed: 0 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
388A3BFD23C46FF000263DD1 /* EditImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 388A3BFC23C46FF000263DD1 /* EditImageViewController.swift */; };
1616
50FF76632577CCFB0099D918 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 50FF764B2577CCFB0099D918 /* Localizable.strings */; };
1717
50FF77162577EAD80099D918 /* WeScan.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D4BCED202C4F4100FCDDEC /* WeScan.framework */; };
18-
74E27858215446C900361812 /* FBSnapshotTestCase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74E27850215446C200361812 /* FBSnapshotTestCase.framework */; };
1918
74F7D034211ACBD90046AF7E /* CIRectangleDetectorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F7D033211ACBD90046AF7E /* CIRectangleDetectorTests.swift */; };
2019
74F7D036211ACBEE0046AF7E /* CaptureSessionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F7D035211ACBEE0046AF7E /* CaptureSessionTests.swift */; };
2120
74F7D038211ACBF90046AF7E /* VisionRectangleDetectorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F7D037211ACBF90046AF7E /* VisionRectangleDetectorTests.swift */; };
@@ -89,69 +88,6 @@
8988
/* End PBXBuildFile section */
9089

9190
/* Begin PBXContainerItemProxy section */
92-
74E2784F215446C200361812 /* PBXContainerItemProxy */ = {
93-
isa = PBXContainerItemProxy;
94-
containerPortal = 74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */;
95-
proxyType = 2;
96-
remoteGlobalIDString = B31987F01AB782D000B0A900;
97-
remoteInfo = "FBSnapshotTestCase iOS";
98-
};
99-
74E27851215446C200361812 /* PBXContainerItemProxy */ = {
100-
isa = PBXContainerItemProxy;
101-
containerPortal = 74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */;
102-
proxyType = 2;
103-
remoteGlobalIDString = B31987FB1AB782D100B0A900;
104-
remoteInfo = "FBSnapshotTestCase iOS Tests";
105-
};
106-
74E27853215446C200361812 /* PBXContainerItemProxy */ = {
107-
isa = PBXContainerItemProxy;
108-
containerPortal = 74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */;
109-
proxyType = 2;
110-
remoteGlobalIDString = 8271377A1C63AB6F00354E42;
111-
remoteInfo = "FBSnapshotTestCase tvOS";
112-
};
113-
74E27855215446C200361812 /* PBXContainerItemProxy */ = {
114-
isa = PBXContainerItemProxy;
115-
containerPortal = 74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */;
116-
proxyType = 2;
117-
remoteGlobalIDString = 827137831C63AB7000354E42;
118-
remoteInfo = "FBSnapshotTestCase tvOS Tests";
119-
};
120-
74E27859215446D100361812 /* PBXContainerItemProxy */ = {
121-
isa = PBXContainerItemProxy;
122-
containerPortal = 74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */;
123-
proxyType = 1;
124-
remoteGlobalIDString = B31987EF1AB782D000B0A900;
125-
remoteInfo = "FBSnapshotTestCase iOS";
126-
};
127-
74E278622154528300361812 /* PBXContainerItemProxy */ = {
128-
isa = PBXContainerItemProxy;
129-
containerPortal = 74E2785B2154528300361812 /* FBSnapshotTestCase.xcodeproj */;
130-
proxyType = 2;
131-
remoteGlobalIDString = B31987F01AB782D000B0A900;
132-
remoteInfo = "FBSnapshotTestCase iOS";
133-
};
134-
74E278642154528300361812 /* PBXContainerItemProxy */ = {
135-
isa = PBXContainerItemProxy;
136-
containerPortal = 74E2785B2154528300361812 /* FBSnapshotTestCase.xcodeproj */;
137-
proxyType = 2;
138-
remoteGlobalIDString = B31987FB1AB782D100B0A900;
139-
remoteInfo = "FBSnapshotTestCase iOS Tests";
140-
};
141-
74E278662154528300361812 /* PBXContainerItemProxy */ = {
142-
isa = PBXContainerItemProxy;
143-
containerPortal = 74E2785B2154528300361812 /* FBSnapshotTestCase.xcodeproj */;
144-
proxyType = 2;
145-
remoteGlobalIDString = 8271377A1C63AB6F00354E42;
146-
remoteInfo = "FBSnapshotTestCase tvOS";
147-
};
148-
74E278682154528300361812 /* PBXContainerItemProxy */ = {
149-
isa = PBXContainerItemProxy;
150-
containerPortal = 74E2785B2154528300361812 /* FBSnapshotTestCase.xcodeproj */;
151-
proxyType = 2;
152-
remoteGlobalIDString = 827137831C63AB7000354E42;
153-
remoteInfo = "FBSnapshotTestCase tvOS Tests";
154-
};
15591
A1D4BCF7202C4F4100FCDDEC /* PBXContainerItemProxy */ = {
15692
isa = PBXContainerItemProxy;
15793
containerPortal = A1D4BCAF202C4F3800FCDDEC /* Project object */;
@@ -214,8 +150,6 @@
214150
50FF765A2577CCFB0099D918 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
215151
50FF765B2577CCFB0099D918 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = "<group>"; };
216152
5A5A8B1525804C7D0058A37C /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; };
217-
74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FBSnapshotTestCase.xcodeproj; path = "Submodules/ios-snapshot-test-case/FBSnapshotTestCase.xcodeproj"; sourceTree = "<group>"; };
218-
74E2785B2154528300361812 /* FBSnapshotTestCase.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FBSnapshotTestCase.xcodeproj; path = "Submodules/ios-snapshot-test-case/FBSnapshotTestCase.xcodeproj"; sourceTree = SOURCE_ROOT; };
219153
74F7D033211ACBD90046AF7E /* CIRectangleDetectorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CIRectangleDetectorTests.swift; sourceTree = "<group>"; };
220154
74F7D035211ACBEE0046AF7E /* CaptureSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaptureSessionTests.swift; sourceTree = "<group>"; };
221155
74F7D037211ACBF90046AF7E /* VisionRectangleDetectorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisionRectangleDetectorTests.swift; sourceTree = "<group>"; };
@@ -314,7 +248,6 @@
314248
isa = PBXFrameworksBuildPhase;
315249
buildActionMask = 2147483647;
316250
files = (
317-
74E27858215446C900361812 /* FBSnapshotTestCase.framework in Frameworks */,
318251
A1D4BCF6202C4F4100FCDDEC /* WeScan.framework in Frameworks */,
319252
);
320253
runOnlyForDeploymentPostprocessing = 0;
@@ -339,35 +272,13 @@
339272
path = Localisation;
340273
sourceTree = "<group>";
341274
};
342-
74E27849215446C200361812 /* Products */ = {
343-
isa = PBXGroup;
344-
children = (
345-
74E27850215446C200361812 /* FBSnapshotTestCase.framework */,
346-
74E27852215446C200361812 /* FBSnapshotTestCase iOS Tests.xctest */,
347-
74E27854215446C200361812 /* FBSnapshotTestCase.framework */,
348-
74E27856215446C200361812 /* FBSnapshotTestCase tvOS Tests.xctest */,
349-
);
350-
name = Products;
351-
sourceTree = "<group>";
352-
};
353275
74E27857215446C900361812 /* Frameworks */ = {
354276
isa = PBXGroup;
355277
children = (
356278
);
357279
name = Frameworks;
358280
sourceTree = "<group>";
359281
};
360-
74E2785C2154528300361812 /* Products */ = {
361-
isa = PBXGroup;
362-
children = (
363-
74E278632154528300361812 /* FBSnapshotTestCase.framework */,
364-
74E278652154528300361812 /* FBSnapshotTestCase iOS Tests.xctest */,
365-
74E278672154528300361812 /* FBSnapshotTestCase.framework */,
366-
74E278692154528300361812 /* FBSnapshotTestCase tvOS Tests.xctest */,
367-
);
368-
name = Products;
369-
sourceTree = "<group>";
370-
};
371282
A1675BA92041692800852865 /* Resources */ = {
372283
isa = PBXGroup;
373284
children = (
@@ -389,7 +300,6 @@
389300
A1D4BCAE202C4F3800FCDDEC = {
390301
isa = PBXGroup;
391302
children = (
392-
74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */,
393303
A1D4BCB9202C4F3800FCDDEC /* WeScanSampleProject */,
394304
A1D4BCEE202C4F4100FCDDEC /* WeScan */,
395305
A1D4BCFB202C4F4100FCDDEC /* WeScanTests */,
@@ -445,7 +355,6 @@
445355
A1D4BCFB202C4F4100FCDDEC /* WeScanTests */ = {
446356
isa = PBXGroup;
447357
children = (
448-
74E2785B2154528300361812 /* FBSnapshotTestCase.xcodeproj */,
449358
A1675BA92041692800852865 /* Resources */,
450359
A1D4BCFE202C4F4100FCDDEC /* Info.plist */,
451360
A14089ED204EAA180009530F /* ArrayTests.swift */,
@@ -660,7 +569,6 @@
660569
buildRules = (
661570
);
662571
dependencies = (
663-
74E2785A215446D100361812 /* PBXTargetDependency */,
664572
A1D4BCF8202C4F4100FCDDEC /* PBXTargetDependency */,
665573
A1D4BCFA202C4F4100FCDDEC /* PBXTargetDependency */,
666574
);
@@ -727,16 +635,6 @@
727635
mainGroup = A1D4BCAE202C4F3800FCDDEC;
728636
productRefGroup = A1D4BCB8202C4F3800FCDDEC /* Products */;
729637
projectDirPath = "";
730-
projectReferences = (
731-
{
732-
ProductGroup = 74E2785C2154528300361812 /* Products */;
733-
ProjectRef = 74E2785B2154528300361812 /* FBSnapshotTestCase.xcodeproj */;
734-
},
735-
{
736-
ProductGroup = 74E27849215446C200361812 /* Products */;
737-
ProjectRef = 74E27848215446C200361812 /* FBSnapshotTestCase.xcodeproj */;
738-
},
739-
);
740638
projectRoot = "";
741639
targets = (
742640
A1D4BCB6202C4F3800FCDDEC /* WeScanSampleProject */,
@@ -746,65 +644,6 @@
746644
};
747645
/* End PBXProject section */
748646

749-
/* Begin PBXReferenceProxy section */
750-
74E27850215446C200361812 /* FBSnapshotTestCase.framework */ = {
751-
isa = PBXReferenceProxy;
752-
fileType = wrapper.framework;
753-
path = FBSnapshotTestCase.framework;
754-
remoteRef = 74E2784F215446C200361812 /* PBXContainerItemProxy */;
755-
sourceTree = BUILT_PRODUCTS_DIR;
756-
};
757-
74E27852215446C200361812 /* FBSnapshotTestCase iOS Tests.xctest */ = {
758-
isa = PBXReferenceProxy;
759-
fileType = wrapper.cfbundle;
760-
path = "FBSnapshotTestCase iOS Tests.xctest";
761-
remoteRef = 74E27851215446C200361812 /* PBXContainerItemProxy */;
762-
sourceTree = BUILT_PRODUCTS_DIR;
763-
};
764-
74E27854215446C200361812 /* FBSnapshotTestCase.framework */ = {
765-
isa = PBXReferenceProxy;
766-
fileType = wrapper.framework;
767-
path = FBSnapshotTestCase.framework;
768-
remoteRef = 74E27853215446C200361812 /* PBXContainerItemProxy */;
769-
sourceTree = BUILT_PRODUCTS_DIR;
770-
};
771-
74E27856215446C200361812 /* FBSnapshotTestCase tvOS Tests.xctest */ = {
772-
isa = PBXReferenceProxy;
773-
fileType = wrapper.cfbundle;
774-
path = "FBSnapshotTestCase tvOS Tests.xctest";
775-
remoteRef = 74E27855215446C200361812 /* PBXContainerItemProxy */;
776-
sourceTree = BUILT_PRODUCTS_DIR;
777-
};
778-
74E278632154528300361812 /* FBSnapshotTestCase.framework */ = {
779-
isa = PBXReferenceProxy;
780-
fileType = wrapper.framework;
781-
path = FBSnapshotTestCase.framework;
782-
remoteRef = 74E278622154528300361812 /* PBXContainerItemProxy */;
783-
sourceTree = BUILT_PRODUCTS_DIR;
784-
};
785-
74E278652154528300361812 /* FBSnapshotTestCase iOS Tests.xctest */ = {
786-
isa = PBXReferenceProxy;
787-
fileType = wrapper.cfbundle;
788-
path = "FBSnapshotTestCase iOS Tests.xctest";
789-
remoteRef = 74E278642154528300361812 /* PBXContainerItemProxy */;
790-
sourceTree = BUILT_PRODUCTS_DIR;
791-
};
792-
74E278672154528300361812 /* FBSnapshotTestCase.framework */ = {
793-
isa = PBXReferenceProxy;
794-
fileType = wrapper.framework;
795-
path = FBSnapshotTestCase.framework;
796-
remoteRef = 74E278662154528300361812 /* PBXContainerItemProxy */;
797-
sourceTree = BUILT_PRODUCTS_DIR;
798-
};
799-
74E278692154528300361812 /* FBSnapshotTestCase tvOS Tests.xctest */ = {
800-
isa = PBXReferenceProxy;
801-
fileType = wrapper.cfbundle;
802-
path = "FBSnapshotTestCase tvOS Tests.xctest";
803-
remoteRef = 74E278682154528300361812 /* PBXContainerItemProxy */;
804-
sourceTree = BUILT_PRODUCTS_DIR;
805-
};
806-
/* End PBXReferenceProxy section */
807-
808647
/* Begin PBXResourcesBuildPhase section */
809648
A1D4BCB5202C4F3800FCDDEC /* Resources */ = {
810649
isa = PBXResourcesBuildPhase;
@@ -967,11 +806,6 @@
967806
/* End PBXSourcesBuildPhase section */
968807

969808
/* Begin PBXTargetDependency section */
970-
74E2785A215446D100361812 /* PBXTargetDependency */ = {
971-
isa = PBXTargetDependency;
972-
name = "FBSnapshotTestCase iOS";
973-
targetProxy = 74E27859215446D100361812 /* PBXContainerItemProxy */;
974-
};
975809
A1D4BCF8202C4F4100FCDDEC /* PBXTargetDependency */ = {
976810
isa = PBXTargetDependency;
977811
target = A1D4BCEC202C4F4100FCDDEC /* WeScan */;

WeScanTests/CIRectangleDetectorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2018 WeTransfer. All rights reserved.
77
//
88

9-
import FBSnapshotTestCase
9+
import iOSSnapshotTestCase
1010
@testable import WeScan
1111
import XCTest
1212

WeScanTests/ImageFeatureTestHelpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class ImageFeatureTestHelpers: NSObject {
2929
}
3030

3131
static func getRectangleFeature(from resourceImage: ResourceImage) -> Quadrilateral {
32-
let image = UIImage(named: resourceImage.rawValue, in: Bundle(for: ImageFeatureTestHelpers.self), compatibleWith: nil)
32+
let image = UIImage(named: resourceImage.rawValue, in: Bundle.module, compatibleWith: nil)
3333
let ciImage = CIImage(image: image!)!
3434

3535
return CIRectangleDetector.rectangle(forImage: ciImage)!

WeScanTests/ReviewViewControllerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// swiftlint:disable line_length
99

1010
import CoreGraphics
11-
import FBSnapshotTestCase
11+
import iOSSnapshotTestCase
1212
@testable import WeScan
1313
import XCTest
1414

0 commit comments

Comments
 (0)