Skip to content

Commit d279cd7

Browse files
author
Justin Martin
committed
Fix TestableSwift & Calculator projects to use SPM instead of the dynamic framework target that was just deleted
1 parent aa84a18 commit d279cd7

File tree

18 files changed

+145
-333
lines changed

18 files changed

+145
-333
lines changed

Documentation/Examples/Calculator/Acceptance Tests/BasicCalculatorRobot.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// See the LICENSE file distributed with this work for the terms under
33
// which Square, Inc. licenses this file to you.
44

5-
#import <KIF/KIF.h>
5+
@import KIF;
66

77
#import "BasicCalculatorRobot.h"
88

Documentation/Examples/Calculator/Acceptance Tests/TestRobot.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2017 SSK Development. All rights reserved.
77
//
88

9-
#import <KIF/KIF.h>
9+
@import KIF;
1010

1111
#import "TestRobot.h"
1212

Documentation/Examples/Calculator/Calculator.xcodeproj/project.pbxproj

+27-128
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
62F81B511EBBE965009B2400 /* KIF.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62F81B3C1EBBE917009B2400 /* KIF.framework */; };
10+
6282C6352C9CBE210040DCDB /* KIF in Frameworks */ = {isa = PBXBuildFile; productRef = 6282C6342C9CBE210040DCDB /* KIF */; };
1111
62F81B521EBBE976009B2400 /* BasicCalculatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4C315F167BAE6100E31109 /* BasicCalculatorTests.m */; };
1212
62F81B5D1EBBEB6B009B2400 /* BasicCalculatorRobot.m in Sources */ = {isa = PBXBuildFile; fileRef = 62F81B5C1EBBEB6B009B2400 /* BasicCalculatorRobot.m */; };
1313
62F972EB1F708273003EFFDA /* TestRobot.m in Sources */ = {isa = PBXBuildFile; fileRef = 62F972EA1F708273003EFFDA /* TestRobot.m */; };
@@ -29,62 +29,13 @@
2929
/* End PBXBuildFile section */
3030

3131
/* Begin PBXContainerItemProxy section */
32-
62F81B3B1EBBE917009B2400 /* PBXContainerItemProxy */ = {
33-
isa = PBXContainerItemProxy;
34-
containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
35-
proxyType = 2;
36-
remoteGlobalIDString = 9CC9673B1AD4B1B600576D13;
37-
remoteInfo = KIFFramework;
38-
};
39-
62F81B3D1EBBE917009B2400 /* PBXContainerItemProxy */ = {
40-
isa = PBXContainerItemProxy;
41-
containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
42-
proxyType = 2;
43-
remoteGlobalIDString = FAB89FFC1CAC546900C6DFC1;
44-
remoteInfo = KIFFrameworkConsumer;
45-
};
46-
62F81B3F1EBBE917009B2400 /* PBXContainerItemProxy */ = {
47-
isa = PBXContainerItemProxy;
48-
containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
49-
proxyType = 2;
50-
remoteGlobalIDString = FAB8A0141CAC546A00C6DFC1;
51-
remoteInfo = KIFFrameworkConsumerTests;
52-
};
5332
62F81B4A1EBBE925009B2400 /* PBXContainerItemProxy */ = {
5433
isa = PBXContainerItemProxy;
5534
containerPortal = EB4C30D0167B9E3A00E31109 /* Project object */;
5635
proxyType = 1;
5736
remoteGlobalIDString = EB4C30D8167B9E3A00E31109;
5837
remoteInfo = Calculator;
5938
};
60-
62F81B4F1EBBE961009B2400 /* PBXContainerItemProxy */ = {
61-
isa = PBXContainerItemProxy;
62-
containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
63-
proxyType = 1;
64-
remoteGlobalIDString = 9CC9673A1AD4B1B600576D13;
65-
remoteInfo = KIFFramework;
66-
};
67-
A8892FFF1684F0A400FC7C63 /* PBXContainerItemProxy */ = {
68-
isa = PBXContainerItemProxy;
69-
containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
70-
proxyType = 2;
71-
remoteGlobalIDString = AAB07268139719AC008AF393;
72-
remoteInfo = KIF;
73-
};
74-
EB2A8A871781D68600C6299F /* PBXContainerItemProxy */ = {
75-
isa = PBXContainerItemProxy;
76-
containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
77-
proxyType = 2;
78-
remoteGlobalIDString = EB60ECC1177F8C83005A041A;
79-
remoteInfo = "Test Host";
80-
};
81-
EB2A8A891781D68600C6299F /* PBXContainerItemProxy */ = {
82-
isa = PBXContainerItemProxy;
83-
containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
84-
proxyType = 2;
85-
remoteGlobalIDString = EB60ECEB177F8DB3005A041A;
86-
remoteInfo = "KIF Tests";
87-
};
8839
/* End PBXContainerItemProxy section */
8940

