driftx 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +216 -0
- package/dist/bin.js +834 -81
- package/dist/bin.js.map +1 -1
- package/driftx-plugin/skills/driftx/SKILL.md +281 -27
- package/ios-companion/DriftxCompanion/DriftxCompanionApp.swift +10 -0
- package/ios-companion/DriftxCompanion/Info.plist +22 -0
- package/ios-companion/DriftxCompanion.xcodeproj/project.pbxproj +376 -0
- package/ios-companion/DriftxCompanion.xcodeproj/xcshareddata/xcschemes/DriftxCompanionUITests.xcscheme +109 -0
- package/ios-companion/DriftxCompanionUITests/CompanionServer.swift +176 -0
- package/ios-companion/DriftxCompanionUITests/DriftxCompanionUITests.swift +15 -0
- package/ios-companion/DriftxCompanionUITests/HierarchyEndpoint.swift +140 -0
- package/ios-companion/DriftxCompanionUITests/Info.plist +22 -0
- package/ios-companion/DriftxCompanionUITests/InteractionEndpoint.swift +142 -0
- package/ios-companion/DriftxCompanionUITests/Router.swift +47 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanion.app/DriftxCompanion +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanion.app/DriftxCompanion.debug.dylib +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanion.app/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanion.app/PkgInfo +1 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanion.app/__preview.dylib +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/DriftxCompanionUITests-Runner +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/Testing.framework/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/Testing.framework/Testing +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/Testing.framework/_CodeSignature/CodeResources +168 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/Testing.framework/version.plist +18 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/XCTAutomationSupport +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/_CodeSignature/CodeResources +113 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/version.plist +18 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTest.framework/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTest.framework/XCTest +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTest.framework/_CodeSignature/CodeResources +817 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTest.framework/version.plist +18 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestCore.framework/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestCore.framework/XCTestCore +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestCore.framework/_CodeSignature/CodeResources +113 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestCore.framework/version.plist +18 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestSupport.framework/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestSupport.framework/XCTestSupport +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestSupport.framework/_CodeSignature/CodeResources +113 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCTestSupport.framework/version.plist +18 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUIAutomation.framework/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUIAutomation.framework/XCUIAutomation +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUIAutomation.framework/_CodeSignature/CodeResources +432 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUIAutomation.framework/version.plist +18 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUnit.framework/Info.plist +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUnit.framework/XCUnit +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUnit.framework/_CodeSignature/CodeResources +113 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/XCUnit.framework/version.plist +18 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Frameworks/libXCTestSwiftSupport.dylib +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/Info.plist +254 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/PkgInfo +1 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/PlugIns/DriftxCompanionUITests.xctest/DriftxCompanionUITests +0 -0
- package/ios-companion/prebuilt/Debug-iphonesimulator/DriftxCompanionUITests-Runner.app/PlugIns/DriftxCompanionUITests.xctest/Info.plist +0 -0
- package/ios-companion/prebuilt/DriftxCompanionUITests.xctestrun +135 -0
- package/ios-companion/prebuilt/build-info.json +6 -0
- package/package.json +14 -3
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 56;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
A10000000000000000000001 /* DriftxCompanionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000001 /* DriftxCompanionApp.swift */; };
|
|
11
|
+
A10000000000000000000002 /* DriftxCompanionUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000002 /* DriftxCompanionUITests.swift */; };
|
|
12
|
+
A10000000000000000000003 /* CompanionServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000003 /* CompanionServer.swift */; };
|
|
13
|
+
A10000000000000000000004 /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000004 /* Router.swift */; };
|
|
14
|
+
A10000000000000000000005 /* InteractionEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000005 /* InteractionEndpoint.swift */; };
|
|
15
|
+
A10000000000000000000006 /* HierarchyEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000006 /* HierarchyEndpoint.swift */; };
|
|
16
|
+
A10000000000000000000007 /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A20000000000000000000010 /* Network.framework */; };
|
|
17
|
+
/* End PBXBuildFile section */
|
|
18
|
+
|
|
19
|
+
/* Begin PBXContainerItemProxy section */
|
|
20
|
+
A30000000000000000000001 /* PBXContainerItemProxy */ = {
|
|
21
|
+
isa = PBXContainerItemProxy;
|
|
22
|
+
containerPortal = A50000000000000000000001 /* Project object */;
|
|
23
|
+
proxyType = 1;
|
|
24
|
+
remoteGlobalIDString = A40000000000000000000001;
|
|
25
|
+
remoteInfo = DriftxCompanion;
|
|
26
|
+
};
|
|
27
|
+
/* End PBXContainerItemProxy section */
|
|
28
|
+
|
|
29
|
+
/* Begin PBXFileReference section */
|
|
30
|
+
A20000000000000000000001 /* DriftxCompanionApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DriftxCompanionApp.swift; sourceTree = "<group>"; };
|
|
31
|
+
A20000000000000000000002 /* DriftxCompanionUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DriftxCompanionUITests.swift; sourceTree = "<group>"; };
|
|
32
|
+
A20000000000000000000003 /* CompanionServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompanionServer.swift; sourceTree = "<group>"; };
|
|
33
|
+
A20000000000000000000004 /* Router.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = "<group>"; };
|
|
34
|
+
A20000000000000000000005 /* InteractionEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InteractionEndpoint.swift; sourceTree = "<group>"; };
|
|
35
|
+
A20000000000000000000006 /* HierarchyEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HierarchyEndpoint.swift; sourceTree = "<group>"; };
|
|
36
|
+
A20000000000000000000007 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
37
|
+
A20000000000000000000008 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
38
|
+
A20000000000000000000009 /* DriftxCompanion.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DriftxCompanion.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
39
|
+
A2000000000000000000000A /* DriftxCompanionUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DriftxCompanionUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
40
|
+
A20000000000000000000010 /* Network.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Network.framework; path = System/Library/Frameworks/Network.framework; sourceTree = SDKROOT; };
|
|
41
|
+
/* End PBXFileReference section */
|
|
42
|
+
|
|
43
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
44
|
+
A60000000000000000000001 /* Frameworks */ = {
|
|
45
|
+
isa = PBXFrameworksBuildPhase;
|
|
46
|
+
buildActionMask = 2147483647;
|
|
47
|
+
files = (
|
|
48
|
+
);
|
|
49
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
50
|
+
};
|
|
51
|
+
A60000000000000000000002 /* Frameworks */ = {
|
|
52
|
+
isa = PBXFrameworksBuildPhase;
|
|
53
|
+
buildActionMask = 2147483647;
|
|
54
|
+
files = (
|
|
55
|
+
A10000000000000000000007 /* Network.framework in Frameworks */,
|
|
56
|
+
);
|
|
57
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
58
|
+
};
|
|
59
|
+
/* End PBXFrameworksBuildPhase section */
|
|
60
|
+
|
|
61
|
+
/* Begin PBXGroup section */
|
|
62
|
+
A70000000000000000000001 = {
|
|
63
|
+
isa = PBXGroup;
|
|
64
|
+
children = (
|
|
65
|
+
A70000000000000000000002 /* DriftxCompanion */,
|
|
66
|
+
A70000000000000000000003 /* DriftxCompanionUITests */,
|
|
67
|
+
A70000000000000000000005 /* Frameworks */,
|
|
68
|
+
A70000000000000000000004 /* Products */,
|
|
69
|
+
);
|
|
70
|
+
sourceTree = "<group>";
|
|
71
|
+
};
|
|
72
|
+
A70000000000000000000002 /* DriftxCompanion */ = {
|
|
73
|
+
isa = PBXGroup;
|
|
74
|
+
children = (
|
|
75
|
+
A20000000000000000000001 /* DriftxCompanionApp.swift */,
|
|
76
|
+
A20000000000000000000007 /* Info.plist */,
|
|
77
|
+
);
|
|
78
|
+
path = DriftxCompanion;
|
|
79
|
+
sourceTree = "<group>";
|
|
80
|
+
};
|
|
81
|
+
A70000000000000000000003 /* DriftxCompanionUITests */ = {
|
|
82
|
+
isa = PBXGroup;
|
|
83
|
+
children = (
|
|
84
|
+
A20000000000000000000002 /* DriftxCompanionUITests.swift */,
|
|
85
|
+
A20000000000000000000003 /* CompanionServer.swift */,
|
|
86
|
+
A20000000000000000000004 /* Router.swift */,
|
|
87
|
+
A20000000000000000000005 /* InteractionEndpoint.swift */,
|
|
88
|
+
A20000000000000000000006 /* HierarchyEndpoint.swift */,
|
|
89
|
+
A20000000000000000000008 /* Info.plist */,
|
|
90
|
+
);
|
|
91
|
+
path = DriftxCompanionUITests;
|
|
92
|
+
sourceTree = "<group>";
|
|
93
|
+
};
|
|
94
|
+
A70000000000000000000004 /* Products */ = {
|
|
95
|
+
isa = PBXGroup;
|
|
96
|
+
children = (
|
|
97
|
+
A20000000000000000000009 /* DriftxCompanion.app */,
|
|
98
|
+
A2000000000000000000000A /* DriftxCompanionUITests.xctest */,
|
|
99
|
+
);
|
|
100
|
+
name = Products;
|
|
101
|
+
sourceTree = "<group>";
|
|
102
|
+
};
|
|
103
|
+
A70000000000000000000005 /* Frameworks */ = {
|
|
104
|
+
isa = PBXGroup;
|
|
105
|
+
children = (
|
|
106
|
+
A20000000000000000000010 /* Network.framework */,
|
|
107
|
+
);
|
|
108
|
+
name = Frameworks;
|
|
109
|
+
sourceTree = "<group>";
|
|
110
|
+
};
|
|
111
|
+
/* End PBXGroup section */
|
|
112
|
+
|
|
113
|
+
/* Begin PBXNativeTarget section */
|
|
114
|
+
A40000000000000000000001 /* DriftxCompanion */ = {
|
|
115
|
+
isa = PBXNativeTarget;
|
|
116
|
+
buildConfigurationList = A90000000000000000000001 /* Build configuration list for PBXNativeTarget "DriftxCompanion" */;
|
|
117
|
+
buildPhases = (
|
|
118
|
+
A80000000000000000000001 /* Sources */,
|
|
119
|
+
A60000000000000000000001 /* Frameworks */,
|
|
120
|
+
AB0000000000000000000001 /* Resources */,
|
|
121
|
+
);
|
|
122
|
+
buildRules = (
|
|
123
|
+
);
|
|
124
|
+
dependencies = (
|
|
125
|
+
);
|
|
126
|
+
name = DriftxCompanion;
|
|
127
|
+
productName = DriftxCompanion;
|
|
128
|
+
productReference = A20000000000000000000009 /* DriftxCompanion.app */;
|
|
129
|
+
productType = "com.apple.product-type.application";
|
|
130
|
+
};
|
|
131
|
+
A40000000000000000000002 /* DriftxCompanionUITests */ = {
|
|
132
|
+
isa = PBXNativeTarget;
|
|
133
|
+
buildConfigurationList = A90000000000000000000002 /* Build configuration list for PBXNativeTarget "DriftxCompanionUITests" */;
|
|
134
|
+
buildPhases = (
|
|
135
|
+
A80000000000000000000002 /* Sources */,
|
|
136
|
+
A60000000000000000000002 /* Frameworks */,
|
|
137
|
+
AB0000000000000000000002 /* Resources */,
|
|
138
|
+
);
|
|
139
|
+
buildRules = (
|
|
140
|
+
);
|
|
141
|
+
dependencies = (
|
|
142
|
+
AC0000000000000000000001 /* PBXTargetDependency */,
|
|
143
|
+
);
|
|
144
|
+
name = DriftxCompanionUITests;
|
|
145
|
+
productName = DriftxCompanionUITests;
|
|
146
|
+
productReference = A2000000000000000000000A /* DriftxCompanionUITests.xctest */;
|
|
147
|
+
productType = "com.apple.product-type.bundle.ui-testing";
|
|
148
|
+
};
|
|
149
|
+
/* End PBXNativeTarget section */
|
|
150
|
+
|
|
151
|
+
/* Begin PBXProject section */
|
|
152
|
+
A50000000000000000000001 /* Project object */ = {
|
|
153
|
+
isa = PBXProject;
|
|
154
|
+
attributes = {
|
|
155
|
+
BuildIndependentTargetsInParallel = 1;
|
|
156
|
+
LastSwiftUpdateCheck = 1500;
|
|
157
|
+
LastUpgradeCheck = 1500;
|
|
158
|
+
};
|
|
159
|
+
buildConfigurationList = A90000000000000000000003 /* Build configuration list for PBXProject "DriftxCompanion" */;
|
|
160
|
+
compatibilityVersion = "Xcode 14.0";
|
|
161
|
+
developmentRegion = en;
|
|
162
|
+
hasScannedForEncodings = 0;
|
|
163
|
+
knownRegions = (
|
|
164
|
+
en,
|
|
165
|
+
Base,
|
|
166
|
+
);
|
|
167
|
+
mainGroup = A70000000000000000000001;
|
|
168
|
+
productRefGroup = A70000000000000000000004 /* Products */;
|
|
169
|
+
projectDirPath = "";
|
|
170
|
+
projectRoot = "";
|
|
171
|
+
targets = (
|
|
172
|
+
A40000000000000000000001 /* DriftxCompanion */,
|
|
173
|
+
A40000000000000000000002 /* DriftxCompanionUITests */,
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
/* End PBXProject section */
|
|
177
|
+
|
|
178
|
+
/* Begin PBXResourcesBuildPhase section */
|
|
179
|
+
AB0000000000000000000001 /* Resources */ = {
|
|
180
|
+
isa = PBXResourcesBuildPhase;
|
|
181
|
+
buildActionMask = 2147483647;
|
|
182
|
+
files = (
|
|
183
|
+
);
|
|
184
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
185
|
+
};
|
|
186
|
+
AB0000000000000000000002 /* Resources */ = {
|
|
187
|
+
isa = PBXResourcesBuildPhase;
|
|
188
|
+
buildActionMask = 2147483647;
|
|
189
|
+
files = (
|
|
190
|
+
);
|
|
191
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
192
|
+
};
|
|
193
|
+
/* End PBXResourcesBuildPhase section */
|
|
194
|
+
|
|
195
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
196
|
+
A80000000000000000000001 /* Sources */ = {
|
|
197
|
+
isa = PBXSourcesBuildPhase;
|
|
198
|
+
buildActionMask = 2147483647;
|
|
199
|
+
files = (
|
|
200
|
+
A10000000000000000000001 /* DriftxCompanionApp.swift in Sources */,
|
|
201
|
+
);
|
|
202
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
203
|
+
};
|
|
204
|
+
A80000000000000000000002 /* Sources */ = {
|
|
205
|
+
isa = PBXSourcesBuildPhase;
|
|
206
|
+
buildActionMask = 2147483647;
|
|
207
|
+
files = (
|
|
208
|
+
A10000000000000000000002 /* DriftxCompanionUITests.swift in Sources */,
|
|
209
|
+
A10000000000000000000003 /* CompanionServer.swift in Sources */,
|
|
210
|
+
A10000000000000000000004 /* Router.swift in Sources */,
|
|
211
|
+
A10000000000000000000005 /* InteractionEndpoint.swift in Sources */,
|
|
212
|
+
A10000000000000000000006 /* HierarchyEndpoint.swift in Sources */,
|
|
213
|
+
);
|
|
214
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
215
|
+
};
|
|
216
|
+
/* End PBXSourcesBuildPhase section */
|
|
217
|
+
|
|
218
|
+
/* Begin PBXTargetDependency section */
|
|
219
|
+
AC0000000000000000000001 /* PBXTargetDependency */ = {
|
|
220
|
+
isa = PBXTargetDependency;
|
|
221
|
+
target = A40000000000000000000001 /* DriftxCompanion */;
|
|
222
|
+
targetProxy = A30000000000000000000001 /* PBXContainerItemProxy */;
|
|
223
|
+
};
|
|
224
|
+
/* End PBXTargetDependency section */
|
|
225
|
+
|
|
226
|
+
/* Begin XCBuildConfiguration section */
|
|
227
|
+
B10000000000000000000001 /* Debug */ = {
|
|
228
|
+
isa = XCBuildConfiguration;
|
|
229
|
+
buildSettings = {
|
|
230
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
231
|
+
CLANG_ENABLE_MODULES = YES;
|
|
232
|
+
COPY_PHASE_STRIP = NO;
|
|
233
|
+
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
234
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
235
|
+
ENABLE_TESTABILITY = YES;
|
|
236
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
237
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
238
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
239
|
+
"DEBUG=1",
|
|
240
|
+
"$(inherited)",
|
|
241
|
+
);
|
|
242
|
+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
|
243
|
+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
|
244
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
245
|
+
SDKROOT = iphoneos;
|
|
246
|
+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
|
247
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
248
|
+
SWIFT_VERSION = 5.0;
|
|
249
|
+
};
|
|
250
|
+
name = Debug;
|
|
251
|
+
};
|
|
252
|
+
B10000000000000000000002 /* Release */ = {
|
|
253
|
+
isa = XCBuildConfiguration;
|
|
254
|
+
buildSettings = {
|
|
255
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
256
|
+
CLANG_ENABLE_MODULES = YES;
|
|
257
|
+
COPY_PHASE_STRIP = NO;
|
|
258
|
+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
259
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
260
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
261
|
+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
|
262
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
263
|
+
SDKROOT = iphoneos;
|
|
264
|
+
SWIFT_COMPILATION_MODE = wholemodule;
|
|
265
|
+
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
|
266
|
+
SWIFT_VERSION = 5.0;
|
|
267
|
+
VALIDATE_PRODUCT = YES;
|
|
268
|
+
};
|
|
269
|
+
name = Release;
|
|
270
|
+
};
|
|
271
|
+
B10000000000000000000003 /* Debug */ = {
|
|
272
|
+
isa = XCBuildConfiguration;
|
|
273
|
+
buildSettings = {
|
|
274
|
+
CODE_SIGN_IDENTITY = "";
|
|
275
|
+
CODE_SIGNING_ALLOWED = NO;
|
|
276
|
+
INFOPLIST_FILE = DriftxCompanion/Info.plist;
|
|
277
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
278
|
+
"$(inherited)",
|
|
279
|
+
"@executable_path/Frameworks",
|
|
280
|
+
);
|
|
281
|
+
PRODUCT_BUNDLE_IDENTIFIER = com.driftx.companion;
|
|
282
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
283
|
+
SWIFT_VERSION = 5.0;
|
|
284
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
285
|
+
};
|
|
286
|
+
name = Debug;
|
|
287
|
+
};
|
|
288
|
+
B10000000000000000000004 /* Release */ = {
|
|
289
|
+
isa = XCBuildConfiguration;
|
|
290
|
+
buildSettings = {
|
|
291
|
+
CODE_SIGN_IDENTITY = "";
|
|
292
|
+
CODE_SIGNING_ALLOWED = NO;
|
|
293
|
+
INFOPLIST_FILE = DriftxCompanion/Info.plist;
|
|
294
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
295
|
+
"$(inherited)",
|
|
296
|
+
"@executable_path/Frameworks",
|
|
297
|
+
);
|
|
298
|
+
PRODUCT_BUNDLE_IDENTIFIER = com.driftx.companion;
|
|
299
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
300
|
+
SWIFT_VERSION = 5.0;
|
|
301
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
302
|
+
};
|
|
303
|
+
name = Release;
|
|
304
|
+
};
|
|
305
|
+
B10000000000000000000005 /* Debug */ = {
|
|
306
|
+
isa = XCBuildConfiguration;
|
|
307
|
+
buildSettings = {
|
|
308
|
+
CODE_SIGN_IDENTITY = "";
|
|
309
|
+
CODE_SIGNING_ALLOWED = NO;
|
|
310
|
+
INFOPLIST_FILE = DriftxCompanionUITests/Info.plist;
|
|
311
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
312
|
+
"$(inherited)",
|
|
313
|
+
"@executable_path/Frameworks",
|
|
314
|
+
"@loader_path/Frameworks",
|
|
315
|
+
);
|
|
316
|
+
PRODUCT_BUNDLE_IDENTIFIER = com.driftx.companion.uitests;
|
|
317
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
318
|
+
SWIFT_VERSION = 5.0;
|
|
319
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
320
|
+
TEST_TARGET_NAME = DriftxCompanion;
|
|
321
|
+
};
|
|
322
|
+
name = Debug;
|
|
323
|
+
};
|
|
324
|
+
B10000000000000000000006 /* Release */ = {
|
|
325
|
+
isa = XCBuildConfiguration;
|
|
326
|
+
buildSettings = {
|
|
327
|
+
CODE_SIGN_IDENTITY = "";
|
|
328
|
+
CODE_SIGNING_ALLOWED = NO;
|
|
329
|
+
INFOPLIST_FILE = DriftxCompanionUITests/Info.plist;
|
|
330
|
+
LD_RUNPATH_SEARCH_PATHS = (
|
|
331
|
+
"$(inherited)",
|
|
332
|
+
"@executable_path/Frameworks",
|
|
333
|
+
"@loader_path/Frameworks",
|
|
334
|
+
);
|
|
335
|
+
PRODUCT_BUNDLE_IDENTIFIER = com.driftx.companion.uitests;
|
|
336
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
337
|
+
SWIFT_VERSION = 5.0;
|
|
338
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
339
|
+
TEST_TARGET_NAME = DriftxCompanion;
|
|
340
|
+
};
|
|
341
|
+
name = Release;
|
|
342
|
+
};
|
|
343
|
+
/* End XCBuildConfiguration section */
|
|
344
|
+
|
|
345
|
+
/* Begin XCConfigurationList section */
|
|
346
|
+
A90000000000000000000001 /* Build configuration list for PBXNativeTarget "DriftxCompanion" */ = {
|
|
347
|
+
isa = XCConfigurationList;
|
|
348
|
+
buildConfigurations = (
|
|
349
|
+
B10000000000000000000003 /* Debug */,
|
|
350
|
+
B10000000000000000000004 /* Release */,
|
|
351
|
+
);
|
|
352
|
+
defaultConfigurationIsVisible = 0;
|
|
353
|
+
defaultConfigurationName = Release;
|
|
354
|
+
};
|
|
355
|
+
A90000000000000000000002 /* Build configuration list for PBXNativeTarget "DriftxCompanionUITests" */ = {
|
|
356
|
+
isa = XCConfigurationList;
|
|
357
|
+
buildConfigurations = (
|
|
358
|
+
B10000000000000000000005 /* Debug */,
|
|
359
|
+
B10000000000000000000006 /* Release */,
|
|
360
|
+
);
|
|
361
|
+
defaultConfigurationIsVisible = 0;
|
|
362
|
+
defaultConfigurationName = Release;
|
|
363
|
+
};
|
|
364
|
+
A90000000000000000000003 /* Build configuration list for PBXProject "DriftxCompanion" */ = {
|
|
365
|
+
isa = XCConfigurationList;
|
|
366
|
+
buildConfigurations = (
|
|
367
|
+
B10000000000000000000001 /* Debug */,
|
|
368
|
+
B10000000000000000000002 /* Release */,
|
|
369
|
+
);
|
|
370
|
+
defaultConfigurationIsVisible = 0;
|
|
371
|
+
defaultConfigurationName = Release;
|
|
372
|
+
};
|
|
373
|
+
/* End XCConfigurationList section */
|
|
374
|
+
};
|
|
375
|
+
rootObject = A50000000000000000000001 /* Project object */;
|
|
376
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1500"
|
|
4
|
+
version = "1.7">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "A40000000000000000000001"
|
|
18
|
+
BuildableName = "DriftxCompanion.app"
|
|
19
|
+
BlueprintName = "DriftxCompanion"
|
|
20
|
+
ReferencedContainer = "container:DriftxCompanion.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
<BuildActionEntry
|
|
24
|
+
buildForTesting = "YES"
|
|
25
|
+
buildForRunning = "NO"
|
|
26
|
+
buildForProfiling = "NO"
|
|
27
|
+
buildForArchiving = "NO"
|
|
28
|
+
buildForAnalyzing = "NO">
|
|
29
|
+
<BuildableReference
|
|
30
|
+
BuildableIdentifier = "primary"
|
|
31
|
+
BlueprintIdentifier = "A40000000000000000000002"
|
|
32
|
+
BuildableName = "DriftxCompanionUITests.xctest"
|
|
33
|
+
BlueprintName = "DriftxCompanionUITests"
|
|
34
|
+
ReferencedContainer = "container:DriftxCompanion.xcodeproj">
|
|
35
|
+
</BuildableReference>
|
|
36
|
+
</BuildActionEntry>
|
|
37
|
+
</BuildActionEntries>
|
|
38
|
+
</BuildAction>
|
|
39
|
+
<TestAction
|
|
40
|
+
buildConfiguration = "Debug"
|
|
41
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
42
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
43
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
44
|
+
<Testables>
|
|
45
|
+
<TestableReference
|
|
46
|
+
skipped = "NO">
|
|
47
|
+
<BuildableReference
|
|
48
|
+
BuildableIdentifier = "primary"
|
|
49
|
+
BlueprintIdentifier = "A40000000000000000000002"
|
|
50
|
+
BuildableName = "DriftxCompanionUITests.xctest"
|
|
51
|
+
BlueprintName = "DriftxCompanionUITests"
|
|
52
|
+
ReferencedContainer = "container:DriftxCompanion.xcodeproj">
|
|
53
|
+
</BuildableReference>
|
|
54
|
+
</TestableReference>
|
|
55
|
+
</Testables>
|
|
56
|
+
<EnvironmentVariables>
|
|
57
|
+
<EnvironmentVariable
|
|
58
|
+
key = "DRIFTX_PORT"
|
|
59
|
+
value = ""
|
|
60
|
+
isEnabled = "NO">
|
|
61
|
+
</EnvironmentVariable>
|
|
62
|
+
</EnvironmentVariables>
|
|
63
|
+
</TestAction>
|
|
64
|
+
<LaunchAction
|
|
65
|
+
buildConfiguration = "Debug"
|
|
66
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
67
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
68
|
+
launchStyle = "0"
|
|
69
|
+
useCustomWorkingDirectory = "NO"
|
|
70
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
71
|
+
debugDocumentVersioning = "YES"
|
|
72
|
+
debugServiceExtension = "internal"
|
|
73
|
+
allowLocationSimulation = "YES">
|
|
74
|
+
<BuildableProductRunnable
|
|
75
|
+
runnableDebuggingMode = "0">
|
|
76
|
+
<BuildableReference
|
|
77
|
+
BuildableIdentifier = "primary"
|
|
78
|
+
BlueprintIdentifier = "A40000000000000000000001"
|
|
79
|
+
BuildableName = "DriftxCompanion.app"
|
|
80
|
+
BlueprintName = "DriftxCompanion"
|
|
81
|
+
ReferencedContainer = "container:DriftxCompanion.xcodeproj">
|
|
82
|
+
</BuildableReference>
|
|
83
|
+
</BuildableProductRunnable>
|
|
84
|
+
</LaunchAction>
|
|
85
|
+
<ProfileAction
|
|
86
|
+
buildConfiguration = "Release"
|
|
87
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
88
|
+
savedToolIdentifier = ""
|
|
89
|
+
useCustomWorkingDirectory = "NO"
|
|
90
|
+
debugDocumentVersioning = "YES">
|
|
91
|
+
<BuildableProductRunnable
|
|
92
|
+
runnableDebuggingMode = "0">
|
|
93
|
+
<BuildableReference
|
|
94
|
+
BuildableIdentifier = "primary"
|
|
95
|
+
BlueprintIdentifier = "A40000000000000000000001"
|
|
96
|
+
BuildableName = "DriftxCompanion.app"
|
|
97
|
+
BlueprintName = "DriftxCompanion"
|
|
98
|
+
ReferencedContainer = "container:DriftxCompanion.xcodeproj">
|
|
99
|
+
</BuildableReference>
|
|
100
|
+
</BuildableProductRunnable>
|
|
101
|
+
</ProfileAction>
|
|
102
|
+
<AnalyzeAction
|
|
103
|
+
buildConfiguration = "Debug">
|
|
104
|
+
</AnalyzeAction>
|
|
105
|
+
<ArchiveAction
|
|
106
|
+
buildConfiguration = "Release"
|
|
107
|
+
revealArchiveInOrganizer = "YES">
|
|
108
|
+
</ArchiveAction>
|
|
109
|
+
</Scheme>
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Network
|
|
3
|
+
import XCTest
|
|
4
|
+
|
|
5
|
+
final class CompanionServer {
|
|
6
|
+
private let port: UInt16
|
|
7
|
+
private var app: XCUIApplication
|
|
8
|
+
private let router: Router
|
|
9
|
+
private var listener: NWListener?
|
|
10
|
+
private let queue = DispatchQueue(label: "com.driftx.companion.server", attributes: .concurrent)
|
|
11
|
+
|
|
12
|
+
init(port: UInt16, app: XCUIApplication) {
|
|
13
|
+
self.port = port
|
|
14
|
+
self.app = app
|
|
15
|
+
self.router = Router()
|
|
16
|
+
router.register(method: "GET", path: "/status") { _ in
|
|
17
|
+
return (200, Router.jsonResponse(["status": "ready"]))
|
|
18
|
+
}
|
|
19
|
+
router.register(method: "POST", path: "/configure") { [weak self] body in
|
|
20
|
+
guard let self = self,
|
|
21
|
+
let json = parseJSONBody(body),
|
|
22
|
+
let bundleId = json["bundleId"] as? String, !bundleId.isEmpty else {
|
|
23
|
+
return (400, Router.jsonResponse(["success": false, "error": "Missing bundleId"]))
|
|
24
|
+
}
|
|
25
|
+
DispatchQueue.main.sync {
|
|
26
|
+
let newApp = XCUIApplication(bundleIdentifier: bundleId)
|
|
27
|
+
newApp.activate()
|
|
28
|
+
self.app = newApp
|
|
29
|
+
InteractionEndpoint.register(on: self.router, app: newApp)
|
|
30
|
+
HierarchyEndpoint.register(on: self.router, app: newApp)
|
|
31
|
+
}
|
|
32
|
+
return (200, Router.jsonResponse(["success": true, "bundleId": bundleId]))
|
|
33
|
+
}
|
|
34
|
+
InteractionEndpoint.register(on: router, app: app)
|
|
35
|
+
HierarchyEndpoint.register(on: router, app: app)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
func start() {
|
|
39
|
+
let params = NWParameters.tcp
|
|
40
|
+
params.allowLocalEndpointReuse = true
|
|
41
|
+
|
|
42
|
+
guard let nwPort = NWEndpoint.Port(rawValue: port) else {
|
|
43
|
+
fatalError("Invalid port: \(port)")
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
do {
|
|
47
|
+
listener = try NWListener(using: params, on: nwPort)
|
|
48
|
+
} catch {
|
|
49
|
+
fatalError("Failed to create listener: \(error)")
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
listener?.stateUpdateHandler = { state in
|
|
53
|
+
switch state {
|
|
54
|
+
case .ready:
|
|
55
|
+
print("[DriftxCompanion] Server listening on port \(self.port)")
|
|
56
|
+
case .failed(let error):
|
|
57
|
+
fatalError("[DriftxCompanion] Listener failed: \(error)")
|
|
58
|
+
default:
|
|
59
|
+
break
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
listener?.newConnectionHandler = { [weak self] connection in
|
|
64
|
+
self?.handleConnection(connection)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
listener?.start(queue: queue)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
func stop() {
|
|
71
|
+
listener?.cancel()
|
|
72
|
+
listener = nil
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private func handleConnection(_ connection: NWConnection) {
|
|
76
|
+
connection.start(queue: queue)
|
|
77
|
+
receiveRequest(connection: connection, buffer: Data())
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private func receiveRequest(connection: NWConnection, buffer: Data) {
|
|
81
|
+
connection.receive(minimumIncompleteLength: 1, maximumLength: 65536) { [weak self] content, _, isComplete, error in
|
|
82
|
+
guard let self = self else { return }
|
|
83
|
+
|
|
84
|
+
if let error = error {
|
|
85
|
+
print("[DriftxCompanion] Receive error: \(error)")
|
|
86
|
+
connection.cancel()
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
var accumulated = buffer
|
|
91
|
+
if let content = content {
|
|
92
|
+
accumulated.append(content)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if let request = self.parseHTTPRequest(accumulated) {
|
|
96
|
+
self.dispatch(request: request, connection: connection)
|
|
97
|
+
} else if isComplete {
|
|
98
|
+
connection.cancel()
|
|
99
|
+
} else {
|
|
100
|
+
self.receiveRequest(connection: connection, buffer: accumulated)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private struct HTTPRequest {
|
|
106
|
+
let method: String
|
|
107
|
+
let path: String
|
|
108
|
+
let headers: [String: String]
|
|
109
|
+
let body: Data?
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private func parseHTTPRequest(_ data: Data) -> HTTPRequest? {
|
|
113
|
+
guard let str = String(data: data, encoding: .utf8) else { return nil }
|
|
114
|
+
guard let headerEnd = str.range(of: "\r\n\r\n") else { return nil }
|
|
115
|
+
|
|
116
|
+
let headerSection = String(str[str.startIndex..<headerEnd.lowerBound])
|
|
117
|
+
let lines = headerSection.components(separatedBy: "\r\n")
|
|
118
|
+
guard let requestLine = lines.first else { return nil }
|
|
119
|
+
|
|
120
|
+
let parts = requestLine.components(separatedBy: " ")
|
|
121
|
+
guard parts.count >= 2 else { return nil }
|
|
122
|
+
|
|
123
|
+
let method = parts[0]
|
|
124
|
+
let path = parts[1]
|
|
125
|
+
|
|
126
|
+
var headers: [String: String] = [:]
|
|
127
|
+
for line in lines.dropFirst() {
|
|
128
|
+
if let colonIndex = line.firstIndex(of: ":") {
|
|
129
|
+
let key = String(line[line.startIndex..<colonIndex]).trimmingCharacters(in: .whitespaces).lowercased()
|
|
130
|
+
let value = String(line[line.index(after: colonIndex)...]).trimmingCharacters(in: .whitespaces)
|
|
131
|
+
headers[key] = value
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let bodyStart = str[headerEnd.upperBound...]
|
|
136
|
+
let bodyData = Data(bodyStart.utf8)
|
|
137
|
+
|
|
138
|
+
if let contentLengthStr = headers["content-length"], let contentLength = Int(contentLengthStr) {
|
|
139
|
+
if bodyData.count < contentLength {
|
|
140
|
+
return nil
|
|
141
|
+
}
|
|
142
|
+
return HTTPRequest(method: method, path: path, headers: headers, body: bodyData.prefix(contentLength))
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return HTTPRequest(method: method, path: path, headers: headers, body: bodyData.isEmpty ? nil : bodyData)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
private func dispatch(request: HTTPRequest, connection: NWConnection) {
|
|
149
|
+
let (statusCode, responseBody) = router.handle(method: request.method, path: request.path, body: request.body)
|
|
150
|
+
sendResponse(connection: connection, statusCode: statusCode, body: responseBody)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private func sendResponse(connection: NWConnection, statusCode: Int, body: Data) {
|
|
154
|
+
let statusText: String
|
|
155
|
+
switch statusCode {
|
|
156
|
+
case 200: statusText = "OK"
|
|
157
|
+
case 400: statusText = "Bad Request"
|
|
158
|
+
case 404: statusText = "Not Found"
|
|
159
|
+
case 500: statusText = "Internal Server Error"
|
|
160
|
+
default: statusText = "Unknown"
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
var response = "HTTP/1.1 \(statusCode) \(statusText)\r\n"
|
|
164
|
+
response += "Content-Type: application/json\r\n"
|
|
165
|
+
response += "Content-Length: \(body.count)\r\n"
|
|
166
|
+
response += "Connection: close\r\n"
|
|
167
|
+
response += "\r\n"
|
|
168
|
+
|
|
169
|
+
var responseData = Data(response.utf8)
|
|
170
|
+
responseData.append(body)
|
|
171
|
+
|
|
172
|
+
connection.send(content: responseData, completion: .contentProcessed { _ in
|
|
173
|
+
connection.cancel()
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import XCTest
|
|
2
|
+
|
|
3
|
+
final class DriftxCompanionUITests: XCTestCase {
|
|
4
|
+
func testCompanionServer() throws {
|
|
5
|
+
let port = UInt16(ProcessInfo.processInfo.environment["DRIFTX_PORT"] ?? "8300") ?? 8300
|
|
6
|
+
let app = XCUIApplication(bundleIdentifier: "com.apple.springboard")
|
|
7
|
+
|
|
8
|
+
let server = CompanionServer(port: port, app: app)
|
|
9
|
+
server.start()
|
|
10
|
+
|
|
11
|
+
let exp = expectation(description: "Server running")
|
|
12
|
+
exp.isInverted = true
|
|
13
|
+
wait(for: [exp], timeout: 86400)
|
|
14
|
+
}
|
|
15
|
+
}
|