WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 67dbb97

Browse files
authored
Merge pull request #49 from orchetect/tcp
TCP Support
2 parents 2282a74 + a22228f commit 67dbb97

File tree

140 files changed

+3680
-626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+3680
-626
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: build
2+
permissions:
3+
contents: read
24

35
on:
46
push:
@@ -133,27 +135,32 @@ jobs:
133135
with:
134136
xcode-version: latest-stable
135137

136-
- name: Basic Example - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
137-
run: xcodebuild -project "Examples/Basic Example/Basic Example.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
138-
- name: Basic Example - Build
139-
run: xcodebuild build -project "Examples/Basic Example/Basic Example.xcodeproj" -scheme "Basic Example" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
138+
- name: Custom Type - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
139+
run: xcodebuild -project "Examples/Custom Type/Custom OSC Type.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
140+
- name: Custom Type - Build
141+
run: xcodebuild build -project "Examples/Custom Type/Custom OSC Type.xcodeproj" -scheme "Custom OSC Type" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
140142

141-
- name: Custom Type Example - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
142-
run: xcodebuild -project "Examples/Custom Type Example/Custom Type Example.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
143-
- name: Custom Type Example - Build
144-
run: xcodebuild build -project "Examples/Custom Type Example/Custom Type Example.xcodeproj" -scheme "Custom Type Example" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
143+
- name: Method Blocks - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
144+
run: xcodebuild -project "Examples/Method Blocks/OSC Method Blocks.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
145+
- name: Method Blocks - Build
146+
run: xcodebuild build -project "Examples/Method Blocks/OSC Method Blocks.xcodeproj" -scheme "OSC Method Blocks" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
145147

146-
- name: Method Blocks Example - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
147-
run: xcodebuild -project "Examples/Method Blocks Example/Method Blocks Example.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
148-
- name: Method Blocks Example - Build
149-
run: xcodebuild build -project "Examples/Method Blocks Example/Method Blocks Example.xcodeproj" -scheme "Method Blocks Example" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
148+
- name: Method IDs - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
149+
run: xcodebuild -project "Examples/Method IDs/OSC Method IDs.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
150+
- name: Method IDs - Build
151+
run: xcodebuild build -project "Examples/Method IDs/OSC Method IDs.xcodeproj" -scheme "OSC Method IDs" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
150152

151-
- name: Method IDs Example - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
152-
run: xcodebuild -project "Examples/Method IDs Example/Method IDs Example.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
153-
- name: Method IDs Example - Build
154-
run: xcodebuild build -project "Examples/Method IDs Example/Method IDs Example.xcodeproj" -scheme "Method IDs Example" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
153+
- name: TCP Client and Server - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
154+
run: xcodebuild -project "Examples/TCP Client and Server/OSC TCP Client and Server.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
155+
- name: TCP Client and Server - Build
156+
run: xcodebuild build -project "Examples/TCP Client and Server/OSC TCP Client and Server.xcodeproj" -scheme "OSC TCP Client and Server" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
155157

156-
- name: Socket Example - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
157-
run: xcodebuild -project "Examples/Socket Example/Socket Example.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
158-
- name: Socket Example - Build
159-
run: xcodebuild build -project "Examples/Socket Example/Socket Example.xcodeproj" -scheme "Socket Example" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
158+
- name: UDP Client and Server - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
159+
run: xcodebuild -project "Examples/UDP Client and Server/OSC UDP Client and Server.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
160+
- name: UDP Client and Server - Build
161+
run: xcodebuild build -project "Examples/UDP Client and Server/OSC UDP Client and Server.xcodeproj" -scheme "OSC UDP Client and Server" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
162+
163+
- name: UDP Socket - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
164+
run: xcodebuild -project "Examples/UDP Socket/OSC UDP Socket.xcodeproj" -resolvePackageDependencies | xcbeautify && exit ${PIPESTATUS[0]}
165+
- name: UDP Socket - Build
166+
run: xcodebuild build -project "Examples/UDP Socket/OSC UDP Socket.xcodeproj" -scheme "OSC UDP Socket" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}