9041
/* Begin PBXFileReference section */
@@ -94,7 +45,7 @@
9445
62F81B5C1EBBEB6B009B2400 /* BasicCalculatorRobot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BasicCalculatorRobot.m; sourceTree = "<group>"; };
9546
62F972E91F708273003EFFDA /* TestRobot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestRobot.h; sourceTree = "<group>"; };
9647
62F972EA1F708273003EFFDA /* TestRobot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestRobot.m; sourceTree = "<group>"; };
97-
A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KIF.xcodeproj; path = ../../../KIF.xcodeproj; sourceTree = "<group>"; };
48+
62FA513E2C9CBDCD00E335D6 /* KIF */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = KIF; path = ../../..; sourceTree = "<group>"; };
9849
EB4C30D9167B9E3A00E31109 /* Calculator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Calculator.app; sourceTree = BUILT_PRODUCTS_DIR; };
9950
EB4C30DD167B9E3A00E31109 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
10051
EB4C30DF167B9E3A00E31109 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -120,15 +71,14 @@
12071
EB4C3158167BA99D00E31109 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; };
12172
EB4C3159167BA99E00E31109 /* HomeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeViewController.xib; sourceTree = "<group>"; };
12273
EB4C315F167BAE6100E31109 /* BasicCalculatorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BasicCalculatorTests.m; sourceTree = "<group>"; };
123-
EB7204861680E02800278DA2 /* libKIFTestCase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libKIFTestCase.a; sourceTree = BUILT_PRODUCTS_DIR; };
12474
/* End PBXFileReference section */
12575

12676
/* Begin PBXFrameworksBuildPhase section */
12777
62F81B421EBBE925009B2400 /* Frameworks */ = {
12878
isa = PBXFrameworksBuildPhase;
12979
buildActionMask = 2147483647;
13080
files = (
131-
62F81B511EBBE965009B2400 /* KIF.framework in Frameworks */,
81+
6282C6352C9CBE210040DCDB /* KIF in Frameworks */,
13282
);
13383
runOnlyForDeploymentPostprocessing = 0;
13484
};
@@ -145,19 +95,6 @@
14595
/* End PBXFrameworksBuildPhase section */
14696

