├── .github └── FUNDING.yml ├── .gitignore ├── CHANGELOG.md ├── Examples ├── iOS │ └── OSCTest │ │ ├── OSCTest.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── OSCTest │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift └── macOS │ └── OSCMonitor │ ├── OSCMonitor.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── OSCMonitor.xcscheme │ └── OSCMonitor │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── OSCMonitor.entitlements │ ├── TableData.swift │ └── ViewController.swift ├── Framework ├── SwiftOSC │ ├── Addresses │ │ ├── OSCAddress.swift │ │ └── OSCAddressPattern.swift │ ├── Communication │ │ ├── OSCClient.swift │ │ ├── OSCServer.swift │ │ └── ysocket │ │ │ ├── ysocket.swift │ │ │ ├── yudpsocket.c │ │ │ └── yudpsocket.swift │ ├── Elements │ │ ├── OSCBundle.swift │ │ ├── OSCElementProtocol.swift │ │ └── OSCMessage.swift │ ├── Helpers │ │ ├── Extensions.swift │ │ └── Timer.swift │ └── Types │ │ ├── Blob.swift │ │ ├── Bool.swift │ │ ├── Float.swift │ │ ├── Impulse.swift │ │ ├── Int.swift │ │ ├── OSCTypeProtocol.swift │ │ ├── String.swift │ │ └── Timetag.swift ├── iOS │ ├── Info.plist │ ├── SwiftOSC.h │ └── iOS.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── macOS │ ├── Info.plist │ ├── SwiftOSC.h │ └── macOS.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── tvOS │ ├── Info.plist │ ├── SwiftOSC.h │ └── tvOS.xcodeproj │ │ └── project.pbxproj └── watchOS │ ├── Info.plist │ └── watchOS.xcodeproj │ └── project.pbxproj ├── LICENSE ├── Playgrounds.playground ├── Pages │ ├── Addresses.xcplaygroundpage │ │ └── Contents.swift │ └── Quick Start.xcplaygroundpage │ │ └── Contents.swift └── contents.xcplayground ├── README.md ├── SwiftOSC.podspec └── SwiftOSC.xcworkspace ├── contents.xcworkspacedata └── xcshareddata └── IDEWorkspaceChecks.plist /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: existentialaudio # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | .DS_Store 20 | 21 | ## Other 22 | *.moved-aside 23 | *.xcuserstate 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | .build/ 40 | 41 | # CocoaPods 42 | # 43 | # We recommend against adding the Pods directory to your .gitignore. However 44 | # you should judge for yourself, the pros and cons are mentioned at: 45 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 46 | # 47 | # Pods/ 48 | 49 | # Carthage 50 | # 51 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 52 | # Carthage/Checkouts 53 | 54 | Carthage/Build 55 | 56 | # fastlane 57 | # 58 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 59 | # screenshots whenever they are needed. 60 | # For more information about the recommended setup visit: 61 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 62 | 63 | fastlane/report.xml 64 | fastlane/Preview.html 65 | fastlane/screenshots 66 | fastlane/test_output 67 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # SwiftOSC Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 6 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 7 | 8 | ## [1.4.0] - Unreleased 9 | ### Added 10 | - Support for watchOS and tvOS 11 | - Quick Help 12 | 13 | ### Changed 14 | - Added OSC prefix to data types. 15 | - Changed OSCTypeProtocol .tag to .oscTag and .data to .oscData 16 | 17 | ## [1.3.1] - 2020-01-19 18 | ### Changed 19 | - Changed OSCClient and OSCServer from public to open allowing for mocks 20 | - OSCServerDelegate protocol conforms to class 21 | - Changed var to let in a number of places. 22 | - 23 | 24 | ## [1.3.0] - 2019-09-24 25 | ### Added 26 | - Timetags in OSCBundles are now delivered at the correct time. 27 | 28 | ## [1.2.8] - 2019-09-19 29 | ### Changed 30 | - Various bug fixes 31 | - Better handeling of optionals 32 | - Changed Data()->toString to return optional 33 | 34 | ## [1.2.7] - 2019-09-18 35 | ### Added 36 | - OSCTest saves IP Address and Port to UserDefaults 37 | 38 | ### Changed 39 | - Wrapped strings in autoreleasepool. 40 | 41 | ## [1.2.4] - 2019-04-02 42 | ### Added 43 | - Enable UDP Client Broadcast 44 | 45 | ## [1.2.3] - 2018-10-30 46 | ### Changed 47 | - Updated syntax/settings to Swift 4.2/Xcode 10.0 48 | 49 | ## [1.2.0] - 2018-08-18 50 | ### Added 51 | - Changelog 52 | - Compile framework during build for example apps. 53 | - Add shared schemes for Carthage compatibility [#22](https://github.com/devinroth/SwiftOSC/pull/22) 54 | - Add init with array argument to OSCMessage. 55 | 56 | ### Chaged 57 | - Fix string decoding. String arg comparisons now work as expected. 58 | -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 031ABE701FB64DC7005184D4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031ABE6F1FB64DC7005184D4 /* AppDelegate.swift */; }; 11 | 031ABE721FB64DC7005184D4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031ABE711FB64DC7005184D4 /* ViewController.swift */; }; 12 | 031ABE751FB64DC7005184D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 031ABE731FB64DC7005184D4 /* Main.storyboard */; }; 13 | 031ABE771FB64DC7005184D4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 031ABE761FB64DC7005184D4 /* Assets.xcassets */; }; 14 | 031ABE7A1FB64DC7005184D4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 031ABE781FB64DC7005184D4 /* LaunchScreen.storyboard */; }; 15 | 03F4BBF11FB6E2C100193238 /* SwiftOSC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03F4BBF01FB6E2B900193238 /* SwiftOSC.framework */; }; 16 | 03F4BBF21FB6E2C100193238 /* SwiftOSC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 03F4BBF01FB6E2B900193238 /* SwiftOSC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 031ABE8C1FB64DEB005184D4 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | 03F4BBF21FB6E2C100193238 /* SwiftOSC.framework in Embed Frameworks */, 27 | ); 28 | name = "Embed Frameworks"; 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXCopyFilesBuildPhase section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 031ABE6C1FB64DC7005184D4 /* OSCTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OSCTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 031ABE6F1FB64DC7005184D4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 36 | 031ABE711FB64DC7005184D4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 37 | 031ABE741FB64DC7005184D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 031ABE761FB64DC7005184D4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 39 | 031ABE791FB64DC7005184D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 40 | 031ABE7B1FB64DC7005184D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 03F4BBF01FB6E2B900193238 /* SwiftOSC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftOSC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | /* End PBXFileReference section */ 43 | 44 | /* Begin PBXFrameworksBuildPhase section */ 45 | 031ABE691FB64DC7005184D4 /* Frameworks */ = { 46 | isa = PBXFrameworksBuildPhase; 47 | buildActionMask = 2147483647; 48 | files = ( 49 | 03F4BBF11FB6E2C100193238 /* SwiftOSC.framework in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 031ABE631FB64DC7005184D4 = { 57 | isa = PBXGroup; 58 | children = ( 59 | 031ABE6E1FB64DC7005184D4 /* OSCTest */, 60 | 031ABE6D1FB64DC7005184D4 /* Products */, 61 | 03F4BBEE1FB6E2B900193238 /* Frameworks */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 031ABE6D1FB64DC7005184D4 /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 031ABE6C1FB64DC7005184D4 /* OSCTest.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 031ABE6E1FB64DC7005184D4 /* OSCTest */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 031ABE6F1FB64DC7005184D4 /* AppDelegate.swift */, 77 | 031ABE711FB64DC7005184D4 /* ViewController.swift */, 78 | 031ABE731FB64DC7005184D4 /* Main.storyboard */, 79 | 031ABE761FB64DC7005184D4 /* Assets.xcassets */, 80 | 031ABE781FB64DC7005184D4 /* LaunchScreen.storyboard */, 81 | 031ABE7B1FB64DC7005184D4 /* Info.plist */, 82 | ); 83 | path = OSCTest; 84 | sourceTree = ""; 85 | }; 86 | 03F4BBEE1FB6E2B900193238 /* Frameworks */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 03F4BBF01FB6E2B900193238 /* SwiftOSC.framework */, 90 | ); 91 | name = Frameworks; 92 | sourceTree = ""; 93 | }; 94 | /* End PBXGroup section */ 95 | 96 | /* Begin PBXNativeTarget section */ 97 | 031ABE6B1FB64DC7005184D4 /* OSCTest */ = { 98 | isa = PBXNativeTarget; 99 | buildConfigurationList = 031ABE7E1FB64DC7005184D4 /* Build configuration list for PBXNativeTarget "OSCTest" */; 100 | buildPhases = ( 101 | 031ABE681FB64DC7005184D4 /* Sources */, 102 | 031ABE691FB64DC7005184D4 /* Frameworks */, 103 | 031ABE6A1FB64DC7005184D4 /* Resources */, 104 | 031ABE8C1FB64DEB005184D4 /* Embed Frameworks */, 105 | ); 106 | buildRules = ( 107 | ); 108 | dependencies = ( 109 | ); 110 | name = OSCTest; 111 | productName = OSCTest; 112 | productReference = 031ABE6C1FB64DC7005184D4 /* OSCTest.app */; 113 | productType = "com.apple.product-type.application"; 114 | }; 115 | /* End PBXNativeTarget section */ 116 | 117 | /* Begin PBXProject section */ 118 | 031ABE641FB64DC7005184D4 /* Project object */ = { 119 | isa = PBXProject; 120 | attributes = { 121 | LastSwiftUpdateCheck = 0910; 122 | LastUpgradeCheck = 1000; 123 | ORGANIZATIONNAME = "Devin Roth"; 124 | TargetAttributes = { 125 | 031ABE6B1FB64DC7005184D4 = { 126 | CreatedOnToolsVersion = 9.1; 127 | LastSwiftMigration = 1030; 128 | ProvisioningStyle = Automatic; 129 | }; 130 | }; 131 | }; 132 | buildConfigurationList = 031ABE671FB64DC7005184D4 /* Build configuration list for PBXProject "OSCTest" */; 133 | compatibilityVersion = "Xcode 8.0"; 134 | developmentRegion = en; 135 | hasScannedForEncodings = 0; 136 | knownRegions = ( 137 | en, 138 | Base, 139 | ); 140 | mainGroup = 031ABE631FB64DC7005184D4; 141 | productRefGroup = 031ABE6D1FB64DC7005184D4 /* Products */; 142 | projectDirPath = ""; 143 | projectRoot = ""; 144 | targets = ( 145 | 031ABE6B1FB64DC7005184D4 /* OSCTest */, 146 | ); 147 | }; 148 | /* End PBXProject section */ 149 | 150 | /* Begin PBXResourcesBuildPhase section */ 151 | 031ABE6A1FB64DC7005184D4 /* Resources */ = { 152 | isa = PBXResourcesBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | 031ABE7A1FB64DC7005184D4 /* LaunchScreen.storyboard in Resources */, 156 | 031ABE771FB64DC7005184D4 /* Assets.xcassets in Resources */, 157 | 031ABE751FB64DC7005184D4 /* Main.storyboard in Resources */, 158 | ); 159 | runOnlyForDeploymentPostprocessing = 0; 160 | }; 161 | /* End PBXResourcesBuildPhase section */ 162 | 163 | /* Begin PBXSourcesBuildPhase section */ 164 | 031ABE681FB64DC7005184D4 /* Sources */ = { 165 | isa = PBXSourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 031ABE721FB64DC7005184D4 /* ViewController.swift in Sources */, 169 | 031ABE701FB64DC7005184D4 /* AppDelegate.swift in Sources */, 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXSourcesBuildPhase section */ 174 | 175 | /* Begin PBXVariantGroup section */ 176 | 031ABE731FB64DC7005184D4 /* Main.storyboard */ = { 177 | isa = PBXVariantGroup; 178 | children = ( 179 | 031ABE741FB64DC7005184D4 /* Base */, 180 | ); 181 | name = Main.storyboard; 182 | sourceTree = ""; 183 | }; 184 | 031ABE781FB64DC7005184D4 /* LaunchScreen.storyboard */ = { 185 | isa = PBXVariantGroup; 186 | children = ( 187 | 031ABE791FB64DC7005184D4 /* Base */, 188 | ); 189 | name = LaunchScreen.storyboard; 190 | sourceTree = ""; 191 | }; 192 | /* End PBXVariantGroup section */ 193 | 194 | /* Begin XCBuildConfiguration section */ 195 | 031ABE7C1FB64DC7005184D4 /* Debug */ = { 196 | isa = XCBuildConfiguration; 197 | buildSettings = { 198 | ALWAYS_SEARCH_USER_PATHS = NO; 199 | CLANG_ANALYZER_NONNULL = YES; 200 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 201 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 202 | CLANG_CXX_LIBRARY = "libc++"; 203 | CLANG_ENABLE_MODULES = YES; 204 | CLANG_ENABLE_OBJC_ARC = YES; 205 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 206 | CLANG_WARN_BOOL_CONVERSION = YES; 207 | CLANG_WARN_COMMA = YES; 208 | CLANG_WARN_CONSTANT_CONVERSION = YES; 209 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 210 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 211 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 212 | CLANG_WARN_EMPTY_BODY = YES; 213 | CLANG_WARN_ENUM_CONVERSION = YES; 214 | CLANG_WARN_INFINITE_RECURSION = YES; 215 | CLANG_WARN_INT_CONVERSION = YES; 216 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 217 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 218 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 219 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 220 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 221 | CLANG_WARN_STRICT_PROTOTYPES = YES; 222 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 223 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 224 | CLANG_WARN_UNREACHABLE_CODE = YES; 225 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 226 | CODE_SIGN_IDENTITY = "iPhone Developer"; 227 | COPY_PHASE_STRIP = NO; 228 | DEBUG_INFORMATION_FORMAT = dwarf; 229 | ENABLE_STRICT_OBJC_MSGSEND = YES; 230 | ENABLE_TESTABILITY = YES; 231 | GCC_C_LANGUAGE_STANDARD = gnu11; 232 | GCC_DYNAMIC_NO_PIC = NO; 233 | GCC_NO_COMMON_BLOCKS = YES; 234 | GCC_OPTIMIZATION_LEVEL = 0; 235 | GCC_PREPROCESSOR_DEFINITIONS = ( 236 | "DEBUG=1", 237 | "$(inherited)", 238 | ); 239 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 240 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 241 | GCC_WARN_UNDECLARED_SELECTOR = YES; 242 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 243 | GCC_WARN_UNUSED_FUNCTION = YES; 244 | GCC_WARN_UNUSED_VARIABLE = YES; 245 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 246 | MTL_ENABLE_DEBUG_INFO = YES; 247 | ONLY_ACTIVE_ARCH = YES; 248 | SDKROOT = iphoneos; 249 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 250 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 251 | }; 252 | name = Debug; 253 | }; 254 | 031ABE7D1FB64DC7005184D4 /* Release */ = { 255 | isa = XCBuildConfiguration; 256 | buildSettings = { 257 | ALWAYS_SEARCH_USER_PATHS = NO; 258 | CLANG_ANALYZER_NONNULL = YES; 259 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 271 | CLANG_WARN_EMPTY_BODY = YES; 272 | CLANG_WARN_ENUM_CONVERSION = YES; 273 | CLANG_WARN_INFINITE_RECURSION = YES; 274 | CLANG_WARN_INT_CONVERSION = YES; 275 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 276 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 277 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 278 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 279 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 280 | CLANG_WARN_STRICT_PROTOTYPES = YES; 281 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 282 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 283 | CLANG_WARN_UNREACHABLE_CODE = YES; 284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 285 | CODE_SIGN_IDENTITY = "iPhone Developer"; 286 | COPY_PHASE_STRIP = NO; 287 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 288 | ENABLE_NS_ASSERTIONS = NO; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | GCC_C_LANGUAGE_STANDARD = gnu11; 291 | GCC_NO_COMMON_BLOCKS = YES; 292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 294 | GCC_WARN_UNDECLARED_SELECTOR = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 296 | GCC_WARN_UNUSED_FUNCTION = YES; 297 | GCC_WARN_UNUSED_VARIABLE = YES; 298 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 299 | MTL_ENABLE_DEBUG_INFO = NO; 300 | SDKROOT = iphoneos; 301 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 302 | VALIDATE_PRODUCT = YES; 303 | }; 304 | name = Release; 305 | }; 306 | 031ABE7F1FB64DC7005184D4 /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | CODE_SIGN_STYLE = Automatic; 312 | DEVELOPMENT_TEAM = Q5C99V536K; 313 | INFOPLIST_FILE = OSCTest/Info.plist; 314 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 315 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.OSCTest; 316 | PRODUCT_NAME = "$(TARGET_NAME)"; 317 | SWIFT_VERSION = 5.0; 318 | TARGETED_DEVICE_FAMILY = "1,2"; 319 | }; 320 | name = Debug; 321 | }; 322 | 031ABE801FB64DC7005184D4 /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 326 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 327 | CODE_SIGN_STYLE = Automatic; 328 | DEVELOPMENT_TEAM = Q5C99V536K; 329 | INFOPLIST_FILE = OSCTest/Info.plist; 330 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 331 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.OSCTest; 332 | PRODUCT_NAME = "$(TARGET_NAME)"; 333 | SWIFT_VERSION = 5.0; 334 | TARGETED_DEVICE_FAMILY = "1,2"; 335 | }; 336 | name = Release; 337 | }; 338 | /* End XCBuildConfiguration section */ 339 | 340 | /* Begin XCConfigurationList section */ 341 | 031ABE671FB64DC7005184D4 /* Build configuration list for PBXProject "OSCTest" */ = { 342 | isa = XCConfigurationList; 343 | buildConfigurations = ( 344 | 031ABE7C1FB64DC7005184D4 /* Debug */, 345 | 031ABE7D1FB64DC7005184D4 /* Release */, 346 | ); 347 | defaultConfigurationIsVisible = 0; 348 | defaultConfigurationName = Release; 349 | }; 350 | 031ABE7E1FB64DC7005184D4 /* Build configuration list for PBXNativeTarget "OSCTest" */ = { 351 | isa = XCConfigurationList; 352 | buildConfigurations = ( 353 | 031ABE7F1FB64DC7005184D4 /* Debug */, 354 | 031ABE801FB64DC7005184D4 /* Release */, 355 | ); 356 | defaultConfigurationIsVisible = 0; 357 | defaultConfigurationName = Release; 358 | }; 359 | /* End XCConfigurationList section */ 360 | }; 361 | rootObject = 031ABE641FB64DC7005184D4 /* Project object */; 362 | } 363 | -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // OSCTest 4 | // 5 | // Created by Devin Roth on 2017-11-10. 6 | // Copyright © 2017 Devin Roth. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 105 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Examples/iOS/OSCTest/OSCTest/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // OSCTest 4 | // 5 | // Created by Devin Roth on 2017-11-10. 6 | // Copyright © 2017 Devin Roth. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | //import framework 12 | import SwiftOSC 13 | 14 | // Setup Client. Change address from localhost if needed. 15 | var client = OSCClient(address: "localhost", port: 8080) 16 | 17 | var address = OSCAddressPattern("/") 18 | 19 | class ViewController: UIViewController { 20 | 21 | // User defaults 22 | private var defaults = UserDefaults.standard 23 | 24 | //Variables 25 | var ipAddress = "localhost" 26 | var port = 8080 27 | var text = "" 28 | 29 | // UI Elements 30 | @IBOutlet weak var ipAddressLabel: UITextField! 31 | @IBOutlet weak var portLabel: UITextField! 32 | @IBOutlet weak var addressPatternLabel: UITextField! 33 | 34 | 35 | override func viewDidLoad() { 36 | super.viewDidLoad() 37 | // Do any additional setup after loading the view, typically from a nib. 38 | 39 | // Get defaults and set Labels 40 | if let ipAddress = defaults.string(forKey: "ipAddress") { 41 | 42 | if ipAddress == "" { 43 | self.ipAddress = "localhost" 44 | } 45 | ipAddressLabel.text = ipAddress 46 | } 47 | port = defaults.integer(forKey: "port") 48 | print(port) 49 | if port == 0 { 50 | self.port = 8080 51 | } 52 | portLabel.text = String(port) 53 | 54 | client = OSCClient(address: ipAddress, port: port) 55 | 56 | _ = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { (_) in 57 | let message = OSCMessage(address, 0, 0.0, true, "hello world") 58 | client.send(message) 59 | } 60 | 61 | } 62 | 63 | override func didReceiveMemoryWarning() { 64 | super.didReceiveMemoryWarning() 65 | // Dispose of any resources that can be recreated. 66 | } 67 | 68 | //Connect UI and send OSC message 69 | @IBAction func ipAddressTextField(_ sender: UITextField) { 70 | 71 | if let text = sender.text { 72 | ipAddress = text 73 | client = OSCClient(address: ipAddress, port: port) 74 | 75 | defaults.set(ipAddress, forKey: "ipAddress") 76 | } 77 | } 78 | 79 | @IBAction func portTextField(_ sender: UITextField) { 80 | 81 | if let text = sender.text { 82 | if let number = Int(text) { 83 | print(number) 84 | port = number 85 | client = OSCClient(address: ipAddress, port: port) 86 | 87 | defaults.set(port, forKey: "port") 88 | } 89 | } 90 | } 91 | 92 | @IBAction func addressPatternTextField(_ sender: UITextField) { 93 | 94 | if let text = sender.text { 95 | address = OSCAddressPattern(text) 96 | } 97 | } 98 | 99 | @IBAction func stepper(_ sender: UIStepper) { 100 | let message = OSCMessage(address, Int(sender.value)) 101 | client.send(message) 102 | } 103 | 104 | @IBAction func slider(_ sender: UISlider) { 105 | let message = OSCMessage(address, sender.value) 106 | client.send(message) 107 | } 108 | 109 | @IBAction func switcher(_ sender: UISwitch) { 110 | let message = OSCMessage(address, sender.isOn) 111 | client.send(message) 112 | } 113 | 114 | @IBAction func impulse(_ sender: UIButton) { 115 | let message = OSCMessage(address) 116 | client.send(message) 117 | } 118 | 119 | @IBAction func text(_ sender: UITextField) { 120 | 121 | text = sender.text! 122 | } 123 | 124 | @IBAction func sendText(_ sender: UIButton) { 125 | let message = OSCMessage(address, text) 126 | client.send(message) 127 | } 128 | 129 | 130 | 131 | } 132 | 133 | 134 | extension ViewController: UITextFieldDelegate { 135 | 136 | func textFieldShouldReturn(_ textField: UITextField) -> Bool { 137 | textField.resignFirstResponder() 138 | return true 139 | } 140 | 141 | } 142 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 033827B61D3999590065A3A7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033827B51D3999590065A3A7 /* AppDelegate.swift */; }; 11 | 033827B81D3999590065A3A7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033827B71D3999590065A3A7 /* ViewController.swift */; }; 12 | 033827BA1D3999590065A3A7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 033827B91D3999590065A3A7 /* Assets.xcassets */; }; 13 | 033827BD1D3999590065A3A7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 033827BB1D3999590065A3A7 /* Main.storyboard */; }; 14 | 035F84801FB6F3A200C8C333 /* SwiftOSC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 035F847F1FB6F39500C8C333 /* SwiftOSC.framework */; }; 15 | 035F84811FB6F3A200C8C333 /* SwiftOSC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 035F847F1FB6F39500C8C333 /* SwiftOSC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 03D25C2D1D3A2D2E00BE9674 /* TableData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D25C2C1D3A2D2E00BE9674 /* TableData.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 031ABEC31FB65108005184D4 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | 035F84811FB6F3A200C8C333 /* SwiftOSC.framework in Embed Frameworks */, 27 | ); 28 | name = "Embed Frameworks"; 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXCopyFilesBuildPhase section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 031E89072394D57C00B2126B /* OSCMonitor.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OSCMonitor.entitlements; sourceTree = ""; }; 35 | 033827B21D3999590065A3A7 /* OSCMonitor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OSCMonitor.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 033827B51D3999590065A3A7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 033827B71D3999590065A3A7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 38 | 033827B91D3999590065A3A7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 39 | 033827BC1D3999590065A3A7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 033827BE1D3999590065A3A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 035F847F1FB6F39500C8C333 /* SwiftOSC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftOSC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 03D25C2C1D3A2D2E00BE9674 /* TableData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableData.swift; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | 033827AF1D3999590065A3A7 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | 035F84801FB6F3A200C8C333 /* SwiftOSC.framework in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXFrameworksBuildPhase section */ 55 | 56 | /* Begin PBXGroup section */ 57 | 033827A91D3999590065A3A7 = { 58 | isa = PBXGroup; 59 | children = ( 60 | 033827B41D3999590065A3A7 /* OSCMonitor */, 61 | 033827B31D3999590065A3A7 /* Products */, 62 | 035F847D1FB6F39500C8C333 /* Frameworks */, 63 | ); 64 | sourceTree = ""; 65 | }; 66 | 033827B31D3999590065A3A7 /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 033827B21D3999590065A3A7 /* OSCMonitor.app */, 70 | ); 71 | name = Products; 72 | sourceTree = ""; 73 | }; 74 | 033827B41D3999590065A3A7 /* OSCMonitor */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 031E89072394D57C00B2126B /* OSCMonitor.entitlements */, 78 | 033827B51D3999590065A3A7 /* AppDelegate.swift */, 79 | 033827B71D3999590065A3A7 /* ViewController.swift */, 80 | 033827B91D3999590065A3A7 /* Assets.xcassets */, 81 | 033827BB1D3999590065A3A7 /* Main.storyboard */, 82 | 03D25C2C1D3A2D2E00BE9674 /* TableData.swift */, 83 | 033827BE1D3999590065A3A7 /* Info.plist */, 84 | ); 85 | path = OSCMonitor; 86 | sourceTree = ""; 87 | }; 88 | 035F847D1FB6F39500C8C333 /* Frameworks */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 035F847F1FB6F39500C8C333 /* SwiftOSC.framework */, 92 | ); 93 | name = Frameworks; 94 | sourceTree = ""; 95 | }; 96 | /* End PBXGroup section */ 97 | 98 | /* Begin PBXNativeTarget section */ 99 | 033827B11D3999590065A3A7 /* OSCMonitor */ = { 100 | isa = PBXNativeTarget; 101 | buildConfigurationList = 033827C11D3999590065A3A7 /* Build configuration list for PBXNativeTarget "OSCMonitor" */; 102 | buildPhases = ( 103 | 033827AE1D3999590065A3A7 /* Sources */, 104 | 033827AF1D3999590065A3A7 /* Frameworks */, 105 | 033827B01D3999590065A3A7 /* Resources */, 106 | 031ABEC31FB65108005184D4 /* Embed Frameworks */, 107 | ); 108 | buildRules = ( 109 | ); 110 | dependencies = ( 111 | ); 112 | name = OSCMonitor; 113 | productName = OSCMonitor; 114 | productReference = 033827B21D3999590065A3A7 /* OSCMonitor.app */; 115 | productType = "com.apple.product-type.application"; 116 | }; 117 | /* End PBXNativeTarget section */ 118 | 119 | /* Begin PBXProject section */ 120 | 033827AA1D3999590065A3A7 /* Project object */ = { 121 | isa = PBXProject; 122 | attributes = { 123 | LastSwiftUpdateCheck = 0800; 124 | LastUpgradeCheck = 1120; 125 | ORGANIZATIONNAME = "Devin Roth Music"; 126 | TargetAttributes = { 127 | 033827B11D3999590065A3A7 = { 128 | CreatedOnToolsVersion = 8.0; 129 | DevelopmentTeam = Q5C99V536K; 130 | DevelopmentTeamName = "Devin Roth (Personal Team)"; 131 | LastSwiftMigration = 1030; 132 | ProvisioningStyle = Automatic; 133 | }; 134 | }; 135 | }; 136 | buildConfigurationList = 033827AD1D3999590065A3A7 /* Build configuration list for PBXProject "OSCMonitor" */; 137 | compatibilityVersion = "Xcode 3.2"; 138 | developmentRegion = en; 139 | hasScannedForEncodings = 0; 140 | knownRegions = ( 141 | en, 142 | Base, 143 | ); 144 | mainGroup = 033827A91D3999590065A3A7; 145 | productRefGroup = 033827B31D3999590065A3A7 /* Products */; 146 | projectDirPath = ""; 147 | projectRoot = ""; 148 | targets = ( 149 | 033827B11D3999590065A3A7 /* OSCMonitor */, 150 | ); 151 | }; 152 | /* End PBXProject section */ 153 | 154 | /* Begin PBXResourcesBuildPhase section */ 155 | 033827B01D3999590065A3A7 /* Resources */ = { 156 | isa = PBXResourcesBuildPhase; 157 | buildActionMask = 2147483647; 158 | files = ( 159 | 033827BA1D3999590065A3A7 /* Assets.xcassets in Resources */, 160 | 033827BD1D3999590065A3A7 /* Main.storyboard in Resources */, 161 | ); 162 | runOnlyForDeploymentPostprocessing = 0; 163 | }; 164 | /* End PBXResourcesBuildPhase section */ 165 | 166 | /* Begin PBXSourcesBuildPhase section */ 167 | 033827AE1D3999590065A3A7 /* Sources */ = { 168 | isa = PBXSourcesBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 03D25C2D1D3A2D2E00BE9674 /* TableData.swift in Sources */, 172 | 033827B81D3999590065A3A7 /* ViewController.swift in Sources */, 173 | 033827B61D3999590065A3A7 /* AppDelegate.swift in Sources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXSourcesBuildPhase section */ 178 | 179 | /* Begin PBXVariantGroup section */ 180 | 033827BB1D3999590065A3A7 /* Main.storyboard */ = { 181 | isa = PBXVariantGroup; 182 | children = ( 183 | 033827BC1D3999590065A3A7 /* Base */, 184 | ); 185 | name = Main.storyboard; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXVariantGroup section */ 189 | 190 | /* Begin XCBuildConfiguration section */ 191 | 033827BF1D3999590065A3A7 /* Debug */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | ALWAYS_SEARCH_USER_PATHS = NO; 195 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 196 | CLANG_ANALYZER_NONNULL = YES; 197 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 198 | CLANG_CXX_LIBRARY = "libc++"; 199 | CLANG_ENABLE_MODULES = YES; 200 | CLANG_ENABLE_OBJC_ARC = YES; 201 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 202 | CLANG_WARN_BOOL_CONVERSION = YES; 203 | CLANG_WARN_COMMA = YES; 204 | CLANG_WARN_CONSTANT_CONVERSION = YES; 205 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 206 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 207 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 208 | CLANG_WARN_EMPTY_BODY = YES; 209 | CLANG_WARN_ENUM_CONVERSION = YES; 210 | CLANG_WARN_INFINITE_RECURSION = YES; 211 | CLANG_WARN_INT_CONVERSION = YES; 212 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 213 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 214 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 215 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 216 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 217 | CLANG_WARN_STRICT_PROTOTYPES = YES; 218 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 219 | CLANG_WARN_UNREACHABLE_CODE = YES; 220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 221 | CODE_SIGN_IDENTITY = "-"; 222 | COPY_PHASE_STRIP = NO; 223 | DEBUG_INFORMATION_FORMAT = dwarf; 224 | ENABLE_STRICT_OBJC_MSGSEND = YES; 225 | ENABLE_TESTABILITY = YES; 226 | GCC_C_LANGUAGE_STANDARD = gnu99; 227 | GCC_DYNAMIC_NO_PIC = NO; 228 | GCC_NO_COMMON_BLOCKS = YES; 229 | GCC_OPTIMIZATION_LEVEL = 0; 230 | GCC_PREPROCESSOR_DEFINITIONS = ( 231 | "DEBUG=1", 232 | "$(inherited)", 233 | ); 234 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 235 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 236 | GCC_WARN_UNDECLARED_SELECTOR = YES; 237 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 238 | GCC_WARN_UNUSED_FUNCTION = YES; 239 | GCC_WARN_UNUSED_VARIABLE = YES; 240 | MACOSX_DEPLOYMENT_TARGET = 10.11; 241 | MTL_ENABLE_DEBUG_INFO = YES; 242 | ONLY_ACTIVE_ARCH = YES; 243 | SDKROOT = macosx; 244 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 245 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 246 | }; 247 | name = Debug; 248 | }; 249 | 033827C01D3999590065A3A7 /* Release */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | ALWAYS_SEARCH_USER_PATHS = NO; 253 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 254 | CLANG_ANALYZER_NONNULL = YES; 255 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 256 | CLANG_CXX_LIBRARY = "libc++"; 257 | CLANG_ENABLE_MODULES = YES; 258 | CLANG_ENABLE_OBJC_ARC = YES; 259 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 260 | CLANG_WARN_BOOL_CONVERSION = YES; 261 | CLANG_WARN_COMMA = YES; 262 | CLANG_WARN_CONSTANT_CONVERSION = YES; 263 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 264 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 265 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 266 | CLANG_WARN_EMPTY_BODY = YES; 267 | CLANG_WARN_ENUM_CONVERSION = YES; 268 | CLANG_WARN_INFINITE_RECURSION = YES; 269 | CLANG_WARN_INT_CONVERSION = YES; 270 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 271 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 272 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 273 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 274 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 275 | CLANG_WARN_STRICT_PROTOTYPES = YES; 276 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 277 | CLANG_WARN_UNREACHABLE_CODE = YES; 278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 279 | CODE_SIGN_IDENTITY = "-"; 280 | COPY_PHASE_STRIP = NO; 281 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 282 | ENABLE_NS_ASSERTIONS = NO; 283 | ENABLE_STRICT_OBJC_MSGSEND = YES; 284 | GCC_C_LANGUAGE_STANDARD = gnu99; 285 | GCC_NO_COMMON_BLOCKS = YES; 286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 287 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 288 | GCC_WARN_UNDECLARED_SELECTOR = YES; 289 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 290 | GCC_WARN_UNUSED_FUNCTION = YES; 291 | GCC_WARN_UNUSED_VARIABLE = YES; 292 | MACOSX_DEPLOYMENT_TARGET = 10.11; 293 | MTL_ENABLE_DEBUG_INFO = NO; 294 | SDKROOT = macosx; 295 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 296 | }; 297 | name = Release; 298 | }; 299 | 033827C21D3999590065A3A7 /* Debug */ = { 300 | isa = XCBuildConfiguration; 301 | buildSettings = { 302 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 303 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 304 | CODE_SIGN_ENTITLEMENTS = OSCMonitor/OSCMonitor.entitlements; 305 | CODE_SIGN_IDENTITY = "-"; 306 | COMBINE_HIDPI_IMAGES = YES; 307 | DEVELOPMENT_TEAM = Q5C99V536K; 308 | INFOPLIST_FILE = OSCMonitor/Info.plist; 309 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 310 | MACOSX_DEPLOYMENT_TARGET = 10.11; 311 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.OSCMonitor; 312 | PRODUCT_NAME = "$(TARGET_NAME)"; 313 | SWIFT_VERSION = 5.0; 314 | }; 315 | name = Debug; 316 | }; 317 | 033827C31D3999590065A3A7 /* Release */ = { 318 | isa = XCBuildConfiguration; 319 | buildSettings = { 320 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 321 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 322 | CODE_SIGN_ENTITLEMENTS = OSCMonitor/OSCMonitor.entitlements; 323 | CODE_SIGN_IDENTITY = "-"; 324 | COMBINE_HIDPI_IMAGES = YES; 325 | DEVELOPMENT_TEAM = Q5C99V536K; 326 | INFOPLIST_FILE = OSCMonitor/Info.plist; 327 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 328 | MACOSX_DEPLOYMENT_TARGET = 10.11; 329 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.OSCMonitor; 330 | PRODUCT_NAME = "$(TARGET_NAME)"; 331 | SWIFT_VERSION = 5.0; 332 | }; 333 | name = Release; 334 | }; 335 | /* End XCBuildConfiguration section */ 336 | 337 | /* Begin XCConfigurationList section */ 338 | 033827AD1D3999590065A3A7 /* Build configuration list for PBXProject "OSCMonitor" */ = { 339 | isa = XCConfigurationList; 340 | buildConfigurations = ( 341 | 033827BF1D3999590065A3A7 /* Debug */, 342 | 033827C01D3999590065A3A7 /* Release */, 343 | ); 344 | defaultConfigurationIsVisible = 0; 345 | defaultConfigurationName = Release; 346 | }; 347 | 033827C11D3999590065A3A7 /* Build configuration list for PBXNativeTarget "OSCMonitor" */ = { 348 | isa = XCConfigurationList; 349 | buildConfigurations = ( 350 | 033827C21D3999590065A3A7 /* Debug */, 351 | 033827C31D3999590065A3A7 /* Release */, 352 | ); 353 | defaultConfigurationIsVisible = 0; 354 | defaultConfigurationName = Release; 355 | }; 356 | /* End XCConfigurationList section */ 357 | }; 358 | rootObject = 033827AA1D3999590065A3A7 /* Project object */; 359 | } 360 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor.xcodeproj/xcshareddata/xcschemes/OSCMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // OSCMonitor 4 | // 5 | // Created by Devin Roth on 7/15/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import SwiftOSC 11 | 12 | //create OSC server 13 | var server = OSCServer(address: "", port: 8080) 14 | 15 | @NSApplicationMain 16 | class AppDelegate: NSObject, NSApplicationDelegate { 17 | 18 | func applicationDidFinishLaunching(_ aNotification: Notification) { 19 | // Insert code here to initialize your application 20 | 21 | } 22 | 23 | func applicationWillTerminate(_ aNotification: Notification) { 24 | // Insert code here to tear down your application 25 | server.stop() 26 | } 27 | 28 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 29 | return true 30 | } 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2016 Devin Roth Music. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor/OSCMonitor.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor/TableData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableData.swift 3 | // OSCMonitor 4 | // 5 | // Created by Devin Roth on 7/16/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftOSC 11 | 12 | 13 | struct TableData { 14 | var date: Date { 15 | didSet { 16 | addDateDescription() 17 | } 18 | } 19 | var dateDescription = "" 20 | 21 | var message: OSCMessage { 22 | didSet { 23 | addArgumentsDescription() 24 | } 25 | } 26 | var argumentsDescription = "" 27 | 28 | init(_ date: Date,_ message: OSCMessage){ 29 | self.date = date 30 | self.message = message 31 | addDateDescription() 32 | addArgumentsDescription() 33 | } 34 | 35 | mutating func addDateDescription() { 36 | let calendar = Calendar.current 37 | let components = calendar.dateComponents([.year,.month,.day,.hour, .minute, .second, .nanosecond], from: date) 38 | 39 | let year = components.year! 40 | let month = components.month! 41 | let day = components.day! 42 | let hour = components.hour! 43 | let minute = components.minute! 44 | let second = components.second! 45 | let millis = components.nanosecond! / 1_000_000 46 | 47 | self.dateDescription = "\(year)-\(month)-\(day) \(hour):\(minute):\(second)." + String(format: "%03d", millis) 48 | } 49 | 50 | mutating func addArgumentsDescription() { 51 | var description = "" 52 | 53 | for argument in self.message.arguments { 54 | 55 | if let int = argument as? Int { 56 | description += " Int<\(int)>" 57 | } 58 | if let float = argument as? Float { 59 | description += " Float<\(float)>" 60 | } 61 | if let float = argument as? Double { 62 | description += " Float<\(float)>" 63 | } 64 | if let string = argument as? String { 65 | description += " String<\(string)>" 66 | } 67 | if let blob = argument as? Blob { 68 | description += " Blob\(blob)" 69 | } 70 | if let bool = argument as? Bool { 71 | description += " <\(bool)>" 72 | } 73 | if argument == nil { 74 | description += " " 75 | } 76 | if argument is Impulse { 77 | description += " " 78 | } 79 | if let timetag = argument as? Timetag { 80 | description += " Timetag<\(timetag)>" 81 | } 82 | } 83 | self.argumentsDescription = description 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Examples/macOS/OSCMonitor/OSCMonitor/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // OSCMonitor 4 | // 5 | // Created by Devin Roth on 7/15/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import SwiftOSC 11 | 12 | let defaults = UserDefaults.standard 13 | 14 | class ViewController: NSViewController, NSTableViewDataSource, OSCServerDelegate { 15 | 16 | 17 | 18 | var tableData: [TableData] = [] 19 | var addressValue = OSCAddress() 20 | 21 | @IBOutlet weak var port: NSTextField! 22 | @IBOutlet weak var address: NSTextField! 23 | @IBOutlet weak var tableView: NSTableView! 24 | override func viewDidLoad() { 25 | super.viewDidLoad() 26 | 27 | // Do any additional setup after loading the view. 28 | server.port = defaults.integer(forKey: "Port") 29 | self.port.stringValue = String(server.port) 30 | if let address = defaults.string(forKey: "Address") { 31 | self.addressValue.string = address 32 | self.address.stringValue = address 33 | } 34 | 35 | //setup to receive data from server 36 | server.delegate = self 37 | tableView.dataSource = self 38 | 39 | } 40 | 41 | override var representedObject: Any? { 42 | didSet { 43 | // Update the view, if already loaded. 44 | } 45 | } 46 | 47 | //add osc data from notification 48 | func didReceive(_ message: OSCMessage) { 49 | print(message) 50 | if message.address.matches(self.addressValue) { 51 | let tableData = TableData(Date(), message) 52 | self.tableData.append(tableData) 53 | tableView.reloadData() 54 | } 55 | } 56 | 57 | func numberOfRows(in tableView: NSTableView) -> Int { 58 | return tableData.count 59 | } 60 | func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any? { 61 | if (tableColumn?.identifier)!.rawValue == "Date" { 62 | let index = (tableData.count - 1 - row) 63 | return tableData[index].dateDescription 64 | } 65 | if (tableColumn?.identifier)!.rawValue == "Address" { 66 | let index = (tableData.count - 1 - row) 67 | return tableData[index].message.address.string 68 | } 69 | if (tableColumn?.identifier)!.rawValue == "Arguments" { 70 | let index = (tableData.count - 1 - row) 71 | return tableData[index].argumentsDescription 72 | } 73 | 74 | return nil 75 | } 76 | @IBAction func changePort(_ sender: NSTextField) { 77 | server.port = sender.integerValue 78 | defaults.set(sender.integerValue, forKey: "Port") 79 | } 80 | 81 | @IBAction func changeOSCAddress(_ sender: NSTextField) { 82 | self.addressValue = OSCAddress(sender.stringValue) 83 | sender.stringValue = self.addressValue.string 84 | defaults.set(self.addressValue.string, forKey: "Address") 85 | 86 | } 87 | @IBAction func clear(_ sender: NSButton) { 88 | tableData.removeAll() 89 | tableView.reloadData() 90 | } 91 | @IBAction func saveToFile(_ sender: NSButton) { 92 | 93 | //prompt save location 94 | let savePanel = NSSavePanel() 95 | savePanel.runModal() 96 | 97 | if let url = savePanel.url { 98 | var url = url 99 | if url.pathExtension != "txt" { 100 | url.appendPathExtension("txt") 101 | } 102 | //generate data 103 | var text = "" 104 | for data in tableData { 105 | text += "\(data.dateDescription), \(data.message.address.string), \(data.argumentsDescription)\n" 106 | } 107 | 108 | //writing 109 | do { 110 | try text.write(to: url, atomically: false, encoding: String.Encoding.utf8) 111 | } 112 | catch {/* error handling here */} 113 | } 114 | } 115 | @IBAction func startServer(_ sender: NSButton) { 116 | if sender.integerValue == 0 { 117 | sender.title = "Start" 118 | server.stop() 119 | } else { 120 | server.start() 121 | sender.title = "Stop" 122 | 123 | } 124 | } 125 | } 126 | 127 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Addresses/OSCAddress.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCAddress.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct OSCAddress { 12 | 13 | //MARK: Properties 14 | public var string: String { 15 | didSet { 16 | if !valid(self.string) { 17 | NSLog("\"\(self.string)\" is an invalid address") 18 | self.string = oldValue 19 | } 20 | } 21 | } 22 | 23 | //MARK: initializers 24 | public init() { 25 | self.string = "/" 26 | } 27 | public init(_ address: String) { 28 | self.string = "/" 29 | if valid(address) { 30 | self.string = address 31 | } else { 32 | NSLog("\"\(address)\" is an invalid address") 33 | } 34 | } 35 | 36 | //MARK: methods 37 | func valid(_ address: String) ->Bool { 38 | 39 | var isValid = true 40 | 41 | autoreleasepool { 42 | 43 | //invalid characters: space * , ? [ ] { } OR two or more / in a row AND must start with / AND no empty strings 44 | if address.range(of: "[\\s\\*,?\\[\\]\\{\\}]|/{2,}|^[^/]|^$", options: .regularExpression) != nil { 45 | //returns false if there are any matches 46 | isValid = false 47 | } 48 | } 49 | 50 | return isValid 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Addresses/OSCAddressPattern.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCAddressPattern.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct OSCAddressPattern { 12 | 13 | //MARK: Properties 14 | public var string: String { 15 | didSet { 16 | if !valid(self.string) { 17 | NSLog("\"\(self.string)\" is an invalid address") 18 | self.string = oldValue 19 | } else { 20 | self.regex = makeRegex(from: self.string) 21 | self.regexPath = makeRegexPath(from: self.regex) 22 | 23 | } 24 | } 25 | } 26 | internal var regex = "" 27 | internal var regexPath = "" 28 | internal var data: Data { 29 | get { 30 | var data = self.string.data(using: String.Encoding.utf8)! 31 | //make sure data is base 32 null terminated 32 | var null:UInt8 = 0 33 | for _ in 1...4-data.count%4 { 34 | data.append(&null, count: 1) 35 | } 36 | return data 37 | } 38 | } 39 | 40 | //MARK: Initializers 41 | public init(){ 42 | self.string = "/" 43 | self.regex = "^/$" 44 | self.regexPath = "^/$" 45 | } 46 | 47 | public init(_ addressPattern: String) { 48 | self.string = "/" 49 | self.regex = "^/$" 50 | self.regexPath = "^/$" 51 | if valid(addressPattern) { 52 | self.string = addressPattern 53 | self.regex = makeRegex(from: self.string) 54 | self.regexPath = makeRegexPath(from: self.regex) 55 | } 56 | } 57 | 58 | //MARK: Methods 59 | internal func makeRegex(from addressPattern: String) -> String { 60 | var addressPattern = addressPattern 61 | 62 | autoreleasepool { 63 | 64 | //escapes characters: \ + ( ) . ^ $ | 65 | addressPattern = addressPattern.replacingOccurrences(of: "\\", with: "\\\\") 66 | addressPattern = addressPattern.replacingOccurrences(of: "+", with: "\\+") 67 | addressPattern = addressPattern.replacingOccurrences(of: "(", with: "\\(") 68 | addressPattern = addressPattern.replacingOccurrences(of: ")", with: "\\)") 69 | addressPattern = addressPattern.replacingOccurrences(of: ".", with: "\\.") 70 | addressPattern = addressPattern.replacingOccurrences(of: "^", with: "\\^") 71 | addressPattern = addressPattern.replacingOccurrences(of: "$", with: "\\$") 72 | addressPattern = addressPattern.replacingOccurrences(of: "|", with: "\\|") 73 | 74 | //replace characters with regex equivalents 75 | addressPattern = addressPattern.replacingOccurrences(of: "*", with: "[^/]*") 76 | addressPattern = addressPattern.replacingOccurrences(of: "//", with: ".*/") 77 | addressPattern = addressPattern.replacingOccurrences(of: "?", with: "[^/]") 78 | addressPattern = addressPattern.replacingOccurrences(of: "[!", with: "[^") 79 | addressPattern = addressPattern.replacingOccurrences(of: "{", with: "(") 80 | addressPattern = addressPattern.replacingOccurrences(of: "}", with: ")") 81 | addressPattern = addressPattern.replacingOccurrences(of: ",", with: "|") 82 | 83 | addressPattern = "^" + addressPattern //matches beginning of string 84 | addressPattern.append("$") //matches end of string 85 | 86 | } 87 | 88 | return addressPattern 89 | } 90 | 91 | internal func makeRegexPath(from regex: String) -> String { 92 | 93 | var regex = regex 94 | var regexContainer = "^/$|" 95 | 96 | autoreleasepool { 97 | 98 | regex = String(regex.dropLast()) 99 | regex = String(regex.dropFirst()) 100 | regex = String(regex.dropFirst()) 101 | 102 | let components = regex.components(separatedBy: "/") 103 | for x in 0 ..< components.count { 104 | 105 | regexContainer += "^" 106 | 107 | for y in 0 ... x { 108 | regexContainer += "/" + components[y] 109 | } 110 | 111 | regexContainer += "$|" 112 | } 113 | 114 | regexContainer = String(regexContainer.dropLast()) 115 | 116 | } 117 | 118 | return regexContainer 119 | 120 | } 121 | internal func valid(_ address: String) ->Bool { 122 | 123 | var isValid = true 124 | 125 | autoreleasepool { 126 | 127 | //no empty strings 128 | if address == "" { 129 | isValid = false 130 | } else 131 | 132 | //must start with "/" 133 | if address.first != "/" { 134 | isValid = false 135 | } else 136 | //no more than two "/" in a row 137 | if address.range(of: "/{3,}", options: .regularExpression) != nil { 138 | isValid = false 139 | } else 140 | //no spaces 141 | if address.range(of: "\\s", options: .regularExpression) != nil { 142 | isValid = false 143 | } else 144 | //[ must be closed, no invalid characters inside 145 | if address.range(of: "\\[(?![^\\[\\{\\},?\\*/]+\\])", options: .regularExpression) != nil { 146 | isValid = false 147 | } else { 148 | var open = address.components(separatedBy: "[").count 149 | var close = address.components(separatedBy: "]").count 150 | 151 | if open != close { 152 | isValid = false 153 | } else 154 | 155 | //{ must be closed, no invalid characters inside 156 | if address.range(of: "\\{(?![^\\{\\[\\]?\\*/]+\\})", options: .regularExpression) != nil { 157 | isValid = false 158 | } else { 159 | open = address.components(separatedBy: "{").count 160 | close = address.components(separatedBy: "}").count 161 | 162 | if open != close { 163 | isValid = false 164 | } else 165 | 166 | //"," only inside {} 167 | if address.range(of: ",(?![^\\{\\[\\]?\\*/]+\\})", options: .regularExpression) != nil { 168 | isValid = false 169 | } else 170 | if address.range(of: ",(?Bool{ 185 | 186 | var maches = true 187 | 188 | autoreleasepool { 189 | if address.string.range(of: self.regex, options: .regularExpression) == nil { 190 | maches = false 191 | } 192 | } 193 | 194 | return maches 195 | } 196 | 197 | // Returns True if the address is along the path of the address pattern 198 | public func matches(path: OSCAddress)->Bool{ 199 | 200 | var maches = true 201 | autoreleasepool { 202 | if path.string.range(of: self.regexPath, options: .regularExpression) == nil { 203 | maches = false 204 | } 205 | } 206 | 207 | return maches 208 | } 209 | } 210 | 211 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Communication/OSCClient.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objc open class OSCClient: NSObject { 4 | open var address: String { 5 | didSet { 6 | _ = client.close() 7 | client = UDPClient(addr: address, port: port) 8 | } 9 | } 10 | open var port: Int { 11 | didSet { 12 | _ = client.close() 13 | client = UDPClient(addr: address, port: port) 14 | } 15 | } 16 | var client: UDPClient 17 | 18 | public init(address: String, port: Int){ 19 | self.address = address 20 | self.port = port 21 | client = UDPClient(addr: address, port: port) 22 | client.enableBroadcast() 23 | } 24 | open func send(_ element: OSCElement){ 25 | let data = element.data 26 | if data.count > 9216 { 27 | print("OSCPacket is too large. Must be smaller than 9200 bytes") 28 | } else { 29 | _ = client.send(data:data) 30 | } 31 | } 32 | deinit { 33 | _ = client.close() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Communication/OSCServer.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public protocol OSCServerDelegate: class { 4 | func didReceive(_ data: Data) 5 | func didReceive(_ bundle: OSCBundle) 6 | func didReceive(_ message: OSCMessage) 7 | } 8 | extension OSCServerDelegate { 9 | public func didReceive(_ data: Data){} 10 | public func didReceive(_ bundle: OSCBundle){} 11 | public func didReceive(_ message: OSCMessage){} 12 | } 13 | 14 | open class OSCServer { 15 | open var address: String { 16 | didSet { 17 | _ = server.close() 18 | server = UDPServer(addr: self.address, port:self.port) 19 | } 20 | } 21 | open var port: Int { 22 | didSet { 23 | _ = server.close() 24 | server = UDPServer(addr: self.address, port:self.port) 25 | } 26 | } 27 | open var delegate: OSCServerDelegate? 28 | open var running = false 29 | var server: UDPServer 30 | 31 | public init(address: String, port: Int){ 32 | self.address = address 33 | self.port = port 34 | self.server = UDPServer(addr: self.address, port:self.port) 35 | run() 36 | } 37 | 38 | open func start(){ 39 | running = true 40 | } 41 | open func stop(){ 42 | running = false 43 | } 44 | func run() { 45 | DispatchQueue.global().async{ 46 | while true { 47 | let (data,_,_) = self.server.recv(9216) 48 | if let data = data { 49 | if self.running { 50 | let data = Data(data) 51 | self.decodePacket(data) 52 | } 53 | } 54 | } 55 | } 56 | } 57 | 58 | func decodePacket(_ data: Data){ 59 | 60 | autoreleasepool{ 61 | 62 | DispatchQueue.main.async { 63 | self.delegate?.didReceive(data) 64 | } 65 | 66 | if data[0] == 0x2f { // check if first character is "/" 67 | if let message = decodeMessage(data){ 68 | self.sendToDelegate(message) 69 | } 70 | 71 | } else if data.count > 8 {//make sure we have at least 8 bytes before checking if a bundle. 72 | if "#bundle\0".toData() == data.subdata(in: Range(0...7)){//matches string #bundle 73 | if let bundle = decodeBundle(data){ 74 | self.sendToDelegate(bundle) 75 | } 76 | } 77 | } else { 78 | NSLog("Invalid OSCPacket: data must begin with #bundle\\0 or /") 79 | } 80 | } 81 | 82 | } 83 | 84 | func decodeBundle(_ data: Data)->OSCBundle? { 85 | 86 | //extract timetag 87 | var bundle: OSCBundle? 88 | 89 | autoreleasepool{ 90 | 91 | 92 | bundle = OSCBundle(Timetag(data.subdata(in: 8..<16))) 93 | var bundleData = data.subdata(in: 16.. 0 { 96 | let length = Int(bundleData.subdata(in: Range(0...3)).toInt32()) 97 | let nextData = bundleData.subdata(in: 4..OSCMessage?{ 119 | var message: OSCMessage? 120 | 121 | autoreleasepool{ 122 | 123 | var messageData = data 124 | message = OSCMessage(OSCAddressPattern("/")) 125 | 126 | //extract address and check if valid 127 | let addressEnd = messageData.firstIndex(of: 0x00)! 128 | if let addressString = messageData.subdata(in: 0.., skysent 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 3. All advertising materials mentioning features or use of this software 13 | must display the following acknowledgement: 14 | This product includes software developed by skysent. 15 | 4. Neither the name of the skysent nor the 16 | names of its contributors may be used to endorse or promote products 17 | derived from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY skysent ''AS IS'' AND ANY 20 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL skysent BE LIABLE FOR ANY 23 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | import Foundation 32 | public class YSocket{ 33 | var addr: String 34 | var port: Int 35 | var fd: Int32? 36 | init(){ 37 | self.addr = "" 38 | self.port = 0 39 | } 40 | public init(addr a:String, port p:Int){ 41 | self.addr = a 42 | self.port = p 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Communication/ysocket/yudpsocket.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) <2014>, skysent 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 3. All advertising materials mentioning features or use of this software 13 | must display the following acknowledgement: 14 | This product includes software developed by skysent. 15 | 4. Neither the name of the skysent nor the 16 | names of its contributors may be used to endorse or promote products 17 | derived from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY skysent ''AS IS'' AND ANY 20 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL skysent BE LIABLE FOR ANY 23 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #define yudpsocket_buff_len 8192 40 | 41 | //return socket fd 42 | int yudpsocket_server(const char *addr,int port){ 43 | //create socket 44 | int socketfd=socket(AF_INET, SOCK_DGRAM, 0); 45 | int reuseon = 1; 46 | int r = -1; 47 | //bind 48 | struct sockaddr_in serv_addr; 49 | serv_addr.sin_len = sizeof(struct sockaddr_in); 50 | serv_addr.sin_family = AF_INET; 51 | if(addr == NULL || strlen(addr) == 0 || strcmp(addr, "255.255.255.255") == 0) 52 | { 53 | r = setsockopt( socketfd, SOL_SOCKET, SO_BROADCAST, &reuseon, sizeof(reuseon) ); 54 | serv_addr.sin_port = htons(port); 55 | serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); 56 | }else{ 57 | r = setsockopt( socketfd, SOL_SOCKET, SO_REUSEADDR, &reuseon, sizeof(reuseon) ); 58 | serv_addr.sin_addr.s_addr = inet_addr(addr); 59 | serv_addr.sin_port = htons(port); 60 | memset( &serv_addr, '\0', sizeof(serv_addr)); 61 | } 62 | if(r==-1){ 63 | return -1; 64 | } 65 | r=bind(socketfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)); 66 | if(r==0){ 67 | return socketfd; 68 | }else{ 69 | return -1; 70 | } 71 | } 72 | int yudpsocket_recive(int socket_fd,char *outdata,int expted_len,char *remoteip,int* remoteport){ 73 | struct sockaddr_in cli_addr; 74 | socklen_t clilen=sizeof(cli_addr); 75 | memset(&cli_addr, 0x0, sizeof(struct sockaddr_in)); 76 | int len=(int)recvfrom(socket_fd, outdata, expted_len, 0, (struct sockaddr *)&cli_addr, &clilen); 77 | char *clientip=inet_ntoa(cli_addr.sin_addr); 78 | memcpy(remoteip, clientip, strlen(clientip)); 79 | *remoteport=cli_addr.sin_port; 80 | return len; 81 | } 82 | int yudpsocket_close(int socket_fd){ 83 | return close(socket_fd); 84 | } 85 | //return socket fd 86 | int yudpsocket_client(){ 87 | //create socket 88 | int socketfd=socket(AF_INET, SOCK_DGRAM, 0); 89 | int reuseon = 1; 90 | setsockopt( socketfd, SOL_SOCKET, SO_REUSEADDR, &reuseon, sizeof(reuseon) ); 91 | return socketfd; 92 | } 93 | //enable broadcast 94 | void enable_broadcast(int socket_fd){ 95 | int reuseon = 1; 96 | setsockopt( socket_fd, SOL_SOCKET, SO_BROADCAST, &reuseon, sizeof(reuseon) ); 97 | } 98 | int yudpsocket_get_server_ip(char *host,char *ip){ 99 | struct hostent *hp; 100 | struct sockaddr_in addr; 101 | hp = gethostbyname(host); 102 | if(hp==NULL){ 103 | return -1; 104 | } 105 | bcopy((char *)hp->h_addr, (char *)&addr.sin_addr, hp->h_length); 106 | char *clientip=inet_ntoa(addr.sin_addr); 107 | memcpy(ip, clientip, strlen(clientip)); 108 | return 0; 109 | } 110 | //send message to addr and port 111 | int yudpsocket_sentto(int socket_fd,char *msg,int len, char *toaddr, int topotr){ 112 | struct sockaddr_in addr; 113 | socklen_t addrlen=sizeof(addr); 114 | memset(&addr, 0x0, sizeof(struct sockaddr_in)); 115 | addr.sin_family=AF_INET; 116 | addr.sin_port=htons(topotr); 117 | addr.sin_addr.s_addr=inet_addr(toaddr); 118 | int sendlen = (int) sendto(socket_fd, msg, len, 0, (struct sockaddr *)&addr, addrlen); 119 | return sendlen; 120 | } 121 | 122 | 123 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Communication/ysocket/yudpsocket.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) <2014>, skysent 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 3. All advertising materials mentioning features or use of this software 13 | must display the following acknowledgement: 14 | This product includes software developed by skysent. 15 | 4. Neither the name of the skysent nor the 16 | names of its contributors may be used to endorse or promote products 17 | derived from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY skysent ''AS IS'' AND ANY 20 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL skysent BE LIABLE FOR ANY 23 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | import Foundation 32 | 33 | @_silgen_name("yudpsocket_server") func c_yudpsocket_server(_ host:UnsafePointer,port:Int32) -> Int32 34 | @_silgen_name("yudpsocket_recive") func c_yudpsocket_recive(_ fd:Int32,buff:UnsafePointer,len:Int32,ip:UnsafePointer,port:UnsafePointer) -> Int32 35 | @_silgen_name("yudpsocket_close") func c_yudpsocket_close(_ fd:Int32) -> Int32 36 | @_silgen_name("yudpsocket_client") func c_yudpsocket_client() -> Int32 37 | @_silgen_name("yudpsocket_get_server_ip") func c_yudpsocket_get_server_ip(_ host:UnsafePointer,ip:UnsafePointer) -> Int32 38 | @_silgen_name("yudpsocket_sentto") func c_yudpsocket_sentto(_ fd:Int32,buff:UnsafePointer,len:Int32,ip:UnsafePointer,port:Int32) -> Int32 39 | @_silgen_name("enable_broadcast") func c_enable_broadcast(_ fd:Int32) 40 | 41 | public class UDPClient: YSocket { 42 | public override init(addr a:String,port p:Int){ 43 | super.init() 44 | let remoteipbuff:[Int8] = [Int8](repeating: 0x0,count: 16) 45 | let ret=c_yudpsocket_get_server_ip(a, ip: remoteipbuff) 46 | if ret==0{ 47 | if let ip=String(cString: remoteipbuff, encoding: String.Encoding.utf8){ 48 | self.addr=ip 49 | self.port=p 50 | let fd:Int32=c_yudpsocket_client() 51 | if fd>0{ 52 | self.fd=fd 53 | } 54 | } 55 | } 56 | } 57 | /* 58 | * send data 59 | * return success or fail with message 60 | */ 61 | public func send(data d:[UInt8])->(Bool,String){ 62 | if let fd:Int32=self.fd{ 63 | let sendsize:Int32=c_yudpsocket_sentto(fd, buff: d, len: Int32(d.count), ip: self.addr,port: Int32(self.port)) 64 | if Int(sendsize)==d.count{ 65 | return (true,"send success") 66 | }else{ 67 | return (false,"send error") 68 | } 69 | }else{ 70 | return (false,"socket not open") 71 | } 72 | } 73 | /* 74 | * send string 75 | * return success or fail with message 76 | */ 77 | public func send(str s:String)->(Bool,String){ 78 | if let fd:Int32=self.fd{ 79 | let sendsize:Int32=c_yudpsocket_sentto(fd, buff: s, len: Int32(strlen(s)), ip: self.addr,port: Int32(self.port)) 80 | if sendsize==Int32(strlen(s)){ 81 | return (true,"send success") 82 | }else{ 83 | return (false,"send error") 84 | } 85 | }else{ 86 | return (false,"socket not open") 87 | } 88 | } 89 | /* 90 | * enableBroadcast 91 | */ 92 | public func enableBroadcast(){ 93 | if let fd:Int32=self.fd{ 94 | c_enable_broadcast(fd) 95 | 96 | } 97 | } 98 | /* 99 | * 100 | * send nsdata 101 | */ 102 | public func send(data d:Data)->(Bool,String){ 103 | if let fd:Int32=self.fd{ 104 | var buff:[UInt8] = [UInt8](repeating: 0x0,count: d.count) 105 | (d as NSData).getBytes(&buff, length: d.count) 106 | let sendsize:Int32=c_yudpsocket_sentto(fd, buff: buff, len: Int32(d.count), ip: self.addr,port: Int32(self.port)) 107 | if sendsize==Int32(d.count){ 108 | return (true,"send success") 109 | }else{ 110 | return (false,"send error") 111 | } 112 | }else{ 113 | return (false,"socket not open") 114 | } 115 | } 116 | public func close()->(Bool,String){ 117 | if let fd:Int32=self.fd{ 118 | _ = c_yudpsocket_close(fd) 119 | self.fd=nil 120 | return (true,"close success") 121 | }else{ 122 | return (false,"socket not open") 123 | } 124 | } 125 | //TODO add multycast and boardcast 126 | } 127 | 128 | public class UDPServer: YSocket{ 129 | public override init(addr a:String, port p:Int){ 130 | super.init(addr: a, port: p) 131 | let fd:Int32 = c_yudpsocket_server(self.addr, port: Int32(self.port)) 132 | if fd>0{ 133 | self.fd=fd 134 | } 135 | } 136 | //TODO add multycast and boardcast 137 | public func recv(_ expectlen:Int)->([UInt8]?,String,Int){ 138 | if let fd:Int32 = self.fd{ 139 | let buff:[UInt8] = [UInt8](repeating: 0x0,count: expectlen) 140 | var remoteipbuff:[Int8] = [Int8](repeating: 0x0,count: 16) 141 | var remoteport:Int32=0 142 | let readLen:Int32=c_yudpsocket_recive(fd, buff: buff, len: Int32(expectlen), ip: &remoteipbuff, port: &remoteport) 143 | let port:Int=Int(remoteport) 144 | if let ip=String(cString: remoteipbuff, encoding: String.Encoding.utf8){ 145 | addr=ip 146 | } 147 | if readLen<=0{ 148 | return (nil,addr,port) 149 | } 150 | let rs=buff[0...Int(readLen-1)] 151 | let data:[UInt8] = Array(rs) 152 | return (data,addr,port) 153 | } 154 | return (nil,"no ip",0) 155 | } 156 | public func close()->(Bool,String){ 157 | if let fd:Int32=self.fd{ 158 | _ = c_yudpsocket_close(fd) 159 | self.fd=nil 160 | return (true,"close success") 161 | }else{ 162 | return (false,"socket not open") 163 | } 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Elements/OSCBundle.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class OSCBundle: OSCElement, CustomStringConvertible { 4 | //MARK: Properties 5 | public var timetag: Timetag 6 | public var elements:[OSCElement] = [] 7 | public var data: Data { 8 | get { 9 | var data = Data() 10 | //add "#bundle" tag 11 | data.append("#bundle".toDataBase32()) 12 | 13 | //add timetag 14 | data.append(timetag.data) 15 | 16 | //add elements data 17 | for element in elements { 18 | let elementData = element.data 19 | data.append(Int32(elementData.count).toData()) 20 | data.append(element.data) 21 | } 22 | return data 23 | } 24 | } 25 | public var description: String { 26 | get { 27 | return "OSCBundle [Timetag<\(self.timetag)> Elements<\(elements.count)>]" 28 | } 29 | } 30 | 31 | //MARK: Initializers 32 | public init(_ timetag: Timetag){ 33 | self.timetag = timetag 34 | } 35 | 36 | public init (_ timetag: Timetag, _ elements: OSCElement...){ 37 | self.timetag = timetag 38 | self.elements = elements 39 | } 40 | public init (_ elements: OSCElement...){ 41 | self.timetag = 1 42 | self.elements = elements 43 | } 44 | 45 | //MARK: Methods 46 | public func add(_ elements: OSCElement...){ 47 | self.elements += elements 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Elements/OSCElementProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public protocol OSCElement { 12 | var data: Data { get } 13 | } 14 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Elements/OSCMessage.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class OSCMessage: OSCElement, CustomStringConvertible { 4 | //MARK: Properties 5 | public var address: OSCAddressPattern 6 | public var arguments:[OSCType?] = [] 7 | public var data: Data { 8 | get { 9 | var data = Data() 10 | 11 | //add address 12 | data.append(self.address.string.toDataBase32()) 13 | 14 | //create type list 15 | var types = "," 16 | for argument in self.arguments { 17 | if let argument = argument { 18 | types += argument.tag 19 | } else { 20 | //add null tag if nil argument 21 | types += "N" 22 | } 23 | } 24 | data.append(types.toDataBase32()) 25 | 26 | //get arguments data 27 | for argument in arguments { 28 | if let argument = argument { 29 | data.append(argument.data) 30 | } 31 | } 32 | 33 | return data 34 | } 35 | } 36 | public var description: String { 37 | var description = "OSCMessage [Address<\(self.address.string)>" 38 | 39 | for argument in self.arguments { 40 | 41 | if let int = argument as? Int { 42 | description += " Int<\(int)>" 43 | } 44 | if let float = argument as? Float { 45 | description += " Float<\(float)>" 46 | } 47 | if let float = argument as? Double { 48 | description += " Float<\(float)>" 49 | } 50 | if let string = argument as? String { 51 | description += " String<\(string)>" 52 | } 53 | if let blob = argument as? Blob { 54 | description += " Blob<\(blob)>" 55 | } 56 | if let bool = argument as? Bool { 57 | description += " <\(bool)>" 58 | } 59 | if argument == nil { 60 | description += " " 61 | } 62 | if argument is Impulse { 63 | description += " " 64 | } 65 | if let timetag = argument as? Timetag { 66 | description += " Timetag<\(timetag)>" 67 | } 68 | } 69 | 70 | description += "]" 71 | return description 72 | } 73 | 74 | //MARK: Initializers 75 | public init(_ address: OSCAddressPattern){ 76 | self.address = address 77 | } 78 | 79 | public init(_ address: OSCAddressPattern,_ arguments:OSCType?...){ 80 | self.address = address 81 | self.arguments = arguments 82 | } 83 | 84 | public init(_ address: OSCAddressPattern,_ arguments:[OSCType?]){ 85 | self.address = address 86 | self.arguments = arguments 87 | } 88 | 89 | //MARK: Methods 90 | public func add(){ 91 | self.arguments.append(nil) 92 | } 93 | 94 | public func add(_ arguments: OSCType?...){ 95 | self.arguments += arguments 96 | } 97 | 98 | public func add(_ arguments: [OSCType?]){ 99 | self.arguments += arguments 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Helpers/Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extensions.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 7/5/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Data { 12 | func toInt32() -> Int32 { 13 | var int = Int32() 14 | let buffer = UnsafeMutableBufferPointer(start: &int, count: 1) 15 | _ = self.copyBytes(to: buffer) 16 | 17 | return int.byteSwapped 18 | } 19 | } 20 | 21 | extension Data { 22 | func toString()->String?{ 23 | if let string = String(data: self, encoding: String.Encoding.utf8){ 24 | return string 25 | } else { 26 | return nil 27 | } 28 | } 29 | } 30 | 31 | extension Date { 32 | //initilizes time from string "1990-01-01T00:00:00-00:00" 33 | init?(_ string: String){ 34 | 35 | let RFC3339DateFormatter = DateFormatter() 36 | RFC3339DateFormatter.locale = Locale(identifier: "en_US_POSIX") 37 | RFC3339DateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" 38 | RFC3339DateFormatter.timeZone = TimeZone(secondsFromGMT: 0) 39 | 40 | let date = RFC3339DateFormatter.date(from: string) 41 | 42 | if date == nil { 43 | return nil 44 | } 45 | self = date! 46 | } 47 | } 48 | 49 | extension Date { 50 | var oscTimetag: Timetag { 51 | get { 52 | return Timetag(Date().timeIntervalSince(Date("1900-01-01T00:00:00-00:00")!) * 0x1_0000_0000) 53 | } 54 | } 55 | } 56 | 57 | extension Int32 { 58 | func toData() -> Data { 59 | var int = self.bigEndian 60 | let buffer = UnsafeBufferPointer(start: &int, count: 1) 61 | return Data(buffer: buffer) 62 | } 63 | } 64 | 65 | extension UInt32 { 66 | func toData() -> Data { 67 | var int = self.bigEndian 68 | let buffer = UnsafeBufferPointer(start: &int, count: 1) 69 | return Data(buffer: buffer) 70 | } 71 | } 72 | 73 | extension Int64 { 74 | func toData() -> Data { 75 | var int = self.bigEndian 76 | let buffer = UnsafeBufferPointer(start: &int, count: 1) 77 | return Data(buffer: buffer) 78 | } 79 | } 80 | extension String { 81 | func toData()->Data{ 82 | return self.data(using: String.Encoding.utf8)! 83 | } 84 | 85 | // add padding to string 86 | func toDataBase32()->Data { 87 | var data = self.data(using: String.Encoding.utf8)! 88 | var value:UInt8 = 0 89 | 90 | for _ in 1...4-data.count%4 { 91 | data.append(&value, count: 1) 92 | } 93 | return data 94 | } 95 | 96 | } 97 | extension String { 98 | func dataFromHexString() -> Data { 99 | var data = Data() 100 | 101 | let regex = try! NSRegularExpression(pattern: "[0-9a-f]{1,2}", options: .caseInsensitive) 102 | regex.enumerateMatches(in: self, options: [], range: NSMakeRange(0, self.count)) { match, flags, stop in 103 | let byteString = (self as NSString).substring(with: match!.range) 104 | let num = UInt8(byteString.withCString { strtoul($0, nil, 16) }) 105 | data.append([num], count: 1) 106 | } 107 | 108 | return data 109 | } 110 | 111 | } 112 | extension String { 113 | //returns substring at the specified character index 114 | subscript(index: Int)->String? { 115 | get { 116 | if index > self.count - 1 || index < 0 { 117 | return nil 118 | } 119 | let charIndex = self.index(self.startIndex, offsetBy: index) 120 | let char = self[charIndex] 121 | 122 | return String(char) 123 | } 124 | } 125 | } 126 | extension Array { 127 | public subscript (safe index: UInt) -> Element? { 128 | return Int(index) < count ? self[Int(index)] : nil 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Helpers/Timer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Timer.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 7/10/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | //let sharedTimer = Timer() 12 | 13 | class Timer { 14 | static let sharedTime = Timer() 15 | 16 | private var startMachTime: UInt64 17 | private var startNTP: UInt64 18 | private var numer: UInt64 19 | private var denom: UInt64 20 | 21 | var timetag: UInt64 { 22 | get { 23 | let time = (((mach_absolute_time() - startMachTime) * numer ) / denom ) 24 | let seconds = time / 0x1_0000_0000 25 | let nano = time % 0x1_0000_0000 26 | var tag = startNTP + ((nano * 0x1_0000_0000) / 1_000_000_000) 27 | tag = tag + seconds * 0x1_0000_0000 28 | 29 | return tag 30 | } 31 | } 32 | 33 | private init() { 34 | //set program start time 35 | startMachTime = mach_absolute_time() 36 | 37 | //set numer and denom 38 | var s_timebase_info = mach_timebase_info_data_t() 39 | mach_timebase_info(&s_timebase_info) 40 | numer = UInt64(s_timebase_info.numer) 41 | denom = UInt64(s_timebase_info.denom) 42 | 43 | //set start time 44 | let calendar = Calendar.current 45 | let dateComponents = DateComponents(timeZone: TimeZone(secondsFromGMT: 0), year: 1990) 46 | let date = calendar.date(from: dateComponents) 47 | let timeInterval = Date().timeIntervalSince(date!) 48 | startNTP = UInt64(timeInterval * 0x1_0000_0000) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/Blob.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public typealias Blob = Data 12 | 13 | extension Blob: OSCType { 14 | public var tag: String { 15 | get { 16 | return "b" 17 | } 18 | } 19 | public var data: Data { 20 | get { 21 | let length = UInt32(self.count) 22 | var data = Data() 23 | 24 | data.append(length.toData()) 25 | 26 | data.append(self) 27 | 28 | //base 32 29 | while data.count % 4 != 0 { 30 | var null = UInt8(0) 31 | data.append(&null, count: 1) 32 | } 33 | 34 | return data 35 | } 36 | } 37 | init(_ data: Data){ 38 | self = data 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/Bool.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Bool: OSCType { 12 | public var tag: String { 13 | get { 14 | if self == true { 15 | return "T" 16 | } else { 17 | return "F" 18 | } 19 | } 20 | } 21 | public var data: Data { 22 | get { 23 | return Data() 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/Float.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Float: OSCType { 12 | public var tag: String { 13 | get { 14 | return "f" 15 | } 16 | } 17 | public var data: Data { 18 | get { 19 | // first turn float into a byte array 20 | let bytes: [UInt8] = withUnsafeBytes(of: self.bitPattern.bigEndian, Array.init) 21 | return Data(bytes) 22 | } 23 | } 24 | init(_ data:Data){ 25 | // recover float from a byte array 26 | let result = Float(bitPattern: UInt32(bigEndian: data.withUnsafeBytes { $0.load(as: UInt32.self) })) 27 | self = result 28 | } 29 | } 30 | 31 | //convert double to float for ease of access 32 | extension Double: OSCType { 33 | public var tag: String { 34 | get { 35 | return "f" 36 | } 37 | } 38 | public var data: Data { 39 | get { 40 | // first turn float into a byte array 41 | let bytes: [UInt8] = withUnsafeBytes(of: Float(self.bitPattern.bigEndian), Array.init) 42 | return Data(bytes) 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/Impulse.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct Impulse { 12 | public init(){ 13 | 14 | } 15 | } 16 | 17 | extension Impulse: OSCType { 18 | public var tag: String { 19 | get { 20 | return "I" 21 | } 22 | } 23 | public var data: Data { 24 | get { 25 | return Data() 26 | } 27 | } 28 | } 29 | 30 | public let impulse = Impulse() 31 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/Int.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Int: OSCType { 12 | public var tag: String { 13 | get { 14 | return "i" 15 | } 16 | } 17 | public var data: Data { 18 | get { 19 | // first turn integer into a byte array 20 | let bytes: [UInt8] = withUnsafeBytes(of: Int32(self).bigEndian, Array.init) 21 | return Data(bytes) 22 | } 23 | } 24 | init(_ data: Data) { 25 | // recover float from a byte array 26 | let result = data.withUnsafeBytes { 27 | $0.load(fromByteOffset: 0, as: Int32.self).bigEndian 28 | } 29 | self = Int(result) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/OSCTypeProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public protocol OSCType { 12 | var tag: String { get } 13 | var data: Data { get } 14 | } 15 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/String.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension String: OSCType { 12 | public var tag: String { 13 | get { 14 | return "s" 15 | } 16 | } 17 | public var data: Data { 18 | get { 19 | var data = self.data(using: String.Encoding.utf8)! 20 | 21 | //base 32 null terminated data 22 | for _ in 1...4-data.count%4 { 23 | var null = UInt8(0) 24 | data.append(&null, count: 1) 25 | } 26 | 27 | return data 28 | } 29 | } 30 | init(_ data:Data){ 31 | self = String(data: data, encoding: String.Encoding.utf8)! 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Framework/SwiftOSC/Types/Timetag.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OSCTypes.swift 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 6/26/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public typealias Timetag = UInt64 12 | 13 | extension Timetag: OSCType { 14 | 15 | public var tag: String { 16 | get { 17 | return "t" 18 | } 19 | } 20 | public var data: Data { 21 | get { 22 | var int = self.bigEndian 23 | let buffer = UnsafeBufferPointer(start: &int, count: 1) 24 | return Data(buffer: buffer) 25 | } 26 | } 27 | public var secondsSince1900: Double { 28 | get { 29 | return Double(self / 0x1_0000_0000) 30 | } 31 | } 32 | public var secondsSinceNow: Double { 33 | get { 34 | if self > 0 { 35 | return Double((self - Date().oscTimetag) / 0x1_0000_0000) 36 | } else { 37 | return 0.0 38 | } 39 | } 40 | } 41 | public init(secondsSinceNow seconds: Double){ 42 | self = Date().oscTimetag 43 | self += UInt64(seconds * 0x1_0000_0000) 44 | } 45 | public init(secondsSince1900 seconds: Double){ 46 | self = UInt64(seconds * 0x1_0000_0000) 47 | } 48 | init(_ data: Data){ 49 | var int = UInt64() 50 | let buffer = UnsafeMutableBufferPointer(start: &int, count: 1) 51 | _ = data.copyBytes(to: buffer) 52 | 53 | self = int.byteSwapped 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Framework/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Framework/iOS/SwiftOSC.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftOSCiOS.h 3 | // SwiftOSCiOS 4 | // 5 | // Created by Devin Roth on 2017-10-01. 6 | // Copyright © 2017 Devin Roth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SwiftOSCiOS. 12 | FOUNDATION_EXPORT double SwiftOSCiOSVersionNumber; 13 | 14 | //! Project version string for SwiftOSCiOS. 15 | FOUNDATION_EXPORT const unsigned char SwiftOSCiOSVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Framework/iOS/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Framework/iOS/iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Framework/macOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSHumanReadableCopyright 22 | Copyright © 2016 Devin Roth Music. All rights reserved. 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Framework/macOS/SwiftOSC.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftOSC.h 3 | // SwiftOSC 4 | // 5 | // Created by Devin Roth on 7/14/16. 6 | // Copyright © 2016 Devin Roth Music. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SwiftOSC. 12 | FOUNDATION_EXPORT double SwiftOSCVersionNumber; 13 | 14 | //! Project version string for SwiftOSC. 15 | FOUNDATION_EXPORT const unsigned char SwiftOSCVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Framework/macOS/macOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 032E3DC41F82A2A900DC931B /* OSCAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C90C1F829EBC00CBA6A7 /* OSCAddress.swift */; }; 11 | 032E3DC51F82A2A900DC931B /* OSCAddressPattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C90D1F829EBC00CBA6A7 /* OSCAddressPattern.swift */; }; 12 | 032E3DC61F82A2A900DC931B /* OSCClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C90F1F829EBC00CBA6A7 /* OSCClient.swift */; }; 13 | 032E3DC71F82A2A900DC931B /* OSCServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9101F829EBC00CBA6A7 /* OSCServer.swift */; }; 14 | 032E3DC81F82A2A900DC931B /* ysocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9121F829EBC00CBA6A7 /* ysocket.swift */; }; 15 | 032E3DC91F82A2A900DC931B /* yudpsocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9131F829EBC00CBA6A7 /* yudpsocket.c */; }; 16 | 032E3DCA1F82A2A900DC931B /* yudpsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9141F829EBC00CBA6A7 /* yudpsocket.swift */; }; 17 | 032E3DCB1F82A2A900DC931B /* OSCBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9161F829EBC00CBA6A7 /* OSCBundle.swift */; }; 18 | 032E3DCC1F82A2A900DC931B /* OSCElementProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9171F829EBC00CBA6A7 /* OSCElementProtocol.swift */; }; 19 | 032E3DCD1F82A2A900DC931B /* OSCMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9181F829EBC00CBA6A7 /* OSCMessage.swift */; }; 20 | 032E3DCE1F82A2A900DC931B /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C91A1F829EBC00CBA6A7 /* Extensions.swift */; }; 21 | 032E3DCF1F82A2A900DC931B /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C91B1F829EBC00CBA6A7 /* Timer.swift */; }; 22 | 032E3DD01F82A2A900DC931B /* Blob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C91F1F829EBC00CBA6A7 /* Blob.swift */; }; 23 | 032E3DD11F82A2A900DC931B /* Bool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9201F829EBC00CBA6A7 /* Bool.swift */; }; 24 | 032E3DD21F82A2A900DC931B /* Float.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9211F829EBC00CBA6A7 /* Float.swift */; }; 25 | 032E3DD31F82A2A900DC931B /* Impulse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9221F829EBC00CBA6A7 /* Impulse.swift */; }; 26 | 032E3DD41F82A2A900DC931B /* Int.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9231F829EBC00CBA6A7 /* Int.swift */; }; 27 | 032E3DD51F82A2A900DC931B /* OSCTypeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9241F829EBC00CBA6A7 /* OSCTypeProtocol.swift */; }; 28 | 032E3DD61F82A2A900DC931B /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9251F829EBC00CBA6A7 /* String.swift */; }; 29 | 032E3DD71F82A2A900DC931B /* Timetag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0332C9261F829EBC00CBA6A7 /* Timetag.swift */; }; 30 | 0332C9291F82A16700CBA6A7 /* SwiftOSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 0332C91D1F829EBC00CBA6A7 /* SwiftOSC.h */; settings = {ATTRIBUTES = (Public, ); }; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 0332C90C1F829EBC00CBA6A7 /* OSCAddress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCAddress.swift; sourceTree = ""; }; 35 | 0332C90D1F829EBC00CBA6A7 /* OSCAddressPattern.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCAddressPattern.swift; sourceTree = ""; }; 36 | 0332C90F1F829EBC00CBA6A7 /* OSCClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCClient.swift; sourceTree = ""; }; 37 | 0332C9101F829EBC00CBA6A7 /* OSCServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCServer.swift; sourceTree = ""; }; 38 | 0332C9121F829EBC00CBA6A7 /* ysocket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ysocket.swift; sourceTree = ""; }; 39 | 0332C9131F829EBC00CBA6A7 /* yudpsocket.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = yudpsocket.c; sourceTree = ""; }; 40 | 0332C9141F829EBC00CBA6A7 /* yudpsocket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = yudpsocket.swift; sourceTree = ""; }; 41 | 0332C9161F829EBC00CBA6A7 /* OSCBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCBundle.swift; sourceTree = ""; }; 42 | 0332C9171F829EBC00CBA6A7 /* OSCElementProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCElementProtocol.swift; sourceTree = ""; }; 43 | 0332C9181F829EBC00CBA6A7 /* OSCMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCMessage.swift; sourceTree = ""; }; 44 | 0332C91A1F829EBC00CBA6A7 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 45 | 0332C91B1F829EBC00CBA6A7 /* Timer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Timer.swift; sourceTree = ""; }; 46 | 0332C91C1F829EBC00CBA6A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | 0332C91D1F829EBC00CBA6A7 /* SwiftOSC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftOSC.h; sourceTree = ""; }; 48 | 0332C91F1F829EBC00CBA6A7 /* Blob.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Blob.swift; sourceTree = ""; }; 49 | 0332C9201F829EBC00CBA6A7 /* Bool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bool.swift; sourceTree = ""; }; 50 | 0332C9211F829EBC00CBA6A7 /* Float.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Float.swift; sourceTree = ""; }; 51 | 0332C9221F829EBC00CBA6A7 /* Impulse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Impulse.swift; sourceTree = ""; }; 52 | 0332C9231F829EBC00CBA6A7 /* Int.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Int.swift; sourceTree = ""; }; 53 | 0332C9241F829EBC00CBA6A7 /* OSCTypeProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSCTypeProtocol.swift; sourceTree = ""; }; 54 | 0332C9251F829EBC00CBA6A7 /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; 55 | 0332C9261F829EBC00CBA6A7 /* Timetag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Timetag.swift; sourceTree = ""; }; 56 | 0339A3541D37FCEB0060ED91 /* SwiftOSC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftOSC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 0339A3501D37FCEB0060ED91 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | 0332C90A1F829EBC00CBA6A7 /* SwiftOSC */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 0332C90B1F829EBC00CBA6A7 /* Addresses */, 74 | 0332C90E1F829EBC00CBA6A7 /* Communication */, 75 | 0332C9151F829EBC00CBA6A7 /* Elements */, 76 | 0332C9191F829EBC00CBA6A7 /* Helpers */, 77 | 0332C91E1F829EBC00CBA6A7 /* Types */, 78 | ); 79 | name = SwiftOSC; 80 | path = ../SwiftOSC; 81 | sourceTree = ""; 82 | }; 83 | 0332C90B1F829EBC00CBA6A7 /* Addresses */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 0332C90C1F829EBC00CBA6A7 /* OSCAddress.swift */, 87 | 0332C90D1F829EBC00CBA6A7 /* OSCAddressPattern.swift */, 88 | ); 89 | path = Addresses; 90 | sourceTree = ""; 91 | }; 92 | 0332C90E1F829EBC00CBA6A7 /* Communication */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 0332C90F1F829EBC00CBA6A7 /* OSCClient.swift */, 96 | 0332C9101F829EBC00CBA6A7 /* OSCServer.swift */, 97 | 0332C9111F829EBC00CBA6A7 /* ysocket */, 98 | ); 99 | path = Communication; 100 | sourceTree = ""; 101 | }; 102 | 0332C9111F829EBC00CBA6A7 /* ysocket */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 0332C9121F829EBC00CBA6A7 /* ysocket.swift */, 106 | 0332C9131F829EBC00CBA6A7 /* yudpsocket.c */, 107 | 0332C9141F829EBC00CBA6A7 /* yudpsocket.swift */, 108 | ); 109 | path = ysocket; 110 | sourceTree = ""; 111 | }; 112 | 0332C9151F829EBC00CBA6A7 /* Elements */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 0332C9161F829EBC00CBA6A7 /* OSCBundle.swift */, 116 | 0332C9171F829EBC00CBA6A7 /* OSCElementProtocol.swift */, 117 | 0332C9181F829EBC00CBA6A7 /* OSCMessage.swift */, 118 | ); 119 | path = Elements; 120 | sourceTree = ""; 121 | }; 122 | 0332C9191F829EBC00CBA6A7 /* Helpers */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 0332C91A1F829EBC00CBA6A7 /* Extensions.swift */, 126 | 0332C91B1F829EBC00CBA6A7 /* Timer.swift */, 127 | ); 128 | path = Helpers; 129 | sourceTree = ""; 130 | }; 131 | 0332C91E1F829EBC00CBA6A7 /* Types */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 0332C91F1F829EBC00CBA6A7 /* Blob.swift */, 135 | 0332C9201F829EBC00CBA6A7 /* Bool.swift */, 136 | 0332C9211F829EBC00CBA6A7 /* Float.swift */, 137 | 0332C9221F829EBC00CBA6A7 /* Impulse.swift */, 138 | 0332C9231F829EBC00CBA6A7 /* Int.swift */, 139 | 0332C9241F829EBC00CBA6A7 /* OSCTypeProtocol.swift */, 140 | 0332C9251F829EBC00CBA6A7 /* String.swift */, 141 | 0332C9261F829EBC00CBA6A7 /* Timetag.swift */, 142 | ); 143 | path = Types; 144 | sourceTree = ""; 145 | }; 146 | 0339A34A1D37FCEB0060ED91 = { 147 | isa = PBXGroup; 148 | children = ( 149 | 0332C91C1F829EBC00CBA6A7 /* Info.plist */, 150 | 0332C91D1F829EBC00CBA6A7 /* SwiftOSC.h */, 151 | 0332C90A1F829EBC00CBA6A7 /* SwiftOSC */, 152 | 0339A3551D37FCEB0060ED91 /* Products */, 153 | ); 154 | sourceTree = ""; 155 | }; 156 | 0339A3551D37FCEB0060ED91 /* Products */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 0339A3541D37FCEB0060ED91 /* SwiftOSC.framework */, 160 | ); 161 | name = Products; 162 | sourceTree = ""; 163 | }; 164 | /* End PBXGroup section */ 165 | 166 | /* Begin PBXHeadersBuildPhase section */ 167 | 0339A3511D37FCEB0060ED91 /* Headers */ = { 168 | isa = PBXHeadersBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 0332C9291F82A16700CBA6A7 /* SwiftOSC.h in Headers */, 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | }; 175 | /* End PBXHeadersBuildPhase section */ 176 | 177 | /* Begin PBXNativeTarget section */ 178 | 0339A3531D37FCEB0060ED91 /* SwiftOSC */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = 0339A35C1D37FCEB0060ED91 /* Build configuration list for PBXNativeTarget "SwiftOSC" */; 181 | buildPhases = ( 182 | 0339A34F1D37FCEB0060ED91 /* Sources */, 183 | 0339A3501D37FCEB0060ED91 /* Frameworks */, 184 | 0339A3511D37FCEB0060ED91 /* Headers */, 185 | 0339A3521D37FCEB0060ED91 /* Resources */, 186 | ); 187 | buildRules = ( 188 | ); 189 | dependencies = ( 190 | ); 191 | name = SwiftOSC; 192 | productName = SwiftOSC; 193 | productReference = 0339A3541D37FCEB0060ED91 /* SwiftOSC.framework */; 194 | productType = "com.apple.product-type.framework"; 195 | }; 196 | /* End PBXNativeTarget section */ 197 | 198 | /* Begin PBXProject section */ 199 | 0339A34B1D37FCEB0060ED91 /* Project object */ = { 200 | isa = PBXProject; 201 | attributes = { 202 | LastSwiftUpdateCheck = 0800; 203 | LastUpgradeCheck = 1020; 204 | ORGANIZATIONNAME = "Devin Roth Music"; 205 | TargetAttributes = { 206 | 0339A3531D37FCEB0060ED91 = { 207 | CreatedOnToolsVersion = 8.0; 208 | DevelopmentTeam = Q5C99V536K; 209 | DevelopmentTeamName = "Devin Roth (Personal Team)"; 210 | LastSwiftMigration = 1020; 211 | ProvisioningStyle = Automatic; 212 | }; 213 | }; 214 | }; 215 | buildConfigurationList = 0339A34E1D37FCEB0060ED91 /* Build configuration list for PBXProject "macOS" */; 216 | compatibilityVersion = "Xcode 3.2"; 217 | developmentRegion = en; 218 | hasScannedForEncodings = 0; 219 | knownRegions = ( 220 | en, 221 | Base, 222 | ); 223 | mainGroup = 0339A34A1D37FCEB0060ED91; 224 | productRefGroup = 0339A3551D37FCEB0060ED91 /* Products */; 225 | projectDirPath = ""; 226 | projectRoot = ""; 227 | targets = ( 228 | 0339A3531D37FCEB0060ED91 /* SwiftOSC */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 0339A3521D37FCEB0060ED91 /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | /* End PBXResourcesBuildPhase section */ 242 | 243 | /* Begin PBXSourcesBuildPhase section */ 244 | 0339A34F1D37FCEB0060ED91 /* Sources */ = { 245 | isa = PBXSourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | 032E3DC41F82A2A900DC931B /* OSCAddress.swift in Sources */, 249 | 032E3DC51F82A2A900DC931B /* OSCAddressPattern.swift in Sources */, 250 | 032E3DC61F82A2A900DC931B /* OSCClient.swift in Sources */, 251 | 032E3DC71F82A2A900DC931B /* OSCServer.swift in Sources */, 252 | 032E3DC81F82A2A900DC931B /* ysocket.swift in Sources */, 253 | 032E3DC91F82A2A900DC931B /* yudpsocket.c in Sources */, 254 | 032E3DCA1F82A2A900DC931B /* yudpsocket.swift in Sources */, 255 | 032E3DCB1F82A2A900DC931B /* OSCBundle.swift in Sources */, 256 | 032E3DCC1F82A2A900DC931B /* OSCElementProtocol.swift in Sources */, 257 | 032E3DCD1F82A2A900DC931B /* OSCMessage.swift in Sources */, 258 | 032E3DCE1F82A2A900DC931B /* Extensions.swift in Sources */, 259 | 032E3DCF1F82A2A900DC931B /* Timer.swift in Sources */, 260 | 032E3DD01F82A2A900DC931B /* Blob.swift in Sources */, 261 | 032E3DD11F82A2A900DC931B /* Bool.swift in Sources */, 262 | 032E3DD21F82A2A900DC931B /* Float.swift in Sources */, 263 | 032E3DD31F82A2A900DC931B /* Impulse.swift in Sources */, 264 | 032E3DD41F82A2A900DC931B /* Int.swift in Sources */, 265 | 032E3DD51F82A2A900DC931B /* OSCTypeProtocol.swift in Sources */, 266 | 032E3DD61F82A2A900DC931B /* String.swift in Sources */, 267 | 032E3DD71F82A2A900DC931B /* Timetag.swift in Sources */, 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXSourcesBuildPhase section */ 272 | 273 | /* Begin XCBuildConfiguration section */ 274 | 0339A35A1D37FCEB0060ED91 /* Debug */ = { 275 | isa = XCBuildConfiguration; 276 | buildSettings = { 277 | ALWAYS_SEARCH_USER_PATHS = NO; 278 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 279 | CLANG_ANALYZER_NONNULL = YES; 280 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 281 | CLANG_CXX_LIBRARY = "libc++"; 282 | CLANG_ENABLE_MODULES = YES; 283 | CLANG_ENABLE_OBJC_ARC = YES; 284 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 285 | CLANG_WARN_BOOL_CONVERSION = YES; 286 | CLANG_WARN_COMMA = YES; 287 | CLANG_WARN_CONSTANT_CONVERSION = YES; 288 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 289 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 290 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 291 | CLANG_WARN_EMPTY_BODY = YES; 292 | CLANG_WARN_ENUM_CONVERSION = YES; 293 | CLANG_WARN_INFINITE_RECURSION = YES; 294 | CLANG_WARN_INT_CONVERSION = YES; 295 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 296 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 297 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 298 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 299 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 300 | CLANG_WARN_STRICT_PROTOTYPES = YES; 301 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 302 | CLANG_WARN_UNREACHABLE_CODE = YES; 303 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 304 | CODE_SIGN_IDENTITY = "-"; 305 | COPY_PHASE_STRIP = NO; 306 | CURRENT_PROJECT_VERSION = 1; 307 | DEBUG_INFORMATION_FORMAT = dwarf; 308 | ENABLE_STRICT_OBJC_MSGSEND = YES; 309 | ENABLE_TESTABILITY = YES; 310 | GCC_C_LANGUAGE_STANDARD = gnu99; 311 | GCC_DYNAMIC_NO_PIC = NO; 312 | GCC_NO_COMMON_BLOCKS = YES; 313 | GCC_OPTIMIZATION_LEVEL = 0; 314 | GCC_PREPROCESSOR_DEFINITIONS = ( 315 | "DEBUG=1", 316 | "$(inherited)", 317 | ); 318 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 319 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 320 | GCC_WARN_UNDECLARED_SELECTOR = YES; 321 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 322 | GCC_WARN_UNUSED_FUNCTION = YES; 323 | GCC_WARN_UNUSED_VARIABLE = YES; 324 | MACOSX_DEPLOYMENT_TARGET = 10.11; 325 | MTL_ENABLE_DEBUG_INFO = YES; 326 | ONLY_ACTIVE_ARCH = YES; 327 | SDKROOT = macosx; 328 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 329 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 330 | VERSIONING_SYSTEM = "apple-generic"; 331 | VERSION_INFO_PREFIX = ""; 332 | }; 333 | name = Debug; 334 | }; 335 | 0339A35B1D37FCEB0060ED91 /* Release */ = { 336 | isa = XCBuildConfiguration; 337 | buildSettings = { 338 | ALWAYS_SEARCH_USER_PATHS = NO; 339 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 340 | CLANG_ANALYZER_NONNULL = YES; 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 342 | CLANG_CXX_LIBRARY = "libc++"; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 346 | CLANG_WARN_BOOL_CONVERSION = YES; 347 | CLANG_WARN_COMMA = YES; 348 | CLANG_WARN_CONSTANT_CONVERSION = YES; 349 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 350 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 351 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 352 | CLANG_WARN_EMPTY_BODY = YES; 353 | CLANG_WARN_ENUM_CONVERSION = YES; 354 | CLANG_WARN_INFINITE_RECURSION = YES; 355 | CLANG_WARN_INT_CONVERSION = YES; 356 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 357 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 358 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 359 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 360 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 361 | CLANG_WARN_STRICT_PROTOTYPES = YES; 362 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 363 | CLANG_WARN_UNREACHABLE_CODE = YES; 364 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 365 | CODE_SIGN_IDENTITY = "-"; 366 | COPY_PHASE_STRIP = NO; 367 | CURRENT_PROJECT_VERSION = 1; 368 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 369 | ENABLE_NS_ASSERTIONS = NO; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | GCC_C_LANGUAGE_STANDARD = gnu99; 372 | GCC_NO_COMMON_BLOCKS = YES; 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | MACOSX_DEPLOYMENT_TARGET = 10.11; 380 | MTL_ENABLE_DEBUG_INFO = NO; 381 | SDKROOT = macosx; 382 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 383 | VERSIONING_SYSTEM = "apple-generic"; 384 | VERSION_INFO_PREFIX = ""; 385 | }; 386 | name = Release; 387 | }; 388 | 0339A35D1D37FCEB0060ED91 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | CLANG_ENABLE_MODULES = YES; 392 | COMBINE_HIDPI_IMAGES = YES; 393 | DEFINES_MODULE = YES; 394 | DEVELOPMENT_TEAM = Q5C99V536K; 395 | DYLIB_COMPATIBILITY_VERSION = 1; 396 | DYLIB_CURRENT_VERSION = 1; 397 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 398 | FRAMEWORK_VERSION = A; 399 | INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; 400 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 401 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 402 | MACOSX_DEPLOYMENT_TARGET = 10.10; 403 | MARKETING_VERSION = 1.4.0; 404 | OTHER_LDFLAGS = ""; 405 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.SwiftOSC; 406 | PRODUCT_NAME = "$(TARGET_NAME)"; 407 | SKIP_INSTALL = YES; 408 | STRIP_STYLE = all; 409 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 410 | SWIFT_VERSION = 5.0; 411 | }; 412 | name = Debug; 413 | }; 414 | 0339A35E1D37FCEB0060ED91 /* Release */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | CLANG_ENABLE_MODULES = YES; 418 | CODE_SIGN_IDENTITY = "Apple Development"; 419 | COMBINE_HIDPI_IMAGES = YES; 420 | DEFINES_MODULE = YES; 421 | DEVELOPMENT_TEAM = Q5C99V536K; 422 | DYLIB_COMPATIBILITY_VERSION = 1; 423 | DYLIB_CURRENT_VERSION = 1; 424 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 425 | FRAMEWORK_VERSION = A; 426 | INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; 427 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 428 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 429 | MACOSX_DEPLOYMENT_TARGET = 10.10; 430 | MARKETING_VERSION = 1.4.0; 431 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.SwiftOSC; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | SKIP_INSTALL = YES; 434 | STRIP_STYLE = all; 435 | SWIFT_VERSION = 5.0; 436 | }; 437 | name = Release; 438 | }; 439 | /* End XCBuildConfiguration section */ 440 | 441 | /* Begin XCConfigurationList section */ 442 | 0339A34E1D37FCEB0060ED91 /* Build configuration list for PBXProject "macOS" */ = { 443 | isa = XCConfigurationList; 444 | buildConfigurations = ( 445 | 0339A35A1D37FCEB0060ED91 /* Debug */, 446 | 0339A35B1D37FCEB0060ED91 /* Release */, 447 | ); 448 | defaultConfigurationIsVisible = 0; 449 | defaultConfigurationName = Release; 450 | }; 451 | 0339A35C1D37FCEB0060ED91 /* Build configuration list for PBXNativeTarget "SwiftOSC" */ = { 452 | isa = XCConfigurationList; 453 | buildConfigurations = ( 454 | 0339A35D1D37FCEB0060ED91 /* Debug */, 455 | 0339A35E1D37FCEB0060ED91 /* Release */, 456 | ); 457 | defaultConfigurationIsVisible = 0; 458 | defaultConfigurationName = Release; 459 | }; 460 | /* End XCConfigurationList section */ 461 | }; 462 | rootObject = 0339A34B1D37FCEB0060ED91 /* Project object */; 463 | } 464 | -------------------------------------------------------------------------------- /Framework/macOS/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Framework/macOS/macOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Framework/tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Framework/tvOS/SwiftOSC.h: -------------------------------------------------------------------------------- 1 | // 2 | // watchOS.h 3 | // watchOS 4 | // 5 | // Created by Devin Roth on 2020-01-19. 6 | // Copyright © 2020 Devin Roth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for watchOS. 12 | FOUNDATION_EXPORT double tvOSVersionNumber; 13 | 14 | //! Project version string for watchOS. 15 | FOUNDATION_EXPORT const unsigned char tvOSVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Framework/tvOS/tvOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 03CE673223D57CBB00510AC7 /* Timetag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671623D57CBB00510AC7 /* Timetag.swift */; }; 11 | 03CE673323D57CBB00510AC7 /* Blob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671723D57CBB00510AC7 /* Blob.swift */; }; 12 | 03CE673423D57CBB00510AC7 /* Impulse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671823D57CBB00510AC7 /* Impulse.swift */; }; 13 | 03CE673523D57CBB00510AC7 /* Int.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671923D57CBB00510AC7 /* Int.swift */; }; 14 | 03CE673623D57CBB00510AC7 /* OSCTypeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671A23D57CBB00510AC7 /* OSCTypeProtocol.swift */; }; 15 | 03CE673723D57CBB00510AC7 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671B23D57CBB00510AC7 /* String.swift */; }; 16 | 03CE673823D57CBB00510AC7 /* Bool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671C23D57CBB00510AC7 /* Bool.swift */; }; 17 | 03CE673923D57CBB00510AC7 /* Float.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE671D23D57CBB00510AC7 /* Float.swift */; }; 18 | 03CE673A23D57CBB00510AC7 /* OSCMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672223D57CBB00510AC7 /* OSCMessage.swift */; }; 19 | 03CE673B23D57CBB00510AC7 /* OSCElementProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672323D57CBB00510AC7 /* OSCElementProtocol.swift */; }; 20 | 03CE673C23D57CBB00510AC7 /* OSCBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672423D57CBB00510AC7 /* OSCBundle.swift */; }; 21 | 03CE673D23D57CBB00510AC7 /* OSCAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672623D57CBB00510AC7 /* OSCAddress.swift */; }; 22 | 03CE673E23D57CBB00510AC7 /* OSCAddressPattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672723D57CBB00510AC7 /* OSCAddressPattern.swift */; }; 23 | 03CE673F23D57CBB00510AC7 /* yudpsocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672A23D57CBB00510AC7 /* yudpsocket.c */; }; 24 | 03CE674023D57CBB00510AC7 /* yudpsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672B23D57CBB00510AC7 /* yudpsocket.swift */; }; 25 | 03CE674123D57CBB00510AC7 /* ysocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672C23D57CBB00510AC7 /* ysocket.swift */; }; 26 | 03CE674223D57CBB00510AC7 /* OSCServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672D23D57CBB00510AC7 /* OSCServer.swift */; }; 27 | 03CE674323D57CBB00510AC7 /* OSCClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE672E23D57CBB00510AC7 /* OSCClient.swift */; }; 28 | 03CE674423D57CBB00510AC7 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE673023D57CBB00510AC7 /* Timer.swift */; }; 29 | 03CE674523D57CBB00510AC7 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE673123D57CBB00510AC7 /* Extensions.swift */; }; 30 | 03E25E9423D57B5700079FB7 /* SwiftOSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 03E25E9323D57B4800079FB7 /* SwiftOSC.h */; settings = {ATTRIBUTES = (Public, ); }; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 034F682D23D57A6E00763775 /* tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 034F683123D57A6E00763775 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 03CE671623D57CBB00510AC7 /* Timetag.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timetag.swift; sourceTree = ""; }; 37 | 03CE671723D57CBB00510AC7 /* Blob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Blob.swift; sourceTree = ""; }; 38 | 03CE671823D57CBB00510AC7 /* Impulse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Impulse.swift; sourceTree = ""; }; 39 | 03CE671923D57CBB00510AC7 /* Int.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Int.swift; sourceTree = ""; }; 40 | 03CE671A23D57CBB00510AC7 /* OSCTypeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCTypeProtocol.swift; sourceTree = ""; }; 41 | 03CE671B23D57CBB00510AC7 /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; 42 | 03CE671C23D57CBB00510AC7 /* Bool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bool.swift; sourceTree = ""; }; 43 | 03CE671D23D57CBB00510AC7 /* Float.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Float.swift; sourceTree = ""; }; 44 | 03CE672223D57CBB00510AC7 /* OSCMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCMessage.swift; sourceTree = ""; }; 45 | 03CE672323D57CBB00510AC7 /* OSCElementProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCElementProtocol.swift; sourceTree = ""; }; 46 | 03CE672423D57CBB00510AC7 /* OSCBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCBundle.swift; sourceTree = ""; }; 47 | 03CE672623D57CBB00510AC7 /* OSCAddress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCAddress.swift; sourceTree = ""; }; 48 | 03CE672723D57CBB00510AC7 /* OSCAddressPattern.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCAddressPattern.swift; sourceTree = ""; }; 49 | 03CE672A23D57CBB00510AC7 /* yudpsocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yudpsocket.c; sourceTree = ""; }; 50 | 03CE672B23D57CBB00510AC7 /* yudpsocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = yudpsocket.swift; sourceTree = ""; }; 51 | 03CE672C23D57CBB00510AC7 /* ysocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ysocket.swift; sourceTree = ""; }; 52 | 03CE672D23D57CBB00510AC7 /* OSCServer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCServer.swift; sourceTree = ""; }; 53 | 03CE672E23D57CBB00510AC7 /* OSCClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCClient.swift; sourceTree = ""; }; 54 | 03CE673023D57CBB00510AC7 /* Timer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timer.swift; sourceTree = ""; }; 55 | 03CE673123D57CBB00510AC7 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 56 | 03E25E9323D57B4800079FB7 /* SwiftOSC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftOSC.h; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 034F682A23D57A6E00763775 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | 034F682323D57A6E00763775 = { 71 | isa = PBXGroup; 72 | children = ( 73 | 03E25E9323D57B4800079FB7 /* SwiftOSC.h */, 74 | 034F683123D57A6E00763775 /* Info.plist */, 75 | 03CE671423D57CBB00510AC7 /* SwiftOSC */, 76 | 034F682E23D57A6E00763775 /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 034F682E23D57A6E00763775 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 034F682D23D57A6E00763775 /* tvOS.framework */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 03CE671423D57CBB00510AC7 /* SwiftOSC */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 03CE671523D57CBB00510AC7 /* Types */, 92 | 03CE672123D57CBB00510AC7 /* Elements */, 93 | 03CE672523D57CBB00510AC7 /* Addresses */, 94 | 03CE672823D57CBB00510AC7 /* Communication */, 95 | 03CE672F23D57CBB00510AC7 /* Helpers */, 96 | ); 97 | name = SwiftOSC; 98 | path = ../SwiftOSC; 99 | sourceTree = ""; 100 | }; 101 | 03CE671523D57CBB00510AC7 /* Types */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 03CE671623D57CBB00510AC7 /* Timetag.swift */, 105 | 03CE671723D57CBB00510AC7 /* Blob.swift */, 106 | 03CE671823D57CBB00510AC7 /* Impulse.swift */, 107 | 03CE671923D57CBB00510AC7 /* Int.swift */, 108 | 03CE671A23D57CBB00510AC7 /* OSCTypeProtocol.swift */, 109 | 03CE671B23D57CBB00510AC7 /* String.swift */, 110 | 03CE671C23D57CBB00510AC7 /* Bool.swift */, 111 | 03CE671D23D57CBB00510AC7 /* Float.swift */, 112 | ); 113 | path = Types; 114 | sourceTree = ""; 115 | }; 116 | 03CE672123D57CBB00510AC7 /* Elements */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 03CE672223D57CBB00510AC7 /* OSCMessage.swift */, 120 | 03CE672323D57CBB00510AC7 /* OSCElementProtocol.swift */, 121 | 03CE672423D57CBB00510AC7 /* OSCBundle.swift */, 122 | ); 123 | path = Elements; 124 | sourceTree = ""; 125 | }; 126 | 03CE672523D57CBB00510AC7 /* Addresses */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 03CE672623D57CBB00510AC7 /* OSCAddress.swift */, 130 | 03CE672723D57CBB00510AC7 /* OSCAddressPattern.swift */, 131 | ); 132 | path = Addresses; 133 | sourceTree = ""; 134 | }; 135 | 03CE672823D57CBB00510AC7 /* Communication */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 03CE672923D57CBB00510AC7 /* ysocket */, 139 | 03CE672D23D57CBB00510AC7 /* OSCServer.swift */, 140 | 03CE672E23D57CBB00510AC7 /* OSCClient.swift */, 141 | ); 142 | path = Communication; 143 | sourceTree = ""; 144 | }; 145 | 03CE672923D57CBB00510AC7 /* ysocket */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 03CE672A23D57CBB00510AC7 /* yudpsocket.c */, 149 | 03CE672B23D57CBB00510AC7 /* yudpsocket.swift */, 150 | 03CE672C23D57CBB00510AC7 /* ysocket.swift */, 151 | ); 152 | path = ysocket; 153 | sourceTree = ""; 154 | }; 155 | 03CE672F23D57CBB00510AC7 /* Helpers */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 03CE673023D57CBB00510AC7 /* Timer.swift */, 159 | 03CE673123D57CBB00510AC7 /* Extensions.swift */, 160 | ); 161 | path = Helpers; 162 | sourceTree = ""; 163 | }; 164 | /* End PBXGroup section */ 165 | 166 | /* Begin PBXHeadersBuildPhase section */ 167 | 034F682823D57A6E00763775 /* Headers */ = { 168 | isa = PBXHeadersBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 03E25E9423D57B5700079FB7 /* SwiftOSC.h in Headers */, 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | }; 175 | /* End PBXHeadersBuildPhase section */ 176 | 177 | /* Begin PBXNativeTarget section */ 178 | 034F682C23D57A6E00763775 /* tvOS */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = 034F683523D57A6E00763775 /* Build configuration list for PBXNativeTarget "tvOS" */; 181 | buildPhases = ( 182 | 034F682823D57A6E00763775 /* Headers */, 183 | 034F682923D57A6E00763775 /* Sources */, 184 | 034F682A23D57A6E00763775 /* Frameworks */, 185 | 034F682B23D57A6E00763775 /* Resources */, 186 | ); 187 | buildRules = ( 188 | ); 189 | dependencies = ( 190 | ); 191 | name = tvOS; 192 | productName = tvOS; 193 | productReference = 034F682D23D57A6E00763775 /* tvOS.framework */; 194 | productType = "com.apple.product-type.framework"; 195 | }; 196 | /* End PBXNativeTarget section */ 197 | 198 | /* Begin PBXProject section */ 199 | 034F682423D57A6E00763775 /* Project object */ = { 200 | isa = PBXProject; 201 | attributes = { 202 | LastUpgradeCheck = 1120; 203 | ORGANIZATIONNAME = "Devin Roth"; 204 | TargetAttributes = { 205 | 034F682C23D57A6E00763775 = { 206 | CreatedOnToolsVersion = 11.2.1; 207 | }; 208 | }; 209 | }; 210 | buildConfigurationList = 034F682723D57A6E00763775 /* Build configuration list for PBXProject "tvOS" */; 211 | compatibilityVersion = "Xcode 9.3"; 212 | developmentRegion = en; 213 | hasScannedForEncodings = 0; 214 | knownRegions = ( 215 | en, 216 | Base, 217 | ); 218 | mainGroup = 034F682323D57A6E00763775; 219 | productRefGroup = 034F682E23D57A6E00763775 /* Products */; 220 | projectDirPath = ""; 221 | projectRoot = ""; 222 | targets = ( 223 | 034F682C23D57A6E00763775 /* tvOS */, 224 | ); 225 | }; 226 | /* End PBXProject section */ 227 | 228 | /* Begin PBXResourcesBuildPhase section */ 229 | 034F682B23D57A6E00763775 /* Resources */ = { 230 | isa = PBXResourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXResourcesBuildPhase section */ 237 | 238 | /* Begin PBXSourcesBuildPhase section */ 239 | 034F682923D57A6E00763775 /* Sources */ = { 240 | isa = PBXSourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 03CE673B23D57CBB00510AC7 /* OSCElementProtocol.swift in Sources */, 244 | 03CE673E23D57CBB00510AC7 /* OSCAddressPattern.swift in Sources */, 245 | 03CE673723D57CBB00510AC7 /* String.swift in Sources */, 246 | 03CE673323D57CBB00510AC7 /* Blob.swift in Sources */, 247 | 03CE673623D57CBB00510AC7 /* OSCTypeProtocol.swift in Sources */, 248 | 03CE673223D57CBB00510AC7 /* Timetag.swift in Sources */, 249 | 03CE674323D57CBB00510AC7 /* OSCClient.swift in Sources */, 250 | 03CE674023D57CBB00510AC7 /* yudpsocket.swift in Sources */, 251 | 03CE674423D57CBB00510AC7 /* Timer.swift in Sources */, 252 | 03CE673F23D57CBB00510AC7 /* yudpsocket.c in Sources */, 253 | 03CE673A23D57CBB00510AC7 /* OSCMessage.swift in Sources */, 254 | 03CE673923D57CBB00510AC7 /* Float.swift in Sources */, 255 | 03CE674123D57CBB00510AC7 /* ysocket.swift in Sources */, 256 | 03CE673C23D57CBB00510AC7 /* OSCBundle.swift in Sources */, 257 | 03CE673423D57CBB00510AC7 /* Impulse.swift in Sources */, 258 | 03CE674523D57CBB00510AC7 /* Extensions.swift in Sources */, 259 | 03CE673523D57CBB00510AC7 /* Int.swift in Sources */, 260 | 03CE673D23D57CBB00510AC7 /* OSCAddress.swift in Sources */, 261 | 03CE673823D57CBB00510AC7 /* Bool.swift in Sources */, 262 | 03CE674223D57CBB00510AC7 /* OSCServer.swift in Sources */, 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | /* End PBXSourcesBuildPhase section */ 267 | 268 | /* Begin XCBuildConfiguration section */ 269 | 034F683323D57A6E00763775 /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | ALWAYS_SEARCH_USER_PATHS = NO; 273 | CLANG_ANALYZER_NONNULL = YES; 274 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 275 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 276 | CLANG_CXX_LIBRARY = "libc++"; 277 | CLANG_ENABLE_MODULES = YES; 278 | CLANG_ENABLE_OBJC_ARC = YES; 279 | CLANG_ENABLE_OBJC_WEAK = YES; 280 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 281 | CLANG_WARN_BOOL_CONVERSION = YES; 282 | CLANG_WARN_COMMA = YES; 283 | CLANG_WARN_CONSTANT_CONVERSION = YES; 284 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 285 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 286 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 287 | CLANG_WARN_EMPTY_BODY = YES; 288 | CLANG_WARN_ENUM_CONVERSION = YES; 289 | CLANG_WARN_INFINITE_RECURSION = YES; 290 | CLANG_WARN_INT_CONVERSION = YES; 291 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 292 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 293 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 294 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 295 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 296 | CLANG_WARN_STRICT_PROTOTYPES = YES; 297 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 298 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 299 | CLANG_WARN_UNREACHABLE_CODE = YES; 300 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 301 | COPY_PHASE_STRIP = NO; 302 | CURRENT_PROJECT_VERSION = 1; 303 | DEBUG_INFORMATION_FORMAT = dwarf; 304 | ENABLE_STRICT_OBJC_MSGSEND = YES; 305 | ENABLE_TESTABILITY = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu11; 307 | GCC_DYNAMIC_NO_PIC = NO; 308 | GCC_NO_COMMON_BLOCKS = YES; 309 | GCC_OPTIMIZATION_LEVEL = 0; 310 | GCC_PREPROCESSOR_DEFINITIONS = ( 311 | "DEBUG=1", 312 | "$(inherited)", 313 | ); 314 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 315 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 316 | GCC_WARN_UNDECLARED_SELECTOR = YES; 317 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 318 | GCC_WARN_UNUSED_FUNCTION = YES; 319 | GCC_WARN_UNUSED_VARIABLE = YES; 320 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 321 | MTL_FAST_MATH = YES; 322 | ONLY_ACTIVE_ARCH = YES; 323 | SDKROOT = appletvos; 324 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 325 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 326 | TVOS_DEPLOYMENT_TARGET = 13.2; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | VERSION_INFO_PREFIX = ""; 329 | }; 330 | name = Debug; 331 | }; 332 | 034F683423D57A6E00763775 /* Release */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_ENABLE_OBJC_WEAK = YES; 343 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 344 | CLANG_WARN_BOOL_CONVERSION = YES; 345 | CLANG_WARN_COMMA = YES; 346 | CLANG_WARN_CONSTANT_CONVERSION = YES; 347 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 348 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 349 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 350 | CLANG_WARN_EMPTY_BODY = YES; 351 | CLANG_WARN_ENUM_CONVERSION = YES; 352 | CLANG_WARN_INFINITE_RECURSION = YES; 353 | CLANG_WARN_INT_CONVERSION = YES; 354 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 359 | CLANG_WARN_STRICT_PROTOTYPES = YES; 360 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 361 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 362 | CLANG_WARN_UNREACHABLE_CODE = YES; 363 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 364 | COPY_PHASE_STRIP = NO; 365 | CURRENT_PROJECT_VERSION = 1; 366 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 367 | ENABLE_NS_ASSERTIONS = NO; 368 | ENABLE_STRICT_OBJC_MSGSEND = YES; 369 | GCC_C_LANGUAGE_STANDARD = gnu11; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 372 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 373 | GCC_WARN_UNDECLARED_SELECTOR = YES; 374 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 375 | GCC_WARN_UNUSED_FUNCTION = YES; 376 | GCC_WARN_UNUSED_VARIABLE = YES; 377 | MTL_ENABLE_DEBUG_INFO = NO; 378 | MTL_FAST_MATH = YES; 379 | SDKROOT = appletvos; 380 | SWIFT_COMPILATION_MODE = wholemodule; 381 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 382 | TVOS_DEPLOYMENT_TARGET = 13.2; 383 | VALIDATE_PRODUCT = YES; 384 | VERSIONING_SYSTEM = "apple-generic"; 385 | VERSION_INFO_PREFIX = ""; 386 | }; 387 | name = Release; 388 | }; 389 | 034F683623D57A6E00763775 /* Debug */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | CODE_SIGN_STYLE = Automatic; 393 | DEFINES_MODULE = YES; 394 | DEVELOPMENT_TEAM = Q5C99V536K; 395 | DYLIB_COMPATIBILITY_VERSION = 1; 396 | DYLIB_CURRENT_VERSION = 1; 397 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 398 | INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; 399 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 400 | LD_RUNPATH_SEARCH_PATHS = ( 401 | "$(inherited)", 402 | "@executable_path/Frameworks", 403 | "@loader_path/Frameworks", 404 | ); 405 | MARKETING_VERSION = 1.4.0; 406 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.SwiftOSC; 407 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 408 | SKIP_INSTALL = YES; 409 | SWIFT_VERSION = 5.0; 410 | TARGETED_DEVICE_FAMILY = 3; 411 | TVOS_DEPLOYMENT_TARGET = 12.1; 412 | }; 413 | name = Debug; 414 | }; 415 | 034F683723D57A6E00763775 /* Release */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | CODE_SIGN_STYLE = Automatic; 419 | DEFINES_MODULE = YES; 420 | DEVELOPMENT_TEAM = Q5C99V536K; 421 | DYLIB_COMPATIBILITY_VERSION = 1; 422 | DYLIB_CURRENT_VERSION = 1; 423 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 424 | INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; 425 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 426 | LD_RUNPATH_SEARCH_PATHS = ( 427 | "$(inherited)", 428 | "@executable_path/Frameworks", 429 | "@loader_path/Frameworks", 430 | ); 431 | MARKETING_VERSION = 1.4.0; 432 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.SwiftOSC; 433 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 434 | SKIP_INSTALL = YES; 435 | SWIFT_VERSION = 5.0; 436 | TARGETED_DEVICE_FAMILY = 3; 437 | TVOS_DEPLOYMENT_TARGET = 12.1; 438 | }; 439 | name = Release; 440 | }; 441 | /* End XCBuildConfiguration section */ 442 | 443 | /* Begin XCConfigurationList section */ 444 | 034F682723D57A6E00763775 /* Build configuration list for PBXProject "tvOS" */ = { 445 | isa = XCConfigurationList; 446 | buildConfigurations = ( 447 | 034F683323D57A6E00763775 /* Debug */, 448 | 034F683423D57A6E00763775 /* Release */, 449 | ); 450 | defaultConfigurationIsVisible = 0; 451 | defaultConfigurationName = Release; 452 | }; 453 | 034F683523D57A6E00763775 /* Build configuration list for PBXNativeTarget "tvOS" */ = { 454 | isa = XCConfigurationList; 455 | buildConfigurations = ( 456 | 034F683623D57A6E00763775 /* Debug */, 457 | 034F683723D57A6E00763775 /* Release */, 458 | ); 459 | defaultConfigurationIsVisible = 0; 460 | defaultConfigurationName = Release; 461 | }; 462 | /* End XCConfigurationList section */ 463 | }; 464 | rootObject = 034F682423D57A6E00763775 /* Project object */; 465 | } 466 | -------------------------------------------------------------------------------- /Framework/watchOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Framework/watchOS/watchOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 03CE670023D57CB400510AC7 /* Timetag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66E423D57CB400510AC7 /* Timetag.swift */; }; 11 | 03CE670123D57CB400510AC7 /* Blob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66E523D57CB400510AC7 /* Blob.swift */; }; 12 | 03CE670223D57CB400510AC7 /* Impulse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66E623D57CB400510AC7 /* Impulse.swift */; }; 13 | 03CE670323D57CB400510AC7 /* Int.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66E723D57CB400510AC7 /* Int.swift */; }; 14 | 03CE670423D57CB400510AC7 /* OSCTypeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66E823D57CB400510AC7 /* OSCTypeProtocol.swift */; }; 15 | 03CE670523D57CB400510AC7 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66E923D57CB400510AC7 /* String.swift */; }; 16 | 03CE670623D57CB400510AC7 /* Bool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66EA23D57CB400510AC7 /* Bool.swift */; }; 17 | 03CE670723D57CB400510AC7 /* Float.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66EB23D57CB400510AC7 /* Float.swift */; }; 18 | 03CE670823D57CB400510AC7 /* OSCMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66F023D57CB400510AC7 /* OSCMessage.swift */; }; 19 | 03CE670923D57CB400510AC7 /* OSCElementProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66F123D57CB400510AC7 /* OSCElementProtocol.swift */; }; 20 | 03CE670A23D57CB400510AC7 /* OSCBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66F223D57CB400510AC7 /* OSCBundle.swift */; }; 21 | 03CE670B23D57CB400510AC7 /* OSCAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66F423D57CB400510AC7 /* OSCAddress.swift */; }; 22 | 03CE670C23D57CB400510AC7 /* OSCAddressPattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66F523D57CB400510AC7 /* OSCAddressPattern.swift */; }; 23 | 03CE670D23D57CB400510AC7 /* yudpsocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66F823D57CB400510AC7 /* yudpsocket.c */; }; 24 | 03CE670E23D57CB400510AC7 /* yudpsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66F923D57CB400510AC7 /* yudpsocket.swift */; }; 25 | 03CE670F23D57CB400510AC7 /* ysocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66FA23D57CB400510AC7 /* ysocket.swift */; }; 26 | 03CE671023D57CB400510AC7 /* OSCServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66FB23D57CB400510AC7 /* OSCServer.swift */; }; 27 | 03CE671123D57CB400510AC7 /* OSCClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66FC23D57CB400510AC7 /* OSCClient.swift */; }; 28 | 03CE671223D57CB400510AC7 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66FE23D57CB400510AC7 /* Timer.swift */; }; 29 | 03CE671323D57CB400510AC7 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CE66FF23D57CB400510AC7 /* Extensions.swift */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 032E50EF23D5754D007F03FB /* SwiftOSC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SwiftOSC.h; path = ../tvOS/SwiftOSC.h; sourceTree = ""; }; 34 | 032E50F023D5754D007F03FB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 03A20E7423D577BF007F93F5 /* SwiftOSC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftOSC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 03CE66E423D57CB400510AC7 /* Timetag.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timetag.swift; sourceTree = ""; }; 37 | 03CE66E523D57CB400510AC7 /* Blob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Blob.swift; sourceTree = ""; }; 38 | 03CE66E623D57CB400510AC7 /* Impulse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Impulse.swift; sourceTree = ""; }; 39 | 03CE66E723D57CB400510AC7 /* Int.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Int.swift; sourceTree = ""; }; 40 | 03CE66E823D57CB400510AC7 /* OSCTypeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCTypeProtocol.swift; sourceTree = ""; }; 41 | 03CE66E923D57CB400510AC7 /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; 42 | 03CE66EA23D57CB400510AC7 /* Bool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bool.swift; sourceTree = ""; }; 43 | 03CE66EB23D57CB400510AC7 /* Float.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Float.swift; sourceTree = ""; }; 44 | 03CE66F023D57CB400510AC7 /* OSCMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCMessage.swift; sourceTree = ""; }; 45 | 03CE66F123D57CB400510AC7 /* OSCElementProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCElementProtocol.swift; sourceTree = ""; }; 46 | 03CE66F223D57CB400510AC7 /* OSCBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCBundle.swift; sourceTree = ""; }; 47 | 03CE66F423D57CB400510AC7 /* OSCAddress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCAddress.swift; sourceTree = ""; }; 48 | 03CE66F523D57CB400510AC7 /* OSCAddressPattern.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCAddressPattern.swift; sourceTree = ""; }; 49 | 03CE66F823D57CB400510AC7 /* yudpsocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yudpsocket.c; sourceTree = ""; }; 50 | 03CE66F923D57CB400510AC7 /* yudpsocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = yudpsocket.swift; sourceTree = ""; }; 51 | 03CE66FA23D57CB400510AC7 /* ysocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ysocket.swift; sourceTree = ""; }; 52 | 03CE66FB23D57CB400510AC7 /* OSCServer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCServer.swift; sourceTree = ""; }; 53 | 03CE66FC23D57CB400510AC7 /* OSCClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSCClient.swift; sourceTree = ""; }; 54 | 03CE66FE23D57CB400510AC7 /* Timer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timer.swift; sourceTree = ""; }; 55 | 03CE66FF23D57CB400510AC7 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 03A20E7123D577BF007F93F5 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 032E50E223D5754D007F03FB = { 70 | isa = PBXGroup; 71 | children = ( 72 | 032E50EF23D5754D007F03FB /* SwiftOSC.h */, 73 | 032E50F023D5754D007F03FB /* Info.plist */, 74 | 03CE66E223D57CB400510AC7 /* SwiftOSC */, 75 | 032E50ED23D5754D007F03FB /* Products */, 76 | ); 77 | sourceTree = ""; 78 | }; 79 | 032E50ED23D5754D007F03FB /* Products */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 03A20E7423D577BF007F93F5 /* SwiftOSC.framework */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | 03CE66E223D57CB400510AC7 /* SwiftOSC */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 03CE66E323D57CB400510AC7 /* Types */, 91 | 03CE66EF23D57CB400510AC7 /* Elements */, 92 | 03CE66F323D57CB400510AC7 /* Addresses */, 93 | 03CE66F623D57CB400510AC7 /* Communication */, 94 | 03CE66FD23D57CB400510AC7 /* Helpers */, 95 | ); 96 | name = SwiftOSC; 97 | path = ../SwiftOSC; 98 | sourceTree = ""; 99 | }; 100 | 03CE66E323D57CB400510AC7 /* Types */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 03CE66E423D57CB400510AC7 /* Timetag.swift */, 104 | 03CE66E523D57CB400510AC7 /* Blob.swift */, 105 | 03CE66E623D57CB400510AC7 /* Impulse.swift */, 106 | 03CE66E723D57CB400510AC7 /* Int.swift */, 107 | 03CE66E823D57CB400510AC7 /* OSCTypeProtocol.swift */, 108 | 03CE66E923D57CB400510AC7 /* String.swift */, 109 | 03CE66EA23D57CB400510AC7 /* Bool.swift */, 110 | 03CE66EB23D57CB400510AC7 /* Float.swift */, 111 | ); 112 | path = Types; 113 | sourceTree = ""; 114 | }; 115 | 03CE66EF23D57CB400510AC7 /* Elements */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 03CE66F023D57CB400510AC7 /* OSCMessage.swift */, 119 | 03CE66F123D57CB400510AC7 /* OSCElementProtocol.swift */, 120 | 03CE66F223D57CB400510AC7 /* OSCBundle.swift */, 121 | ); 122 | path = Elements; 123 | sourceTree = ""; 124 | }; 125 | 03CE66F323D57CB400510AC7 /* Addresses */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 03CE66F423D57CB400510AC7 /* OSCAddress.swift */, 129 | 03CE66F523D57CB400510AC7 /* OSCAddressPattern.swift */, 130 | ); 131 | path = Addresses; 132 | sourceTree = ""; 133 | }; 134 | 03CE66F623D57CB400510AC7 /* Communication */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 03CE66F723D57CB400510AC7 /* ysocket */, 138 | 03CE66FB23D57CB400510AC7 /* OSCServer.swift */, 139 | 03CE66FC23D57CB400510AC7 /* OSCClient.swift */, 140 | ); 141 | path = Communication; 142 | sourceTree = ""; 143 | }; 144 | 03CE66F723D57CB400510AC7 /* ysocket */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 03CE66F823D57CB400510AC7 /* yudpsocket.c */, 148 | 03CE66F923D57CB400510AC7 /* yudpsocket.swift */, 149 | 03CE66FA23D57CB400510AC7 /* ysocket.swift */, 150 | ); 151 | path = ysocket; 152 | sourceTree = ""; 153 | }; 154 | 03CE66FD23D57CB400510AC7 /* Helpers */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 03CE66FE23D57CB400510AC7 /* Timer.swift */, 158 | 03CE66FF23D57CB400510AC7 /* Extensions.swift */, 159 | ); 160 | path = Helpers; 161 | sourceTree = ""; 162 | }; 163 | /* End PBXGroup section */ 164 | 165 | /* Begin PBXHeadersBuildPhase section */ 166 | 03A20E6F23D577BF007F93F5 /* Headers */ = { 167 | isa = PBXHeadersBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXHeadersBuildPhase section */ 174 | 175 | /* Begin PBXNativeTarget section */ 176 | 03A20E7323D577BF007F93F5 /* SwiftOSC */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 03A20E7923D577BF007F93F5 /* Build configuration list for PBXNativeTarget "SwiftOSC" */; 179 | buildPhases = ( 180 | 03A20E6F23D577BF007F93F5 /* Headers */, 181 | 03A20E7023D577BF007F93F5 /* Sources */, 182 | 03A20E7123D577BF007F93F5 /* Frameworks */, 183 | 03A20E7223D577BF007F93F5 /* Resources */, 184 | ); 185 | buildRules = ( 186 | ); 187 | dependencies = ( 188 | ); 189 | name = SwiftOSC; 190 | productName = SwiftOSC; 191 | productReference = 03A20E7423D577BF007F93F5 /* SwiftOSC.framework */; 192 | productType = "com.apple.product-type.framework"; 193 | }; 194 | /* End PBXNativeTarget section */ 195 | 196 | /* Begin PBXProject section */ 197 | 032E50E323D5754D007F03FB /* Project object */ = { 198 | isa = PBXProject; 199 | attributes = { 200 | LastUpgradeCheck = 1120; 201 | ORGANIZATIONNAME = "Devin Roth"; 202 | TargetAttributes = { 203 | 03A20E7323D577BF007F93F5 = { 204 | CreatedOnToolsVersion = 11.2.1; 205 | }; 206 | }; 207 | }; 208 | buildConfigurationList = 032E50E623D5754D007F03FB /* Build configuration list for PBXProject "watchOS" */; 209 | compatibilityVersion = "Xcode 9.3"; 210 | developmentRegion = en; 211 | hasScannedForEncodings = 0; 212 | knownRegions = ( 213 | en, 214 | Base, 215 | ); 216 | mainGroup = 032E50E223D5754D007F03FB; 217 | productRefGroup = 032E50ED23D5754D007F03FB /* Products */; 218 | projectDirPath = ""; 219 | projectRoot = ""; 220 | targets = ( 221 | 03A20E7323D577BF007F93F5 /* SwiftOSC */, 222 | ); 223 | }; 224 | /* End PBXProject section */ 225 | 226 | /* Begin PBXResourcesBuildPhase section */ 227 | 03A20E7223D577BF007F93F5 /* Resources */ = { 228 | isa = PBXResourcesBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXResourcesBuildPhase section */ 235 | 236 | /* Begin PBXSourcesBuildPhase section */ 237 | 03A20E7023D577BF007F93F5 /* Sources */ = { 238 | isa = PBXSourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 03CE670923D57CB400510AC7 /* OSCElementProtocol.swift in Sources */, 242 | 03CE670C23D57CB400510AC7 /* OSCAddressPattern.swift in Sources */, 243 | 03CE670523D57CB400510AC7 /* String.swift in Sources */, 244 | 03CE670123D57CB400510AC7 /* Blob.swift in Sources */, 245 | 03CE670423D57CB400510AC7 /* OSCTypeProtocol.swift in Sources */, 246 | 03CE670023D57CB400510AC7 /* Timetag.swift in Sources */, 247 | 03CE671123D57CB400510AC7 /* OSCClient.swift in Sources */, 248 | 03CE670E23D57CB400510AC7 /* yudpsocket.swift in Sources */, 249 | 03CE671223D57CB400510AC7 /* Timer.swift in Sources */, 250 | 03CE670D23D57CB400510AC7 /* yudpsocket.c in Sources */, 251 | 03CE670823D57CB400510AC7 /* OSCMessage.swift in Sources */, 252 | 03CE670723D57CB400510AC7 /* Float.swift in Sources */, 253 | 03CE670F23D57CB400510AC7 /* ysocket.swift in Sources */, 254 | 03CE670A23D57CB400510AC7 /* OSCBundle.swift in Sources */, 255 | 03CE670223D57CB400510AC7 /* Impulse.swift in Sources */, 256 | 03CE671323D57CB400510AC7 /* Extensions.swift in Sources */, 257 | 03CE670323D57CB400510AC7 /* Int.swift in Sources */, 258 | 03CE670B23D57CB400510AC7 /* OSCAddress.swift in Sources */, 259 | 03CE670623D57CB400510AC7 /* Bool.swift in Sources */, 260 | 03CE671023D57CB400510AC7 /* OSCServer.swift in Sources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | /* End PBXSourcesBuildPhase section */ 265 | 266 | /* Begin XCBuildConfiguration section */ 267 | 032E50F223D5754D007F03FB /* Debug */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 273 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 274 | CLANG_CXX_LIBRARY = "libc++"; 275 | CLANG_ENABLE_MODULES = YES; 276 | CLANG_ENABLE_OBJC_ARC = YES; 277 | CLANG_ENABLE_OBJC_WEAK = YES; 278 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 279 | CLANG_WARN_BOOL_CONVERSION = YES; 280 | CLANG_WARN_COMMA = YES; 281 | CLANG_WARN_CONSTANT_CONVERSION = YES; 282 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 283 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 284 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 285 | CLANG_WARN_EMPTY_BODY = YES; 286 | CLANG_WARN_ENUM_CONVERSION = YES; 287 | CLANG_WARN_INFINITE_RECURSION = YES; 288 | CLANG_WARN_INT_CONVERSION = YES; 289 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 290 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 291 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 292 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 293 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 294 | CLANG_WARN_STRICT_PROTOTYPES = YES; 295 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 296 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 297 | CLANG_WARN_UNREACHABLE_CODE = YES; 298 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 299 | COPY_PHASE_STRIP = NO; 300 | CURRENT_PROJECT_VERSION = 1; 301 | DEBUG_INFORMATION_FORMAT = dwarf; 302 | ENABLE_STRICT_OBJC_MSGSEND = YES; 303 | ENABLE_TESTABILITY = YES; 304 | GCC_C_LANGUAGE_STANDARD = gnu11; 305 | GCC_DYNAMIC_NO_PIC = NO; 306 | GCC_NO_COMMON_BLOCKS = YES; 307 | GCC_OPTIMIZATION_LEVEL = 0; 308 | GCC_PREPROCESSOR_DEFINITIONS = ( 309 | "DEBUG=1", 310 | "$(inherited)", 311 | ); 312 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 313 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 314 | GCC_WARN_UNDECLARED_SELECTOR = YES; 315 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 316 | GCC_WARN_UNUSED_FUNCTION = YES; 317 | GCC_WARN_UNUSED_VARIABLE = YES; 318 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 319 | MTL_FAST_MATH = YES; 320 | ONLY_ACTIVE_ARCH = YES; 321 | SDKROOT = watchos; 322 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 323 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 324 | VERSIONING_SYSTEM = "apple-generic"; 325 | VERSION_INFO_PREFIX = ""; 326 | WATCHOS_DEPLOYMENT_TARGET = 6.1; 327 | }; 328 | name = Debug; 329 | }; 330 | 032E50F323D5754D007F03FB /* Release */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ALWAYS_SEARCH_USER_PATHS = NO; 334 | CLANG_ANALYZER_NONNULL = YES; 335 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 337 | CLANG_CXX_LIBRARY = "libc++"; 338 | CLANG_ENABLE_MODULES = YES; 339 | CLANG_ENABLE_OBJC_ARC = YES; 340 | CLANG_ENABLE_OBJC_WEAK = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 360 | CLANG_WARN_UNREACHABLE_CODE = YES; 361 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 362 | COPY_PHASE_STRIP = NO; 363 | CURRENT_PROJECT_VERSION = 1; 364 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 365 | ENABLE_NS_ASSERTIONS = NO; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | GCC_C_LANGUAGE_STANDARD = gnu11; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 370 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 371 | GCC_WARN_UNDECLARED_SELECTOR = YES; 372 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 373 | GCC_WARN_UNUSED_FUNCTION = YES; 374 | GCC_WARN_UNUSED_VARIABLE = YES; 375 | MTL_ENABLE_DEBUG_INFO = NO; 376 | MTL_FAST_MATH = YES; 377 | SDKROOT = watchos; 378 | SWIFT_COMPILATION_MODE = wholemodule; 379 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 380 | VALIDATE_PRODUCT = YES; 381 | VERSIONING_SYSTEM = "apple-generic"; 382 | VERSION_INFO_PREFIX = ""; 383 | WATCHOS_DEPLOYMENT_TARGET = 6.1; 384 | }; 385 | name = Release; 386 | }; 387 | 03A20E7A23D577BF007F93F5 /* Debug */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | APPLICATION_EXTENSION_API_ONLY = YES; 391 | CODE_SIGN_STYLE = Automatic; 392 | DEFINES_MODULE = YES; 393 | DEVELOPMENT_TEAM = Q5C99V536K; 394 | DYLIB_COMPATIBILITY_VERSION = 1; 395 | DYLIB_CURRENT_VERSION = 1; 396 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 397 | INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; 398 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 399 | LD_RUNPATH_SEARCH_PATHS = ( 400 | "$(inherited)", 401 | "@executable_path/Frameworks", 402 | "@loader_path/Frameworks", 403 | ); 404 | MARKETING_VERSION = 1.4.0; 405 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.SwiftOSC; 406 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 407 | SKIP_INSTALL = YES; 408 | SWIFT_VERSION = 5.0; 409 | TARGETED_DEVICE_FAMILY = 4; 410 | WATCHOS_DEPLOYMENT_TARGET = 4.3; 411 | }; 412 | name = Debug; 413 | }; 414 | 03A20E7B23D577BF007F93F5 /* Release */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | APPLICATION_EXTENSION_API_ONLY = YES; 418 | CODE_SIGN_STYLE = Automatic; 419 | DEFINES_MODULE = YES; 420 | DEVELOPMENT_TEAM = Q5C99V536K; 421 | DYLIB_COMPATIBILITY_VERSION = 1; 422 | DYLIB_CURRENT_VERSION = 1; 423 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 424 | INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; 425 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 426 | LD_RUNPATH_SEARCH_PATHS = ( 427 | "$(inherited)", 428 | "@executable_path/Frameworks", 429 | "@loader_path/Frameworks", 430 | ); 431 | MARKETING_VERSION = 1.4.0; 432 | PRODUCT_BUNDLE_IDENTIFIER = audio.existential.SwiftOSC; 433 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 434 | SKIP_INSTALL = YES; 435 | SWIFT_VERSION = 5.0; 436 | TARGETED_DEVICE_FAMILY = 4; 437 | WATCHOS_DEPLOYMENT_TARGET = 4.3; 438 | }; 439 | name = Release; 440 | }; 441 | /* End XCBuildConfiguration section */ 442 | 443 | /* Begin XCConfigurationList section */ 444 | 032E50E623D5754D007F03FB /* Build configuration list for PBXProject "watchOS" */ = { 445 | isa = XCConfigurationList; 446 | buildConfigurations = ( 447 | 032E50F223D5754D007F03FB /* Debug */, 448 | 032E50F323D5754D007F03FB /* Release */, 449 | ); 450 | defaultConfigurationIsVisible = 0; 451 | defaultConfigurationName = Release; 452 | }; 453 | 03A20E7923D577BF007F93F5 /* Build configuration list for PBXNativeTarget "SwiftOSC" */ = { 454 | isa = XCConfigurationList; 455 | buildConfigurations = ( 456 | 03A20E7A23D577BF007F93F5 /* Debug */, 457 | 03A20E7B23D577BF007F93F5 /* Release */, 458 | ); 459 | defaultConfigurationIsVisible = 0; 460 | defaultConfigurationName = Release; 461 | }; 462 | /* End XCConfigurationList section */ 463 | }; 464 | rootObject = 032E50E323D5754D007F03FB /* Project object */; 465 | } 466 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Devin Roth (devin@devinrothmusic.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Playgrounds.playground/Pages/Addresses.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import Foundation 4 | import SwiftOSC 5 | 6 | 7 | 8 | var address = OSCAddress("/1") 9 | var addressPattern = OSCAddressPattern("/?") 10 | 11 | 12 | addressPattern.matches(address) 13 | 14 | 15 | //: [Next](@next) 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Playgrounds.playground/Pages/Quick Start.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import PlaygroundSupport 3 | /*: 4 | 5 | # SwiftOSC 6 | A simple OSC Client and Server written in Swift. 7 | 8 | */ 9 | //: ## Quick Start - Server 10 | //: ### Step 1 11 | //: Import SwiftOSC 12 | import SwiftOSC 13 | 14 | //: ### Step 2 15 | //: Create Server 16 | var server = OSCServer(address: "", port: 9000) 17 | 18 | //: ### Step 3 19 | //: Start Server 20 | server.start() 21 | 22 | //: ### Step 4 23 | //: Setup server delegate 24 | class OSCHandler: OSCServerDelegate { 25 | 26 | func didReceive(_ message: OSCMessage){ 27 | print(message) 28 | } 29 | } 30 | server.delegate = OSCHandler() 31 | 32 | //: ## Quick Start - Client 33 | //: ### Step 1 34 | //: Import SwiftOSC 35 | import SwiftOSC 36 | 37 | //: ### Step 2 38 | //: Create client 39 | var client = OSCClient(address: "localhost", port: 9000) 40 | 41 | //: ### Step 3 42 | //: Create a message 43 | var message = OSCMessage(OSCAddressPattern("/test"), 110, 5.0, "Hello World", Blob(), true, false, nil, impulse, Timetag(1)) 44 | 45 | //: Create a bundle 46 | // If the server fully supports timetags, like SwiftOSC, the bundle will be delivered at the correct time. 47 | var bundle = OSCBundle(Timetag(secondsSinceNow: 5.0), message) 48 | 49 | //: ### Step 4 50 | //: Send message 51 | client.send(message) 52 | //: Send message 53 | client.send(bundle) 54 | 55 | //:Keeps playground running in order to send and receive OSC Data 56 | PlaygroundPage.current.needsIndefiniteExecution = true 57 | 58 | -------------------------------------------------------------------------------- /Playgrounds.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftOSC v1.4 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/SwiftOSC.svg?style=flat)](http://cocoapods.org/pods/SwiftOSC) 4 | [![License](https://img.shields.io/cocoapods/l/SwiftOSC.svg?style=flat)](https://github.com/devinroth/SwiftOSC/blob/master/LICENSE) 5 | [![Platform](https://img.shields.io/cocoapods/p/SwiftOSC.svg?style=flat)](http://cocoapods.org/pods/SwiftOSC) 6 | 7 | SwiftOSC is a Swift Open Sound Control (OSC) 1.1 client and server framework. 8 | 9 | 10 | *If you are using SwiftOSC in a project, let me know. I would love to make a list of projects using SwiftOSC.* 11 | 12 | ## Table of Contents 13 | - [Installation](#installation) 14 | - [Quick Start](#quick-start) 15 | - [Projects Using SwiftOSC](#projects-using-swiftosc) 16 | 17 | 18 | ## Installation 19 | 20 | ``` 21 | pod 'SwiftOSC', '~> 1.4' 22 | ``` 23 | 24 | OR 25 | 26 | ### Step 1 27 | 28 | Clone or download repository from Github. 29 | 30 | ### Step 2 31 | 32 | Open SwiftOSC.xcworkspace and build SwiftOSC frameworks. 33 | 34 | ### Step 3 35 | 36 | Embed SwiftOSC into project. 37 | 38 | 39 | 40 | ## Quick Start 41 | ### OSC Server 42 | #### Step 1 43 | Import SwiftOSC framework into your project 44 | ```swift 45 | import SwiftOSC 46 | ``` 47 | #### Step 2 48 | Create Server 49 | ```swift 50 | var server = OSCServer(address: "", port: 8080) 51 | ``` 52 | #### Step 3 53 | Start server 54 | ``` 55 | server.start() 56 | ``` 57 | 58 | #### Step 4 59 | Setup server delegate to handle incoming OSC Data 60 | ```swift 61 | class OSCHandler: OSCServerDelegate { 62 | 63 | func didReceive(_ message: OSCMessage){ 64 | if let integer = message.arguments[0] as? Int { 65 | print("Received int \(integer)") 66 | } else { 67 | print(message) 68 | } 69 | } 70 | } 71 | server.delegate = OSCHandler() 72 | ``` 73 | ### OSC Client 74 | #### Step 1 75 | Import SwiftOSC framework into your project 76 | ```swift 77 | import SwiftOSC 78 | ``` 79 | #### Step 2 80 | Create client 81 | ```swift 82 | var client = OSCClient(address: "localhost", port: 8080) 83 | ``` 84 | #### Step 3 85 | Create a message 86 | ```swift 87 | var message = OSCMessage( 88 | OSCAddressPattern("/"), 89 | 100, 90 | 5.0, 91 | "Hello World", 92 | Blob(), 93 | true, 94 | false, 95 | nil, 96 | impulse, 97 | Timetag(1) 98 | ) 99 | ``` 100 | Create a bundle 101 | ```swift 102 | var bundle = OSCBundle(Timetag(secondsSinceNow: 5.0), message) 103 | ``` 104 | 105 | #### Step 4 106 | Send message 107 | ```swift 108 | client.send(message) 109 | ``` 110 | Send bundle 111 | ```swift 112 | // If the server fully supports timetags, like SwiftOSC, the bundle will be delivered at the correct time. 113 | client.send(bundle) 114 | ``` 115 | 116 | ## Projects Using SwiftOSC 117 | 118 | 119 | For additional information on Open Sound Control visit http://opensoundcontrol.org/. 120 | -------------------------------------------------------------------------------- /SwiftOSC.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'SwiftOSC' 3 | s.version = '1.4.0' 4 | s.summary = 'SwiftOSC is an Open Sound Control client and server framework written in Swift. ' 5 | 6 | s.description = <<-DESC 7 | SwiftOSC is an Open Sound Control client and server framework written in Swift. SwiftOSC impliments all the functionality of the OSC 1.0 specifications (http://opensoundcontrol.org/spec-1_0) and is also exteneded to include the features of OSC 1.1 (https://hangar.org/webnou/wp-content/uploads/2012/01/Nime09OSCfinal.pdf). 8 | DESC 9 | 10 | s.homepage = 'https://github.com/ExistentialAudio/SwiftOSC' 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = { 'Devin Roth' => 'devin@devinrothmusic.com' } 13 | s.source = { :git => 'https://github.com/ExistentialAudio/SwiftOSC.git', :tag => s.version.to_s } 14 | 15 | s.swift_version = '5.0' 16 | s.ios.deployment_target = '9.0' 17 | s.macos.deployment_target = '10.10' 18 | s.watchos.deployment_target = '4.3' 19 | s.tvos.deployment_target = '12.1' 20 | 21 | s.ios.source_files = "Framework/iOS/iOS}" , "Framework/iOS/**/*.{c,h,m,swift}", "Framework/SwiftOSC/**/*.{c,h,m,swift}" 22 | s.macos.source_files = "Framework/macOS/macOS","Framework/macOS/**/*.{c,h,m,swift}", "Framework/SwiftOSC/**/*.{c,h,m,swift}" 23 | s.watchos.source_files = "Framework/watchos/watchos","Framework/watchos/**/*.{c,h,m,swift}", "Framework/SwiftOSC/**/*.{c,h,m,swift}" 24 | s.tvos.source_files = "Framework/tvos/tvos","Framework/tvos/**/*.{c,h,m,swift}", "Framework/SwiftOSC/**/*.{c,h,m,swift}" 25 | 26 | end 27 | -------------------------------------------------------------------------------- /SwiftOSC.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 22 | 25 | 27 | 28 | 29 | 32 | 34 | 35 | 36 | 37 | 40 | 42 | 43 | 45 | 46 | 48 | 49 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /SwiftOSC.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------