Examples/Custom Type Example/Custom Type Example.xcodeproj/project.pbxproj renamed to Examples/Custom Type/Custom OSC Type.xcodeproj/project.pbxproj

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
E2A34EBB2CD1FB5D00950E78 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2A34EBA2CD1FB5C00950E78 /* ContentView.swift */; };
1212
E2CE6F082CCF22A800F81BCE /* OSCKit in Frameworks */ = {isa = PBXBuildFile; productRef = E2CE6F072CCF22A800F81BCE /* OSCKit */; };
1313
E2CE6F132CCF2EF300F81BCE /* CustomType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CE6F122CCF2EE400F81BCE /* CustomType.swift */; };
14-
E2D003D5289882820073ED8F /* CustomTypeExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2D003D4289882820073ED8F /* CustomTypeExampleApp.swift */; };
14+
E2D003D5289882820073ED8F /* CustomOSCTypeApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2D003D4289882820073ED8F /* CustomOSCTypeApp.swift */; };
1515
E2D003E82898834E0073ED8F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2D003E52898834E0073ED8F /* Assets.xcassets */; };
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXFileReference section */
1919
E22C84402CA8C57C00FA3C54 /* OSCManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCManager.swift; sourceTree = "<group>"; };
2020
E2A34EBA2CD1FB5C00950E78 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
2121
E2CE6F122CCF2EE400F81BCE /* CustomType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomType.swift; sourceTree = "<group>"; };
22-
E2D003D1289882820073ED8F /* Custom Type Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Custom Type Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
23-
E2D003D4289882820073ED8F /* CustomTypeExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTypeExampleApp.swift; sourceTree = "<group>"; };
24-
E2D003E42898834E0073ED8F /* Custom Type Example.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = "Custom Type Example.entitlements"; sourceTree = "<group>"; };
22+
E2D003D1289882820073ED8F /* Custom OSC Type.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Custom OSC Type.app"; sourceTree = BUILT_PRODUCTS_DIR; };
23+
E2D003D4289882820073ED8F /* CustomOSCTypeApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomOSCTypeApp.swift; sourceTree = "<group>"; };
24+
E2D003E42898834E0073ED8F /* Custom OSC Type.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = "Custom OSC Type.entitlements"; sourceTree = "<group>"; };
2525
E2D003E52898834E0073ED8F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2626
/* End PBXFileReference section */
2727