14797
/* Begin PBXGroup section */
148-
A8892FF81684F0A400FC7C63 /* Products */ = {
149-
isa = PBXGroup;
150-
children = (
151-
A88930001684F0A400FC7C63 /* libKIF.a */,
152-
EB2A8A881781D68600C6299F /* Test Host.app */,
153-
EB2A8A8A1781D68600C6299F /* KIF Tests - XCTest.xctest */,
154-
62F81B3C1EBBE917009B2400 /* KIF.framework */,
155-
62F81B3E1EBBE917009B2400 /* KIFFrameworkConsumer.app */,
156-
62F81B401EBBE917009B2400 /* KIFFrameworkConsumerTests.xctest */,
157-
);
158-
name = Products;
159-
sourceTree = "<group>";
160-
};
16198
EB4C30CE167B9E3A00E31109 = {
16299
isa = PBXGroup;
163100
children = (
@@ -180,8 +117,7 @@
180117
EB4C30DC167B9E3A00E31109 /* Frameworks */ = {
181118
isa = PBXGroup;
182119
children = (
183-
A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */,
184-
EB7204861680E02800278DA2 /* libKIFTestCase.a */,
120+
62FA513E2C9CBDCD00E335D6 /* KIF */,
185121
EB4C30DD167B9E3A00E31109 /* UIKit.framework */,
186122
EB4C30DF167B9E3A00E31109 /* Foundation.framework */,
187123
EB4C30E1167B9E3A00E31109 /* CoreGraphics.framework */,
@@ -259,10 +195,12 @@
259195
buildRules = (
260196
);
261197
dependencies = (
262-
62F81B501EBBE961009B2400 /* PBXTargetDependency */,
263198
62F81B4B1EBBE925009B2400 /* PBXTargetDependency */,
264199
);
265200
name = "Acceptance Tests";
201+
packageProductDependencies = (
202+
6282C6342C9CBE210040DCDB /* KIF */,
203+
);
266204
productName = "Acceptance Tests";
267205
productReference = 62F81B451EBBE925009B2400 /* Acceptance Tests.xctest */;
268206
productType = "com.apple.product-type.bundle.unit-test";
@@ -280,6 +218,8 @@
280218
dependencies = (
281219
);
282220
name = Calculator;
221+
packageProductDependencies = (
222+
);
283223
productName = Calculator;
284224
productReference = EB4C30D9167B9E3A00E31109 /* Calculator.app */;
285225
productType = "com.apple.product-type.application";
@@ -311,12 +251,6 @@
311251
mainGroup = EB4C30CE167B9E3A00E31109;
312252
productRefGroup = EB4C30DA167B9E3A00E31109 /* Products */;
313253
projectDirPath = "";
314-
projectReferences = (
315-
{
316-
ProductGroup = A8892FF81684F0A400FC7C63 /* Products */;
317-
ProjectRef = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */;
318-
},
319-
);
320254
projectRoot = "";
321255
targets = (
322256
EB4C30D8167B9E3A00E31109 /* Calculator */,
@@ -325,51 +259,6 @@
325259
};
326260
/* End PBXProject section */
327261

328-
/* Begin PBXReferenceProxy section */
329-
62F81B3C1EBBE917009B2400 /* KIF.framework */ = {
330-
isa = PBXReferenceProxy;
331-
fileType = wrapper.framework;
332-
path = KIF.framework;
333-
remoteRef = 62F81B3B1EBBE917009B2400 /* PBXContainerItemProxy */;
334-
sourceTree = BUILT_PRODUCTS_DIR;
335-
};
336-
62F81B3E1EBBE917009B2400 /* KIFFrameworkConsumer.app */ = {
337-
isa = PBXReferenceProxy;
338-
fileType = wrapper.application;
339-
path = KIFFrameworkConsumer.app;
340-
remoteRef = 62F81B3D1EBBE917009B2400 /* PBXContainerItemProxy */;
341-
sourceTree = BUILT_PRODUCTS_DIR;
342-
};
343-
62F81B401EBBE917009B2400 /* KIFFrameworkConsumerTests.xctest */ = {
344-
isa = PBXReferenceProxy;
345-
fileType = wrapper.cfbundle;
346-
path = KIFFrameworkConsumerTests.xctest;
347-
remoteRef = 62F81B3F1EBBE917009B2400 /* PBXContainerItemProxy */;
348-
sourceTree = BUILT_PRODUCTS_DIR;
349-
};
350-
A88930001684F0A400FC7C63 /* libKIF.a */ = {
351-
isa = PBXReferenceProxy;
352-
fileType = archive.ar;
353-
path = libKIF.a;
354-
remoteRef = A8892FFF1684F0A400FC7C63 /* PBXContainerItemProxy */;
355-
sourceTree = BUILT_PRODUCTS_DIR;
356-
};
357-
EB2A8A881781D68600C6299F /* Test Host.app */ = {
358-
isa = PBXReferenceProxy;
359-
fileType = wrapper.application;
360-
path = "Test Host.app";
361-
remoteRef = EB2A8A871781D68600C6299F /* PBXContainerItemProxy */;
362-
sourceTree = BUILT_PRODUCTS_DIR;
363-
};
364-
EB2A8A8A1781D68600C6299F /* KIF Tests - XCTest.xctest */ = {
365-
isa = PBXReferenceProxy;
366-
fileType = wrapper.cfbundle;
367-
path = "KIF Tests - XCTest.xctest";
368-
remoteRef = EB2A8A891781D68600C6299F /* PBXContainerItemProxy */;
369-
sourceTree = BUILT_PRODUCTS_DIR;
370-
};
371-
/* End PBXReferenceProxy section */
372-
373262
/* Begin PBXResourcesBuildPhase section */
374263
62F81B431EBBE925009B2400 /* Resources */ = {
375264
isa = PBXResourcesBuildPhase;
@@ -425,11 +314,6 @@
425314
target = EB4C30D8167B9E3A00E31109 /* Calculator */;
426315
targetProxy = 62F81B4A1EBBE925009B2400 /* PBXContainerItemProxy */;
427316
};
428-
62F81B501EBBE961009B2400 /* PBXTargetDependency */ = {
429-
isa = PBXTargetDependency;
430-
name = KIFFramework;
431-
targetProxy = 62F81B4F1EBBE961009B2400 /* PBXContainerItemProxy */;
432-
};
433317
/* End PBXTargetDependency section */
434318

435319
/* Begin PBXVariantGroup section */
@@ -486,7 +370,11 @@
486370
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
487371
GCC_WARN_UNUSED_FUNCTION = YES;
488372
INFOPLIST_FILE = "Acceptance Tests/Acceptance Tests-Info.plist";
489-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
373+
LD_RUNPATH_SEARCH_PATHS = (
374+
"$(inherited)",
375+
"@executable_path/Frameworks",
376+
"@loader_path/Frameworks",
377+
);
490378
MTL_ENABLE_DEBUG_INFO = YES;
491379
OTHER_CFLAGS = (
492380
"-DDEPRECATE_KIF_SYSTEM=1",
@@ -526,7 +414,11 @@
526414
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
527415
GCC_WARN_UNUSED_FUNCTION = YES;
528416
INFOPLIST_FILE = "Acceptance Tests/Acceptance Tests-Info.plist";
529-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
417+
LD_RUNPATH_SEARCH_PATHS = (
418+
"$(inherited)",
419+
"@executable_path/Frameworks",
420+
"@loader_path/Frameworks",
421+
);
530422
MTL_ENABLE_DEBUG_INFO = NO;
531423
OTHER_LDFLAGS = "-ObjC";
532424
PRODUCT_BUNDLE_IDENTIFIER = "com.squareup.Acceptance-Tests";
@@ -683,6 +575,13 @@
683575
defaultConfigurationName = Release;
684576
};
685577
/* End XCConfigurationList section */
578+
579+
/* Begin XCSwiftPackageProductDependency section */
580+
6282C6342C9CBE210040DCDB /* KIF */ = {
581+
isa = XCSwiftPackageProductDependency;
582+
productName = KIF;
583+
};
584+
/* End XCSwiftPackageProductDependency section */
686585
};
687586
rootObject = EB4C30D0167B9E3A00E31109 /* Project object */;
688587
}

0 commit comments

Comments
 (0)