Skip to content

Commit 9fc942e

Browse files
authored
Merge pull request #5 from dustturtle/copilot/update-ios-app-demo
Add runnable iOS SwiftUI demo app with encapsulated SocketManager
2 parents 832eb80 + 0ac6edf commit 9fc942e

13 files changed

Lines changed: 1160 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ DerivedData/
66
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
77
.netrc
88
*.xcodeproj
9+
!Examples/iOSDemo/iOSDemo.xcodeproj
910
_codeql_detected_source_root
Lines changed: 384 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,384 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 56;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
A1000001 /* iOSDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000001 /* iOSDemoApp.swift */; };
11+
A1000002 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000002 /* ContentView.swift */; };
12+
A1000003 /* SocketManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000003 /* SocketManager.swift */; };
13+
A1000004 /* StreamBufferDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000004 /* StreamBufferDemoView.swift */; };
14+
A1000005 /* SSEParserDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000005 /* SSEParserDemoView.swift */; };
15+
A1000006 /* UTF8SafetyDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000006 /* UTF8SafetyDemoView.swift */; };
16+
A1000007 /* SocketConnectionDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000007 /* SocketConnectionDemoView.swift */; };
17+
A1000008 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2000008 /* Assets.xcassets */; };
18+
A1000009 /* NWAsyncSocket in Frameworks */ = {isa = PBXBuildFile; productRef = A6000001 /* NWAsyncSocket */; };
19+
/* End PBXBuildFile section */
20+
21+
/* Begin PBXFileReference section */
22+
A2000001 /* iOSDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSDemoApp.swift; sourceTree = "<group>"; };
23+
A2000002 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
24+
A2000003 /* SocketManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocketManager.swift; sourceTree = "<group>"; };
25+
A2000004 /* StreamBufferDemoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreamBufferDemoView.swift; sourceTree = "<group>"; };
26+
A2000005 /* SSEParserDemoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSEParserDemoView.swift; sourceTree = "<group>"; };
27+
A2000006 /* UTF8SafetyDemoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UTF8SafetyDemoView.swift; sourceTree = "<group>"; };
28+
A2000007 /* SocketConnectionDemoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocketConnectionDemoView.swift; sourceTree = "<group>"; };
29+
A2000008 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
30+
A2000010 /* iOSDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
31+
/* End PBXFileReference section */
32+
33+
/* Begin PBXFrameworksBuildPhase section */
34+
A3000001 /* Frameworks */ = {
35+
isa = PBXFrameworksBuildPhase;
36+
buildActionMask = 2147483647;
37+
files = (
38+
A1000009 /* NWAsyncSocket in Frameworks */,
39+
);
40+
runOnlyForDeploymentPostprocessing = 0;
41+
};
42+
/* End PBXFrameworksBuildPhase section */
43+
44+
/* Begin PBXGroup section */
45+
A4000001 /* Root */ = {
46+
isa = PBXGroup;
47+
children = (
48+
A4000002 /* iOSDemo */,
49+
A4000004 /* Products */,
50+
);
51+
sourceTree = "<group>";
52+
};
53+
A4000002 /* iOSDemo */ = {
54+
isa = PBXGroup;
55+
children = (
56+
A2000001 /* iOSDemoApp.swift */,
57+
A2000002 /* ContentView.swift */,
58+
A2000003 /* SocketManager.swift */,
59+
A4000003 /* Views */,
60+
A2000008 /* Assets.xcassets */,
61+
);
62+
path = iOSDemo;
63+
sourceTree = "<group>";
64+
};
65+
A4000003 /* Views */ = {
66+
isa = PBXGroup;
67+
children = (
68+
A2000004 /* StreamBufferDemoView.swift */,
69+
A2000005 /* SSEParserDemoView.swift */,
70+
A2000006 /* UTF8SafetyDemoView.swift */,
71+
A2000007 /* SocketConnectionDemoView.swift */,
72+
);
73+
path = Views;
74+
sourceTree = "<group>";
75+
};
76+
A4000004 /* Products */ = {
77+
isa = PBXGroup;
78+
children = (
79+
A2000010 /* iOSDemo.app */,
80+
);
81+
name = Products;
82+
sourceTree = "<group>";
83+
};
84+
/* End PBXGroup section */
85+
86+
/* Begin PBXNativeTarget section */
87+
A5000001 /* iOSDemo */ = {
88+
isa = PBXNativeTarget;
89+
buildConfigurationList = A8000003 /* Build configuration list for PBXNativeTarget "iOSDemo" */;
90+
buildPhases = (
91+
A3000002 /* Sources */,
92+
A3000001 /* Frameworks */,
93+
A3000003 /* Resources */,
94+
);
95+
buildRules = (
96+
);
97+
dependencies = (
98+
);
99+
name = iOSDemo;
100+
packageProductDependencies = (
101+
A6000001 /* NWAsyncSocket */,
102+
);
103+
productName = iOSDemo;
104+
productReference = A2000010 /* iOSDemo.app */;
105+
productType = "com.apple.product-type.application";
106+
};
107+
/* End PBXNativeTarget section */
108+
109+
/* Begin PBXProject section */
110+
A7000001 /* Project object */ = {
111+
isa = PBXProject;
112+
attributes = {
113+
BuildIndependentTargetsInParallel = 1;
114+
LastSwiftUpdateCheck = 1500;
115+
LastUpgradeCheck = 1500;
116+
TargetAttributes = {
117+
A5000001 = {
118+
CreatedOnToolsVersion = 15.0;
119+
};
120+
};
121+
};
122+
buildConfigurationList = A8000001 /* Build configuration list for PBXProject "iOSDemo" */;
123+
compatibilityVersion = "Xcode 14.0";
124+
developmentRegion = en;
125+
hasScannedForEncodings = 0;
126+
knownRegions = (
127+
en,
128+
Base,
129+
);
130+
mainGroup = A4000001 /* Root */;
131+
packageReferences = (
132+
A6000002 /* XCLocalSwiftPackageReference "../../" */,
133+
);
134+
productRefGroup = A4000004 /* Products */;
135+
projectDirPath = "";
136+
projectRoot = "";
137+
targets = (
138+
A5000001 /* iOSDemo */,
139+
);
140+
};
141+
/* End PBXProject section */
142+
143+
/* Begin PBXResourcesBuildPhase section */
144+
A3000003 /* Resources */ = {
145+
isa = PBXResourcesBuildPhase;
146+
buildActionMask = 2147483647;
147+
files = (
148+
A1000008 /* Assets.xcassets in Resources */,
149+
);
150+
runOnlyForDeploymentPostprocessing = 0;
151+
};
152+
/* End PBXResourcesBuildPhase section */
153+
154+
/* Begin PBXSourcesBuildPhase section */
155+
A3000002 /* Sources */ = {
156+
isa = PBXSourcesBuildPhase;
157+
buildActionMask = 2147483647;
158+
files = (
159+
A1000001 /* iOSDemoApp.swift in Sources */,
160+
A1000002 /* ContentView.swift in Sources */,
161+
A1000003 /* SocketManager.swift in Sources */,
162+
A1000004 /* StreamBufferDemoView.swift in Sources */,
163+
A1000005 /* SSEParserDemoView.swift in Sources */,
164+
A1000006 /* UTF8SafetyDemoView.swift in Sources */,
165+
A1000007 /* SocketConnectionDemoView.swift in Sources */,
166+
);
167+
runOnlyForDeploymentPostprocessing = 0;
168+
};
169+
/* End PBXSourcesBuildPhase section */
170+
171+
/* Begin XCBuildConfiguration section */
172+
A9000001 /* Debug */ = {
173+
isa = XCBuildConfiguration;
174+
buildSettings = {
175+
ALWAYS_SEARCH_USER_PATHS = NO;
176+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
177+
CLANG_ANALYZER_NONNULL = YES;
178+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
179+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
180+
CLANG_ENABLE_MODULES = YES;
181+
CLANG_ENABLE_OBJC_ARC = YES;
182+
CLANG_ENABLE_OBJC_WEAK = YES;
183+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
184+
CLANG_WARN_BOOL_CONVERSION = YES;
185+
CLANG_WARN_COMMA = YES;
186+
CLANG_WARN_CONSTANT_CONVERSION = YES;
187+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
188+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
189+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
190+
CLANG_WARN_EMPTY_BODY = YES;
191+
CLANG_WARN_ENUM_CONVERSION = YES;
192+
CLANG_WARN_INFINITE_RECURSION = YES;
193+
CLANG_WARN_INT_CONVERSION = YES;
194+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
195+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
196+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
197+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
198+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
199+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
200+
CLANG_WARN_STRICT_PROTOTYPES = YES;
201+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
202+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
203+
CLANG_WARN_UNREACHABLE_CODE = YES;
204+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
205+
COPY_PHASE_STRIP = NO;
206+
DEBUG_INFORMATION_FORMAT = dwarf;
207+
ENABLE_STRICT_OBJC_MSGSEND = YES;
208+
ENABLE_TESTABILITY = YES;
209+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
210+
GCC_C_LANGUAGE_STANDARD = gnu17;
211+
GCC_DYNAMIC_NO_PIC = NO;
212+
GCC_NO_COMMON_BLOCKS = YES;
213+
GCC_OPTIMIZATION_LEVEL = 0;
214+
GCC_PREPROCESSOR_DEFINITIONS = (
215+
"DEBUG=1",
216+
"$(inherited)",
217+
);
218+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
219+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
220+
GCC_WARN_UNDECLARED_SELECTOR = YES;
221+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
222+
GCC_WARN_UNUSED_FUNCTION = YES;
223+
GCC_WARN_UNUSED_VARIABLE = YES;
224+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
225+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
226+
MTL_FAST_MATH = YES;
227+
ONLY_ACTIVE_ARCH = YES;
228+
SDKROOT = iphoneos;
229+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
230+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
231+
};
232+
name = Debug;
233+
};
234+
A9000002 /* Release */ = {
235+
isa = XCBuildConfiguration;
236+
buildSettings = {
237+
ALWAYS_SEARCH_USER_PATHS = NO;
238+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
239+
CLANG_ANALYZER_NONNULL = YES;
240+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
241+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
242+
CLANG_ENABLE_MODULES = YES;
243+
CLANG_ENABLE_OBJC_ARC = YES;
244+
CLANG_ENABLE_OBJC_WEAK = YES;
245+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
246+
CLANG_WARN_BOOL_CONVERSION = YES;
247+
CLANG_WARN_COMMA = YES;
248+
CLANG_WARN_CONSTANT_CONVERSION = YES;
249+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
250+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
251+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
252+
CLANG_WARN_EMPTY_BODY = YES;
253+
CLANG_WARN_ENUM_CONVERSION = YES;
254+
CLANG_WARN_INFINITE_RECURSION = YES;
255+
CLANG_WARN_INT_CONVERSION = YES;
256+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
257+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
258+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
259+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
260+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
261+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
262+
CLANG_WARN_STRICT_PROTOTYPES = YES;
263+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
264+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
265+
CLANG_WARN_UNREACHABLE_CODE = YES;
266+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
267+
COPY_PHASE_STRIP = NO;
268+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
269+
ENABLE_NS_ASSERTIONS = NO;
270+
ENABLE_STRICT_OBJC_MSGSEND = YES;
271+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
272+
GCC_C_LANGUAGE_STANDARD = gnu17;
273+
GCC_NO_COMMON_BLOCKS = YES;
274+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
275+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
276+
GCC_WARN_UNDECLARED_SELECTOR = YES;
277+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
278+
GCC_WARN_UNUSED_FUNCTION = YES;
279+
GCC_WARN_UNUSED_VARIABLE = YES;
280+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
281+
MTL_ENABLE_DEBUG_INFO = NO;
282+
MTL_FAST_MATH = YES;
283+
SDKROOT = iphoneos;
284+
SWIFT_COMPILATION_MODE = wholemodule;
285+
VALIDATE_PRODUCT = YES;
286+
};
287+
name = Release;
288+
};
289+
A9000003 /* Debug */ = {
290+
isa = XCBuildConfiguration;
291+
buildSettings = {
292+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
293+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
294+
CODE_SIGN_STYLE = Automatic;
295+
CURRENT_PROJECT_VERSION = 1;
296+
DEVELOPMENT_TEAM = "";
297+
ENABLE_PREVIEWS = YES;
298+
GENERATE_INFOPLIST_FILE = YES;
299+
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
300+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
301+
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
302+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
303+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
304+
LD_RUNPATH_SEARCH_PATHS = (
305+
"$(inherited)",
306+
"@executable_path/Frameworks",
307+
);
308+
MARKETING_VERSION = 1.0;
309+
PRODUCT_BUNDLE_IDENTIFIER = com.nwasyncsocket.iOSDemo;
310+
PRODUCT_NAME = "$(TARGET_NAME)";
311+
SWIFT_EMIT_LOC_STRINGS = YES;
312+
SWIFT_VERSION = 5.0;
313+
TARGETED_DEVICE_FAMILY = "1,2";
314+
};
315+
name = Debug;
316+
};
317+
A9000004 /* Release */ = {
318+
isa = XCBuildConfiguration;
319+
buildSettings = {
320+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
321+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
322+
CODE_SIGN_STYLE = Automatic;
323+
CURRENT_PROJECT_VERSION = 1;
324+
DEVELOPMENT_TEAM = "";
325+
ENABLE_PREVIEWS = YES;
326+
GENERATE_INFOPLIST_FILE = YES;
327+
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
328+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
329+
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
330+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
331+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
332+
LD_RUNPATH_SEARCH_PATHS = (
333+
"$(inherited)",
334+
"@executable_path/Frameworks",
335+
);
336+
MARKETING_VERSION = 1.0;
337+
PRODUCT_BUNDLE_IDENTIFIER = com.nwasyncsocket.iOSDemo;
338+
PRODUCT_NAME = "$(TARGET_NAME)";
339+
SWIFT_EMIT_LOC_STRINGS = YES;
340+
SWIFT_VERSION = 5.0;
341+
TARGETED_DEVICE_FAMILY = "1,2";
342+
};
343+
name = Release;
344+
};
345+
/* End XCBuildConfiguration section */
346+
347+
/* Begin XCConfigurationList section */
348+
A8000001 /* Build configuration list for PBXProject "iOSDemo" */ = {
349+
isa = XCConfigurationList;
350+
buildConfigurations = (
351+
A9000001 /* Debug */,
352+
A9000002 /* Release */,
353+
);
354+
defaultConfigurationIsVisible = 0;
355+
defaultConfigurationName = Release;
356+
};
357+
A8000003 /* Build configuration list for PBXNativeTarget "iOSDemo" */ = {
358+
isa = XCConfigurationList;
359+
buildConfigurations = (
360+
A9000003 /* Debug */,
361+
A9000004 /* Release */,
362+
);
363+
defaultConfigurationIsVisible = 0;
364+
defaultConfigurationName = Release;
365+
};
366+
/* End XCConfigurationList section */
367+
368+
/* Begin XCLocalSwiftPackageReference section */
369+
A6000002 /* XCLocalSwiftPackageReference "../../" */ = {
370+
isa = XCLocalSwiftPackageReference;
371+
relativePath = "../../";
372+
};
373+
/* End XCLocalSwiftPackageReference section */
374+
375+
/* Begin XCSwiftPackageProductDependency section */
376+
A6000001 /* NWAsyncSocket */ = {
377+
isa = XCSwiftPackageProductDependency;
378+
productName = NWAsyncSocket;
379+
};
380+
/* End XCSwiftPackageProductDependency section */
381+
382+
};
383+
rootObject = A7000001 /* Project object */;
384+
}

0 commit comments

Comments
 (0)