@@ -40,35 +40,35 @@
4040
E2D003C8289882820073ED8F = {
4141
isa = PBXGroup;
4242
children = (
43-
E2D003D3289882820073ED8F /* Custom Type Example */,
43+
E2D003D3289882820073ED8F /* Custom OSC Type */,
4444
E2D003D2289882820073ED8F /* Products */,
4545
);
4646
sourceTree = "<group>";
4747
};
4848
E2D003D2289882820073ED8F /* Products */ = {
4949
isa = PBXGroup;
5050
children = (
51-
E2D003D1289882820073ED8F /* Custom Type Example.app */,
51+
E2D003D1289882820073ED8F /* Custom OSC Type.app */,
5252
);
5353
name = Products;
5454
sourceTree = "<group>";
5555
};
56-
E2D003D3289882820073ED8F /* Custom Type Example */ = {
56+
E2D003D3289882820073ED8F /* Custom OSC Type */ = {
5757
isa = PBXGroup;
5858
children = (
5959
E2D003E32898834E0073ED8F /* Support */,
60-
E2D003D4289882820073ED8F /* CustomTypeExampleApp.swift */,
60+
E2D003D4289882820073ED8F /* CustomOSCTypeApp.swift */,
6161
E2A34EBA2CD1FB5C00950E78 /* ContentView.swift */,
6262
E22C84402CA8C57C00FA3C54 /* OSCManager.swift */,
6363
E2CE6F122CCF2EE400F81BCE /* CustomType.swift */,
6464
);
65-
path = "Custom Type Example";
65+
path = "Custom OSC Type";
6666
sourceTree = "<group>";
6767
};
6868
E2D003E32898834E0073ED8F /* Support */ = {
6969
isa = PBXGroup;
7070
children = (
71-
E2D003E42898834E0073ED8F /* Custom Type Example.entitlements */,
71+
E2D003E42898834E0073ED8F /* Custom OSC Type.entitlements */,
7272
E2D003E52898834E0073ED8F /* Assets.xcassets */,
7373
);
7474
path = Support;
@@ -77,9 +77,9 @@
7777
/* End PBXGroup section */
7878

7979
/* Begin PBXNativeTarget section */
80-
E2D003D0289882820073ED8F /* Custom Type Example */ = {
80+
E2D003D0289882820073ED8F /* Custom OSC Type */ = {
8181
isa = PBXNativeTarget;
82-
buildConfigurationList = E2D003E0289882850073ED8F /* Build configuration list for PBXNativeTarget "Custom Type Example" */;
82+
buildConfigurationList = E2D003E0289882850073ED8F /* Build configuration list for PBXNativeTarget "Custom OSC Type" */;
8383
buildPhases = (
8484
E2D003CD289882820073ED8F /* Sources */,
8585
E2D003CE289882820073ED8F /* Frameworks */,
@@ -89,12 +89,12 @@
8989
);
9090
dependencies = (
9191
);
92-
name = "Custom Type Example";
92+
name = "Custom OSC Type";
9393
packageProductDependencies = (
9494
E2CE6F072CCF22A800F81BCE /* OSCKit */,
9595
);
9696
productName = OSCKitBasicExample;
97-
productReference = E2D003D1289882820073ED8F /* Custom Type Example.app */;
97+
productReference = E2D003D1289882820073ED8F /* Custom OSC Type.app */;
9898
productType = "com.apple.product-type.application";
9999
};
100100
/* End PBXNativeTarget section */
@@ -112,7 +112,7 @@
112112
};
113113
};
114114
};
115-
buildConfigurationList = E2D003CC289882820073ED8F /* Build configuration list for PBXProject "Custom Type Example" */;
115+
buildConfigurationList = E2D003CC289882820073ED8F /* Build configuration list for PBXProject "Custom OSC Type" */;
116116
compatibilityVersion = "Xcode 13.0";
117117
developmentRegion = en;
118118
hasScannedForEncodings = 0;
@@ -129,7 +129,7 @@
129129
projectDirPath = "";
130130
projectRoot = "";
131131
targets = (
132-
E2D003D0289882820073ED8F /* Custom Type Example */,
132+
E2D003D0289882820073ED8F /* Custom OSC Type */,
133133
);
134134
};
135135
/* End PBXProject section */
@@ -150,7 +150,7 @@
150150
isa = PBXSourcesBuildPhase;
151151
buildActionMask = 2147483647;
152152
files = (
153-
E2D003D5289882820073ED8F /* CustomTypeExampleApp.swift in Sources */,
153+
E2D003D5289882820073ED8F /* CustomOSCTypeApp.swift in Sources */,
154154
E22C84412CA8C57E00FA3C54 /* OSCManager.swift in Sources */,
155155
E2A34EBB2CD1FB5D00950E78 /* ContentView.swift in Sources */,
156156
E2CE6F132CCF2EF300F81BCE /* CustomType.swift in Sources */,
@@ -294,15 +294,15 @@
294294
buildSettings = {
295295
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
296296
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
297-
CODE_SIGN_ENTITLEMENTS = "Custom Type Example/Support/Custom Type Example.entitlements";
297+
CODE_SIGN_ENTITLEMENTS = "Custom OSC Type/Support/Custom OSC Type.entitlements";
298298
CODE_SIGN_STYLE = Automatic;
299299
COMBINE_HIDPI_IMAGES = YES;
300300
CURRENT_PROJECT_VERSION = 1;
301301
DEAD_CODE_STRIPPING = YES;
302302
DEVELOPMENT_TEAM = "";
303303
ENABLE_HARDENED_RUNTIME = YES;
304304
GENERATE_INFOPLIST_FILE = YES;
305-
INFOPLIST_KEY_CFBundleDisplayName = "Custom Type Example";
305+
INFOPLIST_KEY_CFBundleDisplayName = "Custom OSC Type";
306306
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
307307
INFOPLIST_KEY_NSHumanReadableCopyright = "";
308308
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
@@ -313,7 +313,7 @@
313313
"@executable_path/../Frameworks",
314314
);
315315
MARKETING_VERSION = 1.0;
316-
PRODUCT_BUNDLE_IDENTIFIER = "com.orchetect.OSCKit.CustomTypeExample${DEVELOPMENT_TEAM}";
316+
PRODUCT_BUNDLE_IDENTIFIER = "com.orchetect.OSCKit.CustomOSCType${DEVELOPMENT_TEAM}";
317317
PRODUCT_NAME = "$(TARGET_NAME)";
318318
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
319319
SUPPORTS_MACCATALYST = NO;
@@ -327,15 +327,15 @@
327327
buildSettings = {
328328
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
329329
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
330-
CODE_SIGN_ENTITLEMENTS = "Custom Type Example/Support/Custom Type Example.entitlements";
330+
CODE_SIGN_ENTITLEMENTS = "Custom OSC Type/Support/Custom OSC Type.entitlements";
331331
CODE_SIGN_STYLE = Automatic;
332332
COMBINE_HIDPI_IMAGES = YES;
333333
CURRENT_PROJECT_VERSION = 1;
334334
DEAD_CODE_STRIPPING = YES;
335335
DEVELOPMENT_TEAM = "";
336336
ENABLE_HARDENED_RUNTIME = YES;
337337
GENERATE_INFOPLIST_FILE = YES;
338-
INFOPLIST_KEY_CFBundleDisplayName = "Custom Type Example";
338+
INFOPLIST_KEY_CFBundleDisplayName = "Custom OSC Type";
339339
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
340340
INFOPLIST_KEY_NSHumanReadableCopyright = "";
341341
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
@@ -346,7 +346,7 @@
346346
"@executable_path/../Frameworks",
347347
);
348348
MARKETING_VERSION = 1.0;
349-
PRODUCT_BUNDLE_IDENTIFIER = "com.orchetect.OSCKit.CustomTypeExample${DEVELOPMENT_TEAM}";
349+
PRODUCT_BUNDLE_IDENTIFIER = "com.orchetect.OSCKit.CustomOSCType${DEVELOPMENT_TEAM}";
350350
PRODUCT_NAME = "$(TARGET_NAME)";
351351
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
352352
SUPPORTS_MACCATALYST = NO;
@@ -358,7 +358,7 @@
358358
/* End XCBuildConfiguration section */
359359

360360
/* Begin XCConfigurationList section */
361-
E2D003CC289882820073ED8F /* Build configuration list for PBXProject "Custom Type Example" */ = {
361+
E2D003CC289882820073ED8F /* Build configuration list for PBXProject "Custom OSC Type" */ = {
362362
isa = XCConfigurationList;
363363
buildConfigurations = (
364364
E2D003DE289882850073ED8F /* Debug */,
@@ -367,7 +367,7 @@
367367
defaultConfigurationIsVisible = 0;
368368
defaultConfigurationName = Release;
369369
};
370-
E2D003E0289882850073ED8F /* Build configuration list for PBXNativeTarget "Custom Type Example" */ = {
370+
E2D003E0289882850073ED8F /* Build configuration list for PBXNativeTarget "Custom OSC Type" */ = {
371371
isa = XCConfigurationList;
372372
buildConfigurations = (
373373
E2D003E1289882850073ED8F /* Debug */,

Examples/Basic Example/Basic Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata renamed to Examples/Custom Type/Custom OSC Type.xcodeproj/project.xcworkspace/contents.xcworkspacedata

File renamed without changes.

Examples/Basic Example/Basic Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist renamed to Examples/Custom Type/Custom OSC Type.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

File renamed without changes.

Examples/Custom Type Example/Custom Type Example.xcodeproj/xcshareddata/xcschemes/Custom Type Example.xcscheme renamed to Examples/Custom Type/Custom OSC Type.xcodeproj/xcshareddata/xcschemes/Custom OSC Type.xcscheme

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
<BuildableReference
3131
BuildableIdentifier = "primary"
3232
BlueprintIdentifier = "E2D003D0289882820073ED8F"
33-
BuildableName = "Custom Type Example.app"
34-
BlueprintName = "Custom Type Example"
35-
ReferencedContainer = "container:Custom Type Example.xcodeproj">
33+
BuildableName = "Custom OSC Type.app"
34+
BlueprintName = "Custom OSC Type"
35+
ReferencedContainer = "container:Custom OSC Type.xcodeproj">
3636
</BuildableReference>
3737
</BuildableProductRunnable>
3838
</LaunchAction>
@@ -46,9 +46,9 @@
4646
<BuildableReference
4747
BuildableIdentifier = "primary"
4848
BlueprintIdentifier = "E2D003D0289882820073ED8F"
49-
BuildableName = "Custom Type Example.app"
50-
BlueprintName = "Custom Type Example"
51-
ReferencedContainer = "container:Custom Type Example.xcodeproj">
49+
BuildableName = "Custom OSC Type.app"
50+
BlueprintName = "Custom OSC Type"
51+
ReferencedContainer = "container:Custom OSC Type.xcodeproj">
5252
</BuildableReference>
5353
</MacroExpansion>
5454
</ProfileAction>

Examples/Custom Type Example/Custom Type Example/ContentView.swift renamed to Examples/Custom Type/Custom OSC Type/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct ContentView: View {
3030

3131
oscManager.send(
3232
.message("/test", values: [customType]),
33-
to: "localhost", // destination IP address or hostname
33+
to: "localhost", // destination IP address or host
3434
port: 8000 // standard OSC port but can be changed
3535
)
3636
}

Examples/Method IDs Example/Method IDs Example/MethodIDsExampleApp.swift renamed to Examples/Custom Type/Custom OSC Type/CustomOSCTypeApp.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// MethodIDsExampleApp.swift
2+
// CustomOSCTypeApp.swift
33
// OSCKit • https://github.com/orchetect/OSCKit
44
// © 2020-2025 Steffan Andrews • Licensed under MIT License
55
//
66

77
import SwiftUI
88

99
@main
10-
struct MethodIDsExampleApp: App {
10+
struct CustomOSCTypeApp: App {
1111
@StateObject var oscManager = OSCManager()
1212

1313
var body: some Scene {

Examples/Custom Type Example/Custom Type Example/CustomType.swift renamed to Examples/Custom Type/Custom OSC Type/CustomType.swift

File renamed without changes.

Examples/Custom Type Example/Custom Type Example/OSCManager.swift renamed to Examples/Custom Type/Custom OSC Type/OSCManager.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import OSCKit
99

1010
/// OSC lifecycle and send/receive manager.
1111
final class OSCManager: ObservableObject, Sendable {
12-
private let client = OSCClient()
13-
private let server = OSCServer(port: 8000)
12+
private let client = OSCUDPClient()
13+
private let server = OSCUDPServer(port: 8000)
1414

1515
init() {
1616
do {
@@ -32,7 +32,7 @@ extension OSCManager {
3232
do { try client.start() } catch { print(error) }
3333

3434
// setup server
35-
server.setHandler { [weak self] message, timeTag, host, port in
35+
server.setReceiveHandler { [weak self] message, timeTag, host, port in
3636
self?.handle(message: message, timeTag: timeTag, host: host, port: port)
3737
}
3838
do { try server.start() } catch { print(error) }
@@ -55,7 +55,7 @@ extension OSCManager {
5555
let id = customTypeValue.id
5656
let name = customTypeValue.name
5757
print(
58-
"OSC message from \(host):\(port), address \"\(msg)\", CustomType value containing id:\(id) and name:\(name)"
58+
"OSC message from \(host) port \(port), address \"\(msg)\", CustomType value containing id:\(id) and name:\(name)"
5959
)
6060
} catch {
6161
print("OSC message received that did not have exactly one value of type CustomType.")

Examples/Basic Example/Basic Example/Support/Assets.xcassets/AccentColor.colorset/Contents.json renamed to Examples/Custom Type/Custom OSC Type/Support/Assets.xcassets/AccentColor.colorset/Contents.json

File renamed without changes.

0 commit comments

Comments
 (0)