├── .gitignore ├── .swiftpm └── xcode │ ├── package.xcworkspace │ └── contents.xcworkspacedata │ └── xcshareddata │ └── xcschemes │ └── Scaledrone.xcscheme ├── .travis.yml ├── Cartfile ├── Cartfile.resolved ├── Example ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── Scaledrone.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Scaledrone.xcscheme │ ├── Starscream │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── Starscream │ │ │ ├── Compression.swift │ │ │ ├── SSLClientCertificate.swift │ │ │ ├── SSLSecurity.swift │ │ │ └── WebSocket.swift │ └── Target Support Files │ │ ├── Pods-Scaledrone_Tests │ │ ├── Pods-Scaledrone_Tests-Info.plist │ │ ├── Pods-Scaledrone_Tests-acknowledgements.markdown │ │ ├── Pods-Scaledrone_Tests-acknowledgements.plist │ │ ├── Pods-Scaledrone_Tests-dummy.m │ │ ├── Pods-Scaledrone_Tests-frameworks.sh │ │ ├── Pods-Scaledrone_Tests-umbrella.h │ │ ├── Pods-Scaledrone_Tests.debug.xcconfig │ │ ├── Pods-Scaledrone_Tests.modulemap │ │ └── Pods-Scaledrone_Tests.release.xcconfig │ │ ├── Scaledrone │ │ ├── Scaledrone-Info.plist │ │ ├── Scaledrone-dummy.m │ │ ├── Scaledrone-prefix.pch │ │ ├── Scaledrone-umbrella.h │ │ ├── Scaledrone.modulemap │ │ └── Scaledrone.xcconfig │ │ └── Starscream │ │ ├── Starscream-Info.plist │ │ ├── Starscream-dummy.m │ │ ├── Starscream-prefix.pch │ │ ├── Starscream-umbrella.h │ │ ├── Starscream.modulemap │ │ └── Starscream.xcconfig ├── Scaledrone.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Scaledrone-Example.xcscheme ├── Scaledrone.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── Package.resolved ├── Package.swift ├── README.md ├── Scaledrone.podspec ├── Sources └── Scaledrone │ ├── Assets │ └── .gitkeep │ └── Classes │ ├── .gitkeep │ └── Scaledrone.swift └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.toptal.com/developers/gitignore/api/macos,xcode,swift 2 | # Edit at https://www.toptal.com/developers/gitignore?templates=macos,xcode,swift 3 | 4 | ### macOS ### 5 | # General 6 | .DS_Store 7 | .AppleDouble 8 | .LSOverride 9 | 10 | # Icon must end with two \r 11 | Icon 12 | 13 | 14 | # Thumbnails 15 | ._* 16 | 17 | # Files that might appear in the root of a volume 18 | .DocumentRevisions-V100 19 | .fseventsd 20 | .Spotlight-V100 21 | .TemporaryItems 22 | .Trashes 23 | .VolumeIcon.icns 24 | .com.apple.timemachine.donotpresent 25 | 26 | # Directories potentially created on remote AFP share 27 | .AppleDB 28 | .AppleDesktop 29 | Network Trash Folder 30 | Temporary Items 31 | .apdisk 32 | 33 | ### Swift ### 34 | # Xcode 35 | # 36 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 37 | 38 | ## User settings 39 | xcuserdata/ 40 | 41 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 42 | *.xcscmblueprint 43 | *.xccheckout 44 | 45 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 46 | build/ 47 | DerivedData/ 48 | *.moved-aside 49 | *.pbxuser 50 | !default.pbxuser 51 | *.mode1v3 52 | !default.mode1v3 53 | *.mode2v3 54 | !default.mode2v3 55 | *.perspectivev3 56 | !default.perspectivev3 57 | 58 | ## Obj-C/Swift specific 59 | *.hmap 60 | 61 | ## App packaging 62 | *.ipa 63 | *.dSYM.zip 64 | *.dSYM 65 | 66 | ## Playgrounds 67 | timeline.xctimeline 68 | playground.xcworkspace 69 | 70 | # Swift Package Manager 71 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 72 | # Packages/ 73 | # Package.pins 74 | # Package.resolved 75 | # *.xcodeproj 76 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 77 | # hence it is not needed unless you have added a package configuration file to your project 78 | # .swiftpm 79 | 80 | .build/ 81 | 82 | # CocoaPods 83 | # We recommend against adding the Pods directory to your .gitignore. However 84 | # you should judge for yourself, the pros and cons are mentioned at: 85 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 86 | # Pods/ 87 | # Add this line if you want to avoid checking in source code from the Xcode workspace 88 | # *.xcworkspace 89 | 90 | # Carthage 91 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 92 | # Carthage/Checkouts 93 | 94 | Carthage/Build/ 95 | 96 | # Accio dependency management 97 | Dependencies/ 98 | .accio/ 99 | 100 | # fastlane 101 | # It is recommended to not store the screenshots in the git repo. 102 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 103 | # For more information about the recommended setup visit: 104 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 105 | 106 | fastlane/report.xml 107 | fastlane/Preview.html 108 | fastlane/screenshots/**/*.png 109 | fastlane/test_output 110 | 111 | # Code Injection 112 | # After new code Injection tools there's a generated folder /iOSInjectionProject 113 | # https://github.com/johnno1962/injectionforxcode 114 | 115 | iOSInjectionProject/ 116 | 117 | ### Xcode ### 118 | # Xcode 119 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 120 | 121 | 122 | 123 | 124 | ## Gcc Patch 125 | /*.gcno 126 | 127 | ### Xcode Patch ### 128 | *.xcodeproj/* 129 | !*.xcodeproj/project.pbxproj 130 | !*.xcodeproj/xcshareddata/ 131 | !*.xcworkspace/contents.xcworkspacedata 132 | **/xcshareddata/WorkspaceSettings.xcsettings 133 | 134 | # End of https://www.toptal.com/developers/gitignore/api/macos,xcode,swift -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.swiftpm/xcode/xcshareddata/xcschemes/Scaledrone.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Scaledrone.xcworkspace -scheme Scaledrone-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "daltoniam/Starscream" ~> 3.1.1 2 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "daltoniam/Starscream" "3.1.1" 2 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | target 'Scaledrone_Tests' do 3 | pod 'Scaledrone', :path => '../' 4 | 5 | 6 | end 7 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Scaledrone (0.5.0): 3 | - Starscream (~> 3.1.0) 4 | - Starscream (3.1.1) 5 | 6 | DEPENDENCIES: 7 | - Scaledrone (from `../`) 8 | 9 | SPEC REPOS: 10 | trunk: 11 | - Starscream 12 | 13 | EXTERNAL SOURCES: 14 | Scaledrone: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | Scaledrone: 0def0ac1d13dddd8607ebff9e8d64ea9ea59ef91 19 | Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0 20 | 21 | PODFILE CHECKSUM: ee128188b1733c7d7c4061b3f79ae4ff03979fed 22 | 23 | COCOAPODS: 1.8.4 24 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/Scaledrone.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Scaledrone", 3 | "version": "0.5.0", 4 | "summary": "Scaledrone Swift Client", 5 | "homepage": "https://github.com/scaledrone/scaledrone-swift", 6 | "license": "Apache-2.0", 7 | "authors": { 8 | "Scaledrone": "info@scaledrone.com" 9 | }, 10 | "requires_arc": true, 11 | "source": { 12 | "git": "https://github.com/scaledrone/Scaledrone-Swift.git", 13 | "tag": "0.5.0" 14 | }, 15 | "swift_versions": "5.0", 16 | "platforms": { 17 | "ios": "8.0", 18 | "osx": "10.10", 19 | "tvos": "9.0" 20 | }, 21 | "source_files": "Scaledrone/Classes/**/*", 22 | "dependencies": { 23 | "Starscream": [ 24 | "~> 3.1.0" 25 | ] 26 | }, 27 | "swift_version": "5.0" 28 | } 29 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Scaledrone (0.5.0): 3 | - Starscream (~> 3.1.0) 4 | - Starscream (3.1.1) 5 | 6 | DEPENDENCIES: 7 | - Scaledrone (from `../`) 8 | 9 | SPEC REPOS: 10 | trunk: 11 | - Starscream 12 | 13 | EXTERNAL SOURCES: 14 | Scaledrone: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | Scaledrone: 0def0ac1d13dddd8607ebff9e8d64ea9ea59ef91 19 | Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0 20 | 21 | PODFILE CHECKSUM: ee128188b1733c7d7c4061b3f79ae4ff03979fed 22 | 23 | COCOAPODS: 1.8.4 24 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 056A7AD9939C9263191170551E567E5A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBB895F616DD1C4C7C1587261E4EBE5D /* Foundation.framework */; }; 11 | 1B3CE2DDA25D9EFC5E23084A6D9BE847 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B9AA0D25BD7BD2C495D776FC8B846DC /* WebSocket.swift */; }; 12 | 4790612973EFDA4DE8EA560C4ADFA361 /* Scaledrone-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EBE0B25B1B37DF70D3280F30CF77FB95 /* Scaledrone-dummy.m */; }; 13 | 47B187D38BDA1B4B78564044C1071145 /* Scaledrone-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B063FA1A893CF2B05582DA6A76EC4A7 /* Scaledrone-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 5654175BA425A74DC0FE5269B30DB848 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBB895F616DD1C4C7C1587261E4EBE5D /* Foundation.framework */; }; 15 | 60C0D021A8A7527FE4668C407400A226 /* Starscream-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FB5DEA2CF4E44263A62924A53A069E /* Starscream-dummy.m */; }; 16 | 6E17639A6902FB3A63336005DDD6D69F /* SSLClientCertificate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E48F7922C44A3645750BD18CCCF671B0 /* SSLClientCertificate.swift */; }; 17 | 87E93CCBF8A49E25A5B76BDA26249D14 /* Pods-Scaledrone_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 958E3D2AC6CC1D53964AEFDEA9E00F40 /* Pods-Scaledrone_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | 953CCC4DED0381665AE1272CFD774506 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3319CBE6BF16B5B2366BDE834B663B5E /* Starscream.framework */; }; 19 | 97C557D49A3DCB45B562B949565D06AD /* Starscream-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F7A2315DC555AEF64DA8D50B51DA7F1 /* Starscream-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 20 | D079C935CA91E7929E92303DF56BCBF6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBB895F616DD1C4C7C1587261E4EBE5D /* Foundation.framework */; }; 21 | D2F4851BCC2CF9F869847F780B58C8F0 /* Pods-Scaledrone_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5883D3CFC0807FDDA033050B2A1D7E08 /* Pods-Scaledrone_Tests-dummy.m */; }; 22 | D77FFE3EB36C35D71E65E74CB191A879 /* Scaledrone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06D9ED5246C9C80554DC3313FF2BA807 /* Scaledrone.swift */; }; 23 | E6630F055BB05FCCFC3E255A55CF9921 /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA2E057170ECA65E2F05A5B595252784 /* Compression.swift */; }; 24 | FC48CC0900F50CE469701B6304BF1F25 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = D59F921BA6434A655F9C82F0F81BE47A /* SSLSecurity.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | CB06C9B1911637B4481F96AE7C4B8A5B /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 9B78EE4AF6AE03E79D88886319853FF7; 33 | remoteInfo = Starscream; 34 | }; 35 | ECD082FB0E5510F4E7FB1B6AC48F9F03 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 9B78EE4AF6AE03E79D88886319853FF7; 40 | remoteInfo = Starscream; 41 | }; 42 | F6BF6AD6D796B13E852599E1449EEA5C /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 45 | proxyType = 1; 46 | remoteGlobalIDString = 4C708E114F6DC408DFC0C7AEB8AE8C8D; 47 | remoteInfo = Scaledrone; 48 | }; 49 | /* End PBXContainerItemProxy section */ 50 | 51 | /* Begin PBXFileReference section */ 52 | 01FB5DEA2CF4E44263A62924A53A069E /* Starscream-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Starscream-dummy.m"; sourceTree = ""; }; 53 | 06D9ED5246C9C80554DC3313FF2BA807 /* Scaledrone.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scaledrone.swift; path = Scaledrone/Classes/Scaledrone.swift; sourceTree = ""; }; 54 | 0B063FA1A893CF2B05582DA6A76EC4A7 /* Scaledrone-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Scaledrone-umbrella.h"; sourceTree = ""; }; 55 | 0C58C4033EC137A147347D8D3085F5E1 /* Scaledrone.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Scaledrone.modulemap; sourceTree = ""; }; 56 | 0E1F8BAF7508DAED0BC5284015241EDB /* Scaledrone-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Scaledrone-prefix.pch"; sourceTree = ""; }; 57 | 1EE6A2E7BD09F2A6EAD45DD407A1FD5E /* Pods-Scaledrone_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Scaledrone_Tests-frameworks.sh"; sourceTree = ""; }; 58 | 2EF130DB1D020533A3D8DDE0CB985BD3 /* Starscream.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Starscream.modulemap; sourceTree = ""; }; 59 | 3319CBE6BF16B5B2366BDE834B663B5E /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 3A686A6A6A44C9E456C21FADD09B4175 /* Pods-Scaledrone_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Scaledrone_Tests-acknowledgements.markdown"; sourceTree = ""; }; 61 | 3B9AA0D25BD7BD2C495D776FC8B846DC /* WebSocket.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WebSocket.swift; path = Sources/Starscream/WebSocket.swift; sourceTree = ""; }; 62 | 3DCEA6169B33E34F1E6E7128F65DC025 /* Starscream-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Starscream-prefix.pch"; sourceTree = ""; }; 63 | 44E219F4030CE498CF0D43505F1973F7 /* Starscream-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Starscream-Info.plist"; sourceTree = ""; }; 64 | 49BF4E85E075A3A0A22D3D3428E64079 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 65 | 4FF1B443D52FD856F2F4C99755905B56 /* Pods-Scaledrone_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Scaledrone_Tests-acknowledgements.plist"; sourceTree = ""; }; 66 | 5883D3CFC0807FDDA033050B2A1D7E08 /* Pods-Scaledrone_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Scaledrone_Tests-dummy.m"; sourceTree = ""; }; 67 | 64D5E391E11E3D9A03B0ACF80CFBA3B2 /* Starscream.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Starscream.xcconfig; sourceTree = ""; }; 68 | 7F7A2315DC555AEF64DA8D50B51DA7F1 /* Starscream-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Starscream-umbrella.h"; sourceTree = ""; }; 69 | 891B2270823847ED23F2ECFC28F935EC /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 93ECBAC53265D242797E437DD451141F /* Pods_Scaledrone_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Scaledrone_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | 958E3D2AC6CC1D53964AEFDEA9E00F40 /* Pods-Scaledrone_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Scaledrone_Tests-umbrella.h"; sourceTree = ""; }; 72 | 98A6F91A14B63CD78BDB19AAB19E653A /* Pods-Scaledrone_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Scaledrone_Tests.release.xcconfig"; sourceTree = ""; }; 73 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 74 | A4F75492F88256D9D7388E5F0CDEEF7C /* Scaledrone-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Scaledrone-Info.plist"; sourceTree = ""; }; 75 | BA2E057170ECA65E2F05A5B595252784 /* Compression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Compression.swift; path = Sources/Starscream/Compression.swift; sourceTree = ""; }; 76 | CC82041EE8B72850779B69487F3CAAD8 /* Pods-Scaledrone_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Scaledrone_Tests-Info.plist"; sourceTree = ""; }; 77 | D59F921BA6434A655F9C82F0F81BE47A /* SSLSecurity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SSLSecurity.swift; path = Sources/Starscream/SSLSecurity.swift; sourceTree = ""; }; 78 | D7A6A6DD461BAF9339B7228B77CC7058 /* Pods-Scaledrone_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Scaledrone_Tests.modulemap"; sourceTree = ""; }; 79 | DBB895F616DD1C4C7C1587261E4EBE5D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 80 | DDD7F62DF4FC0BC5D3F53C55190A5B32 /* Scaledrone.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Scaledrone.xcconfig; sourceTree = ""; }; 81 | E18301982CA997E9BD47701CB50C51A1 /* Scaledrone.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = Scaledrone.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 82 | E48F7922C44A3645750BD18CCCF671B0 /* SSLClientCertificate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SSLClientCertificate.swift; path = Sources/Starscream/SSLClientCertificate.swift; sourceTree = ""; }; 83 | E532B74FDAA9ADABCFD8997679AC5E1E /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 84 | E6D71E3209B1632BA8CD23567761FB88 /* Pods-Scaledrone_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Scaledrone_Tests.debug.xcconfig"; sourceTree = ""; }; 85 | EBE0B25B1B37DF70D3280F30CF77FB95 /* Scaledrone-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Scaledrone-dummy.m"; sourceTree = ""; }; 86 | FF49C6976D05624BF6B6B35F11BB1802 /* Scaledrone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scaledrone.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 87 | /* End PBXFileReference section */ 88 | 89 | /* Begin PBXFrameworksBuildPhase section */ 90 | 6CA7A021C8E5F52CE5A74FFDE29E1F70 /* Frameworks */ = { 91 | isa = PBXFrameworksBuildPhase; 92 | buildActionMask = 2147483647; 93 | files = ( 94 | 5654175BA425A74DC0FE5269B30DB848 /* Foundation.framework in Frameworks */, 95 | 953CCC4DED0381665AE1272CFD774506 /* Starscream.framework in Frameworks */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | 7068A915D17C336691A5B02E4DF0EF9A /* Frameworks */ = { 100 | isa = PBXFrameworksBuildPhase; 101 | buildActionMask = 2147483647; 102 | files = ( 103 | 056A7AD9939C9263191170551E567E5A /* Foundation.framework in Frameworks */, 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | 7C285232CC1C1951B29282E89C8B2833 /* Frameworks */ = { 108 | isa = PBXFrameworksBuildPhase; 109 | buildActionMask = 2147483647; 110 | files = ( 111 | D079C935CA91E7929E92303DF56BCBF6 /* Foundation.framework in Frameworks */, 112 | ); 113 | runOnlyForDeploymentPostprocessing = 0; 114 | }; 115 | /* End PBXFrameworksBuildPhase section */ 116 | 117 | /* Begin PBXGroup section */ 118 | 295EE9489C123EC794D0098F95A28E63 /* Pods-Scaledrone_Tests */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | D7A6A6DD461BAF9339B7228B77CC7058 /* Pods-Scaledrone_Tests.modulemap */, 122 | 3A686A6A6A44C9E456C21FADD09B4175 /* Pods-Scaledrone_Tests-acknowledgements.markdown */, 123 | 4FF1B443D52FD856F2F4C99755905B56 /* Pods-Scaledrone_Tests-acknowledgements.plist */, 124 | 5883D3CFC0807FDDA033050B2A1D7E08 /* Pods-Scaledrone_Tests-dummy.m */, 125 | 1EE6A2E7BD09F2A6EAD45DD407A1FD5E /* Pods-Scaledrone_Tests-frameworks.sh */, 126 | CC82041EE8B72850779B69487F3CAAD8 /* Pods-Scaledrone_Tests-Info.plist */, 127 | 958E3D2AC6CC1D53964AEFDEA9E00F40 /* Pods-Scaledrone_Tests-umbrella.h */, 128 | E6D71E3209B1632BA8CD23567761FB88 /* Pods-Scaledrone_Tests.debug.xcconfig */, 129 | 98A6F91A14B63CD78BDB19AAB19E653A /* Pods-Scaledrone_Tests.release.xcconfig */, 130 | ); 131 | name = "Pods-Scaledrone_Tests"; 132 | path = "Target Support Files/Pods-Scaledrone_Tests"; 133 | sourceTree = ""; 134 | }; 135 | 457A97EE5958CCFCE51870EAA8B8CB38 /* Development Pods */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 7C3DE0FC75F922AAE4F36D6519AC3992 /* Scaledrone */, 139 | ); 140 | name = "Development Pods"; 141 | sourceTree = ""; 142 | }; 143 | 52D9E5BC047A8B5E3FF5816E51288517 /* Targets Support Files */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 295EE9489C123EC794D0098F95A28E63 /* Pods-Scaledrone_Tests */, 147 | ); 148 | name = "Targets Support Files"; 149 | sourceTree = ""; 150 | }; 151 | 74B354FEE42AB825E96690DF7F109CC3 /* Starscream */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | BA2E057170ECA65E2F05A5B595252784 /* Compression.swift */, 155 | E48F7922C44A3645750BD18CCCF671B0 /* SSLClientCertificate.swift */, 156 | D59F921BA6434A655F9C82F0F81BE47A /* SSLSecurity.swift */, 157 | 3B9AA0D25BD7BD2C495D776FC8B846DC /* WebSocket.swift */, 158 | E1C262BC966EEAEBD1297175B34EF373 /* Support Files */, 159 | ); 160 | path = Starscream; 161 | sourceTree = ""; 162 | }; 163 | 7C3DE0FC75F922AAE4F36D6519AC3992 /* Scaledrone */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 06D9ED5246C9C80554DC3313FF2BA807 /* Scaledrone.swift */, 167 | 99622147B6BEAEE3A2808A3823CA0A9E /* Pod */, 168 | FB6F51611E46D8EA8C6C83F72BEC833F /* Support Files */, 169 | ); 170 | name = Scaledrone; 171 | path = ../..; 172 | sourceTree = ""; 173 | }; 174 | 97C5288770E1953BDB40F8F908E40D46 /* Pods */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | 74B354FEE42AB825E96690DF7F109CC3 /* Starscream */, 178 | ); 179 | name = Pods; 180 | sourceTree = ""; 181 | }; 182 | 99622147B6BEAEE3A2808A3823CA0A9E /* Pod */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 49BF4E85E075A3A0A22D3D3428E64079 /* LICENSE */, 186 | E532B74FDAA9ADABCFD8997679AC5E1E /* README.md */, 187 | E18301982CA997E9BD47701CB50C51A1 /* Scaledrone.podspec */, 188 | ); 189 | name = Pod; 190 | sourceTree = ""; 191 | }; 192 | BB32CB07C67ED4E3253A1ABF76C37300 /* Products */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | 93ECBAC53265D242797E437DD451141F /* Pods_Scaledrone_Tests.framework */, 196 | FF49C6976D05624BF6B6B35F11BB1802 /* Scaledrone.framework */, 197 | 891B2270823847ED23F2ECFC28F935EC /* Starscream.framework */, 198 | ); 199 | name = Products; 200 | sourceTree = ""; 201 | }; 202 | CD272A03C5BA2A49B245F2735E358B7D /* Frameworks */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | 3319CBE6BF16B5B2366BDE834B663B5E /* Starscream.framework */, 206 | DB2C61061EC170240411C29EF6DD7C9D /* iOS */, 207 | ); 208 | name = Frameworks; 209 | sourceTree = ""; 210 | }; 211 | CF1408CF629C7361332E53B88F7BD30C = { 212 | isa = PBXGroup; 213 | children = ( 214 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 215 | 457A97EE5958CCFCE51870EAA8B8CB38 /* Development Pods */, 216 | CD272A03C5BA2A49B245F2735E358B7D /* Frameworks */, 217 | 97C5288770E1953BDB40F8F908E40D46 /* Pods */, 218 | BB32CB07C67ED4E3253A1ABF76C37300 /* Products */, 219 | 52D9E5BC047A8B5E3FF5816E51288517 /* Targets Support Files */, 220 | ); 221 | sourceTree = ""; 222 | }; 223 | DB2C61061EC170240411C29EF6DD7C9D /* iOS */ = { 224 | isa = PBXGroup; 225 | children = ( 226 | DBB895F616DD1C4C7C1587261E4EBE5D /* Foundation.framework */, 227 | ); 228 | name = iOS; 229 | sourceTree = ""; 230 | }; 231 | E1C262BC966EEAEBD1297175B34EF373 /* Support Files */ = { 232 | isa = PBXGroup; 233 | children = ( 234 | 2EF130DB1D020533A3D8DDE0CB985BD3 /* Starscream.modulemap */, 235 | 64D5E391E11E3D9A03B0ACF80CFBA3B2 /* Starscream.xcconfig */, 236 | 01FB5DEA2CF4E44263A62924A53A069E /* Starscream-dummy.m */, 237 | 44E219F4030CE498CF0D43505F1973F7 /* Starscream-Info.plist */, 238 | 3DCEA6169B33E34F1E6E7128F65DC025 /* Starscream-prefix.pch */, 239 | 7F7A2315DC555AEF64DA8D50B51DA7F1 /* Starscream-umbrella.h */, 240 | ); 241 | name = "Support Files"; 242 | path = "../Target Support Files/Starscream"; 243 | sourceTree = ""; 244 | }; 245 | FB6F51611E46D8EA8C6C83F72BEC833F /* Support Files */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 0C58C4033EC137A147347D8D3085F5E1 /* Scaledrone.modulemap */, 249 | DDD7F62DF4FC0BC5D3F53C55190A5B32 /* Scaledrone.xcconfig */, 250 | EBE0B25B1B37DF70D3280F30CF77FB95 /* Scaledrone-dummy.m */, 251 | A4F75492F88256D9D7388E5F0CDEEF7C /* Scaledrone-Info.plist */, 252 | 0E1F8BAF7508DAED0BC5284015241EDB /* Scaledrone-prefix.pch */, 253 | 0B063FA1A893CF2B05582DA6A76EC4A7 /* Scaledrone-umbrella.h */, 254 | ); 255 | name = "Support Files"; 256 | path = "Example/Pods/Target Support Files/Scaledrone"; 257 | sourceTree = ""; 258 | }; 259 | /* End PBXGroup section */ 260 | 261 | /* Begin PBXHeadersBuildPhase section */ 262 | 0A8B6FEE44CC9D57A93EC38AC6F18D55 /* Headers */ = { 263 | isa = PBXHeadersBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | 87E93CCBF8A49E25A5B76BDA26249D14 /* Pods-Scaledrone_Tests-umbrella.h in Headers */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | 0E927EA57AE33680783FED7B86941C37 /* Headers */ = { 271 | isa = PBXHeadersBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | 47B187D38BDA1B4B78564044C1071145 /* Scaledrone-umbrella.h in Headers */, 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | 22E4441D19E5D017077C02B3803DC9AC /* Headers */ = { 279 | isa = PBXHeadersBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | 97C557D49A3DCB45B562B949565D06AD /* Starscream-umbrella.h in Headers */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXHeadersBuildPhase section */ 287 | 288 | /* Begin PBXNativeTarget section */ 289 | 4C708E114F6DC408DFC0C7AEB8AE8C8D /* Scaledrone */ = { 290 | isa = PBXNativeTarget; 291 | buildConfigurationList = 44A351AF7C4869CA3357185E16585475 /* Build configuration list for PBXNativeTarget "Scaledrone" */; 292 | buildPhases = ( 293 | 0E927EA57AE33680783FED7B86941C37 /* Headers */, 294 | 6CFB98203879E61372F6C51F3FE8338A /* Sources */, 295 | 6CA7A021C8E5F52CE5A74FFDE29E1F70 /* Frameworks */, 296 | 79383A77CD873630FB0F127B4B6B68E1 /* Resources */, 297 | ); 298 | buildRules = ( 299 | ); 300 | dependencies = ( 301 | 4D43BACF61B18349B9D97B0011D0871F /* PBXTargetDependency */, 302 | ); 303 | name = Scaledrone; 304 | productName = Scaledrone; 305 | productReference = FF49C6976D05624BF6B6B35F11BB1802 /* Scaledrone.framework */; 306 | productType = "com.apple.product-type.framework"; 307 | }; 308 | 9B78EE4AF6AE03E79D88886319853FF7 /* Starscream */ = { 309 | isa = PBXNativeTarget; 310 | buildConfigurationList = 3DC8FE5C4010DEF2F9E38EBB177E1D39 /* Build configuration list for PBXNativeTarget "Starscream" */; 311 | buildPhases = ( 312 | 22E4441D19E5D017077C02B3803DC9AC /* Headers */, 313 | 5BC343D5432B76C2595BE1BC56C65E40 /* Sources */, 314 | 7068A915D17C336691A5B02E4DF0EF9A /* Frameworks */, 315 | 13BA59E0EEF2693E413B7B339730A26B /* Resources */, 316 | ); 317 | buildRules = ( 318 | ); 319 | dependencies = ( 320 | ); 321 | name = Starscream; 322 | productName = Starscream; 323 | productReference = 891B2270823847ED23F2ECFC28F935EC /* Starscream.framework */; 324 | productType = "com.apple.product-type.framework"; 325 | }; 326 | A9B7B635578C41702306B404BBA7714F /* Pods-Scaledrone_Tests */ = { 327 | isa = PBXNativeTarget; 328 | buildConfigurationList = CFFED891BC1E306F44F07C45B01FC4EF /* Build configuration list for PBXNativeTarget "Pods-Scaledrone_Tests" */; 329 | buildPhases = ( 330 | 0A8B6FEE44CC9D57A93EC38AC6F18D55 /* Headers */, 331 | 78E3F9D4D9ACF76D21D53B2BDEC11D73 /* Sources */, 332 | 7C285232CC1C1951B29282E89C8B2833 /* Frameworks */, 333 | 5ED4180D6835592A153275E921A3D281 /* Resources */, 334 | ); 335 | buildRules = ( 336 | ); 337 | dependencies = ( 338 | 40572C4DF98E53DAAA7E47DFB3AB85D0 /* PBXTargetDependency */, 339 | F2DEB9996B022FF0E298DC0E1DEB2BC3 /* PBXTargetDependency */, 340 | ); 341 | name = "Pods-Scaledrone_Tests"; 342 | productName = "Pods-Scaledrone_Tests"; 343 | productReference = 93ECBAC53265D242797E437DD451141F /* Pods_Scaledrone_Tests.framework */; 344 | productType = "com.apple.product-type.framework"; 345 | }; 346 | /* End PBXNativeTarget section */ 347 | 348 | /* Begin PBXProject section */ 349 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 350 | isa = PBXProject; 351 | attributes = { 352 | LastSwiftUpdateCheck = 1100; 353 | LastUpgradeCheck = 1100; 354 | }; 355 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 356 | compatibilityVersion = "Xcode 3.2"; 357 | developmentRegion = en; 358 | hasScannedForEncodings = 0; 359 | knownRegions = ( 360 | en, 361 | Base, 362 | ); 363 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 364 | productRefGroup = BB32CB07C67ED4E3253A1ABF76C37300 /* Products */; 365 | projectDirPath = ""; 366 | projectRoot = ""; 367 | targets = ( 368 | A9B7B635578C41702306B404BBA7714F /* Pods-Scaledrone_Tests */, 369 | 4C708E114F6DC408DFC0C7AEB8AE8C8D /* Scaledrone */, 370 | 9B78EE4AF6AE03E79D88886319853FF7 /* Starscream */, 371 | ); 372 | }; 373 | /* End PBXProject section */ 374 | 375 | /* Begin PBXResourcesBuildPhase section */ 376 | 13BA59E0EEF2693E413B7B339730A26B /* Resources */ = { 377 | isa = PBXResourcesBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | ); 381 | runOnlyForDeploymentPostprocessing = 0; 382 | }; 383 | 5ED4180D6835592A153275E921A3D281 /* Resources */ = { 384 | isa = PBXResourcesBuildPhase; 385 | buildActionMask = 2147483647; 386 | files = ( 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | }; 390 | 79383A77CD873630FB0F127B4B6B68E1 /* Resources */ = { 391 | isa = PBXResourcesBuildPhase; 392 | buildActionMask = 2147483647; 393 | files = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | /* End PBXResourcesBuildPhase section */ 398 | 399 | /* Begin PBXSourcesBuildPhase section */ 400 | 5BC343D5432B76C2595BE1BC56C65E40 /* Sources */ = { 401 | isa = PBXSourcesBuildPhase; 402 | buildActionMask = 2147483647; 403 | files = ( 404 | E6630F055BB05FCCFC3E255A55CF9921 /* Compression.swift in Sources */, 405 | 6E17639A6902FB3A63336005DDD6D69F /* SSLClientCertificate.swift in Sources */, 406 | FC48CC0900F50CE469701B6304BF1F25 /* SSLSecurity.swift in Sources */, 407 | 60C0D021A8A7527FE4668C407400A226 /* Starscream-dummy.m in Sources */, 408 | 1B3CE2DDA25D9EFC5E23084A6D9BE847 /* WebSocket.swift in Sources */, 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | }; 412 | 6CFB98203879E61372F6C51F3FE8338A /* Sources */ = { 413 | isa = PBXSourcesBuildPhase; 414 | buildActionMask = 2147483647; 415 | files = ( 416 | 4790612973EFDA4DE8EA560C4ADFA361 /* Scaledrone-dummy.m in Sources */, 417 | D77FFE3EB36C35D71E65E74CB191A879 /* Scaledrone.swift in Sources */, 418 | ); 419 | runOnlyForDeploymentPostprocessing = 0; 420 | }; 421 | 78E3F9D4D9ACF76D21D53B2BDEC11D73 /* Sources */ = { 422 | isa = PBXSourcesBuildPhase; 423 | buildActionMask = 2147483647; 424 | files = ( 425 | D2F4851BCC2CF9F869847F780B58C8F0 /* Pods-Scaledrone_Tests-dummy.m in Sources */, 426 | ); 427 | runOnlyForDeploymentPostprocessing = 0; 428 | }; 429 | /* End PBXSourcesBuildPhase section */ 430 | 431 | /* Begin PBXTargetDependency section */ 432 | 40572C4DF98E53DAAA7E47DFB3AB85D0 /* PBXTargetDependency */ = { 433 | isa = PBXTargetDependency; 434 | name = Scaledrone; 435 | target = 4C708E114F6DC408DFC0C7AEB8AE8C8D /* Scaledrone */; 436 | targetProxy = F6BF6AD6D796B13E852599E1449EEA5C /* PBXContainerItemProxy */; 437 | }; 438 | 4D43BACF61B18349B9D97B0011D0871F /* PBXTargetDependency */ = { 439 | isa = PBXTargetDependency; 440 | name = Starscream; 441 | target = 9B78EE4AF6AE03E79D88886319853FF7 /* Starscream */; 442 | targetProxy = ECD082FB0E5510F4E7FB1B6AC48F9F03 /* PBXContainerItemProxy */; 443 | }; 444 | F2DEB9996B022FF0E298DC0E1DEB2BC3 /* PBXTargetDependency */ = { 445 | isa = PBXTargetDependency; 446 | name = Starscream; 447 | target = 9B78EE4AF6AE03E79D88886319853FF7 /* Starscream */; 448 | targetProxy = CB06C9B1911637B4481F96AE7C4B8A5B /* PBXContainerItemProxy */; 449 | }; 450 | /* End PBXTargetDependency section */ 451 | 452 | /* Begin XCBuildConfiguration section */ 453 | 0AA513E7645615A1B323EB8519E34D2F /* Release */ = { 454 | isa = XCBuildConfiguration; 455 | baseConfigurationReference = 98A6F91A14B63CD78BDB19AAB19E653A /* Pods-Scaledrone_Tests.release.xcconfig */; 456 | buildSettings = { 457 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 458 | CODE_SIGN_IDENTITY = ""; 459 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 460 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 461 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 462 | CURRENT_PROJECT_VERSION = 1; 463 | DEFINES_MODULE = YES; 464 | DYLIB_COMPATIBILITY_VERSION = 1; 465 | DYLIB_CURRENT_VERSION = 1; 466 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 467 | INFOPLIST_FILE = "Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-Info.plist"; 468 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 469 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 470 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 471 | MACH_O_TYPE = staticlib; 472 | MODULEMAP_FILE = "Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests.modulemap"; 473 | OTHER_LDFLAGS = ""; 474 | OTHER_LIBTOOLFLAGS = ""; 475 | PODS_ROOT = "$(SRCROOT)"; 476 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 477 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 478 | SDKROOT = iphoneos; 479 | SKIP_INSTALL = YES; 480 | TARGETED_DEVICE_FAMILY = "1,2"; 481 | VALIDATE_PRODUCT = YES; 482 | VERSIONING_SYSTEM = "apple-generic"; 483 | VERSION_INFO_PREFIX = ""; 484 | }; 485 | name = Release; 486 | }; 487 | 14B56E0506822F6907FE755F320EAA80 /* Release */ = { 488 | isa = XCBuildConfiguration; 489 | baseConfigurationReference = DDD7F62DF4FC0BC5D3F53C55190A5B32 /* Scaledrone.xcconfig */; 490 | buildSettings = { 491 | CODE_SIGN_IDENTITY = ""; 492 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 493 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 494 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 495 | CURRENT_PROJECT_VERSION = 1; 496 | DEFINES_MODULE = YES; 497 | DYLIB_COMPATIBILITY_VERSION = 1; 498 | DYLIB_CURRENT_VERSION = 1; 499 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 500 | GCC_PREFIX_HEADER = "Target Support Files/Scaledrone/Scaledrone-prefix.pch"; 501 | INFOPLIST_FILE = "Target Support Files/Scaledrone/Scaledrone-Info.plist"; 502 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 503 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 505 | MARKETING_VERSION = 0.5.2; 506 | MODULEMAP_FILE = "Target Support Files/Scaledrone/Scaledrone.modulemap"; 507 | PRODUCT_MODULE_NAME = Scaledrone; 508 | PRODUCT_NAME = Scaledrone; 509 | SDKROOT = iphoneos; 510 | SKIP_INSTALL = YES; 511 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 512 | SWIFT_VERSION = 5.0; 513 | TARGETED_DEVICE_FAMILY = "1,2"; 514 | VALIDATE_PRODUCT = YES; 515 | VERSIONING_SYSTEM = "apple-generic"; 516 | VERSION_INFO_PREFIX = ""; 517 | }; 518 | name = Release; 519 | }; 520 | 58B26DEB09B9F2BE8CD486980ADFFDBB /* Debug */ = { 521 | isa = XCBuildConfiguration; 522 | baseConfigurationReference = E6D71E3209B1632BA8CD23567761FB88 /* Pods-Scaledrone_Tests.debug.xcconfig */; 523 | buildSettings = { 524 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 525 | CODE_SIGN_IDENTITY = ""; 526 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 527 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 528 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 529 | CURRENT_PROJECT_VERSION = 1; 530 | DEFINES_MODULE = YES; 531 | DYLIB_COMPATIBILITY_VERSION = 1; 532 | DYLIB_CURRENT_VERSION = 1; 533 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 534 | INFOPLIST_FILE = "Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-Info.plist"; 535 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 536 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 538 | MACH_O_TYPE = staticlib; 539 | MODULEMAP_FILE = "Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests.modulemap"; 540 | OTHER_LDFLAGS = ""; 541 | OTHER_LIBTOOLFLAGS = ""; 542 | PODS_ROOT = "$(SRCROOT)"; 543 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 544 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 545 | SDKROOT = iphoneos; 546 | SKIP_INSTALL = YES; 547 | TARGETED_DEVICE_FAMILY = "1,2"; 548 | VERSIONING_SYSTEM = "apple-generic"; 549 | VERSION_INFO_PREFIX = ""; 550 | }; 551 | name = Debug; 552 | }; 553 | B0087CB4594321EF41619F3181FE120E /* Release */ = { 554 | isa = XCBuildConfiguration; 555 | buildSettings = { 556 | ALWAYS_SEARCH_USER_PATHS = NO; 557 | CLANG_ANALYZER_NONNULL = YES; 558 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 559 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 560 | CLANG_CXX_LIBRARY = "libc++"; 561 | CLANG_ENABLE_MODULES = YES; 562 | CLANG_ENABLE_OBJC_ARC = YES; 563 | CLANG_ENABLE_OBJC_WEAK = YES; 564 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 565 | CLANG_WARN_BOOL_CONVERSION = YES; 566 | CLANG_WARN_COMMA = YES; 567 | CLANG_WARN_CONSTANT_CONVERSION = YES; 568 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 569 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 570 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 571 | CLANG_WARN_EMPTY_BODY = YES; 572 | CLANG_WARN_ENUM_CONVERSION = YES; 573 | CLANG_WARN_INFINITE_RECURSION = YES; 574 | CLANG_WARN_INT_CONVERSION = YES; 575 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 576 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 577 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 578 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 579 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 580 | CLANG_WARN_STRICT_PROTOTYPES = YES; 581 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 582 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 583 | CLANG_WARN_UNREACHABLE_CODE = YES; 584 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 585 | COPY_PHASE_STRIP = NO; 586 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 587 | ENABLE_NS_ASSERTIONS = NO; 588 | ENABLE_STRICT_OBJC_MSGSEND = YES; 589 | GCC_C_LANGUAGE_STANDARD = gnu11; 590 | GCC_NO_COMMON_BLOCKS = YES; 591 | GCC_PREPROCESSOR_DEFINITIONS = ( 592 | "POD_CONFIGURATION_RELEASE=1", 593 | "$(inherited)", 594 | ); 595 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 596 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 597 | GCC_WARN_UNDECLARED_SELECTOR = YES; 598 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 599 | GCC_WARN_UNUSED_FUNCTION = YES; 600 | GCC_WARN_UNUSED_VARIABLE = YES; 601 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 602 | MTL_ENABLE_DEBUG_INFO = NO; 603 | MTL_FAST_MATH = YES; 604 | PRODUCT_NAME = "$(TARGET_NAME)"; 605 | STRIP_INSTALLED_PRODUCT = NO; 606 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 607 | SWIFT_VERSION = 5.0; 608 | SYMROOT = "${SRCROOT}/../build"; 609 | }; 610 | name = Release; 611 | }; 612 | B8BCBD0110C2658BB5DAADB9B7D97B92 /* Debug */ = { 613 | isa = XCBuildConfiguration; 614 | buildSettings = { 615 | ALWAYS_SEARCH_USER_PATHS = NO; 616 | CLANG_ANALYZER_NONNULL = YES; 617 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 618 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 619 | CLANG_CXX_LIBRARY = "libc++"; 620 | CLANG_ENABLE_MODULES = YES; 621 | CLANG_ENABLE_OBJC_ARC = YES; 622 | CLANG_ENABLE_OBJC_WEAK = YES; 623 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 624 | CLANG_WARN_BOOL_CONVERSION = YES; 625 | CLANG_WARN_COMMA = YES; 626 | CLANG_WARN_CONSTANT_CONVERSION = YES; 627 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 628 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 629 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 630 | CLANG_WARN_EMPTY_BODY = YES; 631 | CLANG_WARN_ENUM_CONVERSION = YES; 632 | CLANG_WARN_INFINITE_RECURSION = YES; 633 | CLANG_WARN_INT_CONVERSION = YES; 634 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 635 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 636 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 637 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 638 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 639 | CLANG_WARN_STRICT_PROTOTYPES = YES; 640 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 641 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 642 | CLANG_WARN_UNREACHABLE_CODE = YES; 643 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 644 | COPY_PHASE_STRIP = NO; 645 | DEBUG_INFORMATION_FORMAT = dwarf; 646 | ENABLE_STRICT_OBJC_MSGSEND = YES; 647 | ENABLE_TESTABILITY = YES; 648 | GCC_C_LANGUAGE_STANDARD = gnu11; 649 | GCC_DYNAMIC_NO_PIC = NO; 650 | GCC_NO_COMMON_BLOCKS = YES; 651 | GCC_OPTIMIZATION_LEVEL = 0; 652 | GCC_PREPROCESSOR_DEFINITIONS = ( 653 | "POD_CONFIGURATION_DEBUG=1", 654 | "DEBUG=1", 655 | "$(inherited)", 656 | ); 657 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 658 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 659 | GCC_WARN_UNDECLARED_SELECTOR = YES; 660 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 661 | GCC_WARN_UNUSED_FUNCTION = YES; 662 | GCC_WARN_UNUSED_VARIABLE = YES; 663 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 664 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 665 | MTL_FAST_MATH = YES; 666 | ONLY_ACTIVE_ARCH = YES; 667 | PRODUCT_NAME = "$(TARGET_NAME)"; 668 | STRIP_INSTALLED_PRODUCT = NO; 669 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 670 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 671 | SWIFT_VERSION = 5.0; 672 | SYMROOT = "${SRCROOT}/../build"; 673 | }; 674 | name = Debug; 675 | }; 676 | CCD7B0DEA47AD0890E42A450101A0E18 /* Debug */ = { 677 | isa = XCBuildConfiguration; 678 | baseConfigurationReference = DDD7F62DF4FC0BC5D3F53C55190A5B32 /* Scaledrone.xcconfig */; 679 | buildSettings = { 680 | CODE_SIGN_IDENTITY = ""; 681 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 682 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 683 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 684 | CURRENT_PROJECT_VERSION = 1; 685 | DEFINES_MODULE = YES; 686 | DYLIB_COMPATIBILITY_VERSION = 1; 687 | DYLIB_CURRENT_VERSION = 1; 688 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 689 | GCC_PREFIX_HEADER = "Target Support Files/Scaledrone/Scaledrone-prefix.pch"; 690 | INFOPLIST_FILE = "Target Support Files/Scaledrone/Scaledrone-Info.plist"; 691 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 692 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 693 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 694 | MARKETING_VERSION = 0.5.2; 695 | MODULEMAP_FILE = "Target Support Files/Scaledrone/Scaledrone.modulemap"; 696 | PRODUCT_MODULE_NAME = Scaledrone; 697 | PRODUCT_NAME = Scaledrone; 698 | SDKROOT = iphoneos; 699 | SKIP_INSTALL = YES; 700 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 701 | SWIFT_VERSION = 5.0; 702 | TARGETED_DEVICE_FAMILY = "1,2"; 703 | VERSIONING_SYSTEM = "apple-generic"; 704 | VERSION_INFO_PREFIX = ""; 705 | }; 706 | name = Debug; 707 | }; 708 | CD0DFEA21538C2FA567AF75F53625390 /* Debug */ = { 709 | isa = XCBuildConfiguration; 710 | baseConfigurationReference = 64D5E391E11E3D9A03B0ACF80CFBA3B2 /* Starscream.xcconfig */; 711 | buildSettings = { 712 | CODE_SIGN_IDENTITY = ""; 713 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 714 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 715 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 716 | CURRENT_PROJECT_VERSION = 1; 717 | DEFINES_MODULE = YES; 718 | DYLIB_COMPATIBILITY_VERSION = 1; 719 | DYLIB_CURRENT_VERSION = 1; 720 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 721 | GCC_PREFIX_HEADER = "Target Support Files/Starscream/Starscream-prefix.pch"; 722 | INFOPLIST_FILE = "Target Support Files/Starscream/Starscream-Info.plist"; 723 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 724 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 725 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 726 | MODULEMAP_FILE = "Target Support Files/Starscream/Starscream.modulemap"; 727 | PRODUCT_MODULE_NAME = Starscream; 728 | PRODUCT_NAME = Starscream; 729 | SDKROOT = iphoneos; 730 | SKIP_INSTALL = YES; 731 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 732 | SWIFT_VERSION = 5.0; 733 | TARGETED_DEVICE_FAMILY = "1,2"; 734 | VERSIONING_SYSTEM = "apple-generic"; 735 | VERSION_INFO_PREFIX = ""; 736 | }; 737 | name = Debug; 738 | }; 739 | D53CAE373D2C102436B043BE433BBB45 /* Release */ = { 740 | isa = XCBuildConfiguration; 741 | baseConfigurationReference = 64D5E391E11E3D9A03B0ACF80CFBA3B2 /* Starscream.xcconfig */; 742 | buildSettings = { 743 | CODE_SIGN_IDENTITY = ""; 744 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 745 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 746 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 747 | CURRENT_PROJECT_VERSION = 1; 748 | DEFINES_MODULE = YES; 749 | DYLIB_COMPATIBILITY_VERSION = 1; 750 | DYLIB_CURRENT_VERSION = 1; 751 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 752 | GCC_PREFIX_HEADER = "Target Support Files/Starscream/Starscream-prefix.pch"; 753 | INFOPLIST_FILE = "Target Support Files/Starscream/Starscream-Info.plist"; 754 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 755 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 756 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 757 | MODULEMAP_FILE = "Target Support Files/Starscream/Starscream.modulemap"; 758 | PRODUCT_MODULE_NAME = Starscream; 759 | PRODUCT_NAME = Starscream; 760 | SDKROOT = iphoneos; 761 | SKIP_INSTALL = YES; 762 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 763 | SWIFT_VERSION = 5.0; 764 | TARGETED_DEVICE_FAMILY = "1,2"; 765 | VALIDATE_PRODUCT = YES; 766 | VERSIONING_SYSTEM = "apple-generic"; 767 | VERSION_INFO_PREFIX = ""; 768 | }; 769 | name = Release; 770 | }; 771 | /* End XCBuildConfiguration section */ 772 | 773 | /* Begin XCConfigurationList section */ 774 | 3DC8FE5C4010DEF2F9E38EBB177E1D39 /* Build configuration list for PBXNativeTarget "Starscream" */ = { 775 | isa = XCConfigurationList; 776 | buildConfigurations = ( 777 | CD0DFEA21538C2FA567AF75F53625390 /* Debug */, 778 | D53CAE373D2C102436B043BE433BBB45 /* Release */, 779 | ); 780 | defaultConfigurationIsVisible = 0; 781 | defaultConfigurationName = Release; 782 | }; 783 | 44A351AF7C4869CA3357185E16585475 /* Build configuration list for PBXNativeTarget "Scaledrone" */ = { 784 | isa = XCConfigurationList; 785 | buildConfigurations = ( 786 | CCD7B0DEA47AD0890E42A450101A0E18 /* Debug */, 787 | 14B56E0506822F6907FE755F320EAA80 /* Release */, 788 | ); 789 | defaultConfigurationIsVisible = 0; 790 | defaultConfigurationName = Release; 791 | }; 792 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 793 | isa = XCConfigurationList; 794 | buildConfigurations = ( 795 | B8BCBD0110C2658BB5DAADB9B7D97B92 /* Debug */, 796 | B0087CB4594321EF41619F3181FE120E /* Release */, 797 | ); 798 | defaultConfigurationIsVisible = 0; 799 | defaultConfigurationName = Release; 800 | }; 801 | CFFED891BC1E306F44F07C45B01FC4EF /* Build configuration list for PBXNativeTarget "Pods-Scaledrone_Tests" */ = { 802 | isa = XCConfigurationList; 803 | buildConfigurations = ( 804 | 58B26DEB09B9F2BE8CD486980ADFFDBB /* Debug */, 805 | 0AA513E7645615A1B323EB8519E34D2F /* Release */, 806 | ); 807 | defaultConfigurationIsVisible = 0; 808 | defaultConfigurationName = Release; 809 | }; 810 | /* End XCConfigurationList section */ 811 | }; 812 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 813 | } 814 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Scaledrone.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Starscream/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | Copyright (c) 2014-2016 Dalton Cherry. 6 | 7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 8 | 9 | 1. Definitions. 10 | 11 | "License" shall mean the terms and conditions for use, reproduction, 12 | and distribution as defined by Sections 1 through 9 of this document. 13 | 14 | "Licensor" shall mean the copyright owner or entity authorized by 15 | the copyright owner that is granting the License. 16 | 17 | "Legal Entity" shall mean the union of the acting entity and all 18 | other entities that control, are controlled by, or are under common 19 | control with that entity. For the purposes of this definition, 20 | "control" means (i) the power, direct or indirect, to cause the 21 | direction or management of such entity, whether by contract or 22 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 23 | outstanding shares, or (iii) beneficial ownership of such entity. 24 | 25 | "You" (or "Your") shall mean an individual or Legal Entity 26 | exercising permissions granted by this License. 27 | 28 | "Source" form shall mean the preferred form for making modifications, 29 | including but not limited to software source code, documentation 30 | source, and configuration files. 31 | 32 | "Object" form shall mean any form resulting from mechanical 33 | transformation or translation of a Source form, including but 34 | not limited to compiled object code, generated documentation, 35 | and conversions to other media types. 36 | 37 | "Work" shall mean the work of authorship, whether in Source or 38 | Object form, made available under the License, as indicated by a 39 | copyright notice that is included in or attached to the work 40 | (an example is provided in the Appendix below). 41 | 42 | "Derivative Works" shall mean any work, whether in Source or Object 43 | form, that is based on (or derived from) the Work and for which the 44 | editorial revisions, annotations, elaborations, or other modifications 45 | represent, as a whole, an original work of authorship. For the purposes 46 | of this License, Derivative Works shall not include works that remain 47 | separable from, or merely link (or bind by name) to the interfaces of, 48 | the Work and Derivative Works thereof. 49 | 50 | "Contribution" shall mean any work of authorship, including 51 | the original version of the Work and any modifications or additions 52 | to that Work or Derivative Works thereof, that is intentionally 53 | submitted to Licensor for inclusion in the Work by the copyright owner 54 | or by an individual or Legal Entity authorized to submit on behalf of 55 | the copyright owner. For the purposes of this definition, "submitted" 56 | means any form of electronic, verbal, or written communication sent 57 | to the Licensor or its representatives, including but not limited to 58 | communication on electronic mailing lists, source code control systems, 59 | and issue tracking systems that are managed by, or on behalf of, the 60 | Licensor for the purpose of discussing and improving the Work, but 61 | excluding communication that is conspicuously marked or otherwise 62 | designated in writing by the copyright owner as "Not a Contribution." 63 | 64 | "Contributor" shall mean Licensor and any individual or Legal Entity 65 | on behalf of whom a Contribution has been received by Licensor and 66 | subsequently incorporated within the Work. 67 | 68 | 2. Grant of Copyright License. Subject to the terms and conditions of 69 | this License, each Contributor hereby grants to You a perpetual, 70 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 71 | copyright license to reproduce, prepare Derivative Works of, 72 | publicly display, publicly perform, sublicense, and distribute the 73 | Work and such Derivative Works in Source or Object form. 74 | 75 | 3. Grant of Patent License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | (except as stated in this section) patent license to make, have made, 79 | use, offer to sell, sell, import, and otherwise transfer the Work, 80 | where such license applies only to those patent claims licensable 81 | by such Contributor that are necessarily infringed by their 82 | Contribution(s) alone or by combination of their Contribution(s) 83 | with the Work to which such Contribution(s) was submitted. If You 84 | institute patent litigation against any entity (including a 85 | cross-claim or counterclaim in a lawsuit) alleging that the Work 86 | or a Contribution incorporated within the Work constitutes direct 87 | or contributory patent infringement, then any patent licenses 88 | granted to You under this License for that Work shall terminate 89 | as of the date such litigation is filed. 90 | 91 | 4. Redistribution. You may reproduce and distribute copies of the 92 | Work or Derivative Works thereof in any medium, with or without 93 | modifications, and in Source or Object form, provided that You 94 | meet the following conditions: 95 | 96 | (a) You must give any other recipients of the Work or 97 | Derivative Works a copy of this License; and 98 | 99 | (b) You must cause any modified files to carry prominent notices 100 | stating that You changed the files; and 101 | 102 | (c) You must retain, in the Source form of any Derivative Works 103 | that You distribute, all copyright, patent, trademark, and 104 | attribution notices from the Source form of the Work, 105 | excluding those notices that do not pertain to any part of 106 | the Derivative Works; and 107 | 108 | (d) If the Work includes a "NOTICE" text file as part of its 109 | distribution, then any Derivative Works that You distribute must 110 | include a readable copy of the attribution notices contained 111 | within such NOTICE file, excluding those notices that do not 112 | pertain to any part of the Derivative Works, in at least one 113 | of the following places: within a NOTICE text file distributed 114 | as part of the Derivative Works; within the Source form or 115 | documentation, if provided along with the Derivative Works; or, 116 | within a display generated by the Derivative Works, if and 117 | wherever such third-party notices normally appear. The contents 118 | of the NOTICE file are for informational purposes only and 119 | do not modify the License. You may add Your own attribution 120 | notices within Derivative Works that You distribute, alongside 121 | or as an addendum to the NOTICE text from the Work, provided 122 | that such additional attribution notices cannot be construed 123 | as modifying the License. 124 | 125 | You may add Your own copyright statement to Your modifications and 126 | may provide additional or different license terms and conditions 127 | for use, reproduction, or distribution of Your modifications, or 128 | for any such Derivative Works as a whole, provided Your use, 129 | reproduction, and distribution of the Work otherwise complies with 130 | the conditions stated in this License. 131 | 132 | 5. Submission of Contributions. Unless You explicitly state otherwise, 133 | any Contribution intentionally submitted for inclusion in the Work 134 | by You to the Licensor shall be under the terms and conditions of 135 | this License, without any additional terms or conditions. 136 | Notwithstanding the above, nothing herein shall supersede or modify 137 | the terms of any separate license agreement you may have executed 138 | with Licensor regarding such Contributions. 139 | 140 | 6. Trademarks. This License does not grant permission to use the trade 141 | names, trademarks, service marks, or product names of the Licensor, 142 | except as required for reasonable and customary use in describing the 143 | origin of the Work and reproducing the content of the NOTICE file. 144 | 145 | 7. Disclaimer of Warranty. Unless required by applicable law or 146 | agreed to in writing, Licensor provides the Work (and each 147 | Contributor provides its Contributions) on an "AS IS" BASIS, 148 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 149 | implied, including, without limitation, any warranties or conditions 150 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 151 | PARTICULAR PURPOSE. You are solely responsible for determining the 152 | appropriateness of using or redistributing the Work and assume any 153 | risks associated with Your exercise of permissions under this License. 154 | 155 | 8. Limitation of Liability. In no event and under no legal theory, 156 | whether in tort (including negligence), contract, or otherwise, 157 | unless required by applicable law (such as deliberate and grossly 158 | negligent acts) or agreed to in writing, shall any Contributor be 159 | liable to You for damages, including any direct, indirect, special, 160 | incidental, or consequential damages of any character arising as a 161 | result of this License or out of the use or inability to use the 162 | Work (including but not limited to damages for loss of goodwill, 163 | work stoppage, computer failure or malfunction, or any and all 164 | other commercial damages or losses), even if such Contributor 165 | has been advised of the possibility of such damages. 166 | 167 | 9. Accepting Warranty or Additional Liability. While redistributing 168 | the Work or Derivative Works thereof, You may choose to offer, 169 | and charge a fee for, acceptance of support, warranty, indemnity, 170 | or other liability obligations and/or rights consistent with this 171 | License. However, in accepting such obligations, You may act only 172 | on Your own behalf and on Your sole responsibility, not on behalf 173 | of any other Contributor, and only if You agree to indemnify, 174 | defend, and hold each Contributor harmless for any liability 175 | incurred by, or claims asserted against, such Contributor by reason 176 | of your accepting any such warranty or additional liability. -------------------------------------------------------------------------------- /Example/Pods/Starscream/README.md: -------------------------------------------------------------------------------- 1 | ![starscream](https://raw.githubusercontent.com/daltoniam/starscream/assets/starscream.jpg) 2 | 3 | Starscream is a conforming WebSocket ([RFC 6455](http://tools.ietf.org/html/rfc6455)) client library in Swift. 4 | 5 | Its Objective-C counterpart can be found here: [Jetfire](https://github.com/acmacalister/jetfire) 6 | 7 | ## Features 8 | 9 | - Conforms to all of the base [Autobahn test suite](http://autobahn.ws/testsuite/). 10 | - Nonblocking. Everything happens in the background, thanks to GCD. 11 | - TLS/WSS support. 12 | - Compression Extensions support ([RFC 7692](https://tools.ietf.org/html/rfc7692)) 13 | - Simple concise codebase at just a few hundred LOC. 14 | 15 | ## Example 16 | 17 | First thing is to import the framework. See the Installation instructions on how to add the framework to your project. 18 | 19 | ```swift 20 | import Starscream 21 | ``` 22 | 23 | Once imported, you can open a connection to your WebSocket server. Note that `socket` is probably best as a property, so it doesn't get deallocated right after being setup. 24 | 25 | ```swift 26 | socket = WebSocket(url: URL(string: "ws://localhost:8080/")!) 27 | socket.delegate = self 28 | socket.connect() 29 | ``` 30 | 31 | After you are connected, there are some delegate methods that we need to implement. 32 | 33 | ### websocketDidConnect 34 | 35 | websocketDidConnect is called as soon as the client connects to the server. 36 | 37 | ```swift 38 | func websocketDidConnect(socket: WebSocketClient) { 39 | print("websocket is connected") 40 | } 41 | ``` 42 | 43 | ### websocketDidDisconnect 44 | 45 | websocketDidDisconnect is called as soon as the client is disconnected from the server. 46 | 47 | ```swift 48 | func websocketDidDisconnect(socket: WebSocketClient, error: Error?) { 49 | print("websocket is disconnected: \(error?.localizedDescription)") 50 | } 51 | ``` 52 | 53 | ### websocketDidReceiveMessage 54 | 55 | websocketDidReceiveMessage is called when the client gets a text frame from the connection. 56 | 57 | ```swift 58 | func websocketDidReceiveMessage(socket: WebSocketClient, text: String) { 59 | print("got some text: \(text)") 60 | } 61 | ``` 62 | 63 | ### websocketDidReceiveData 64 | 65 | websocketDidReceiveData is called when the client gets a binary frame from the connection. 66 | 67 | ```swift 68 | func websocketDidReceiveData(socket: WebSocketClient, data: Data) { 69 | print("got some data: \(data.count)") 70 | } 71 | ``` 72 | 73 | ### Optional: websocketDidReceivePong *(required protocol: WebSocketPongDelegate)* 74 | 75 | websocketDidReceivePong is called when the client gets a pong response from the connection. You need to implement the WebSocketPongDelegate protocol and set an additional delegate, eg: ` socket.pongDelegate = self` 76 | 77 | ```swift 78 | func websocketDidReceivePong(socket: WebSocketClient, data: Data?) { 79 | print("Got pong! Maybe some data: \(data?.count)") 80 | } 81 | ``` 82 | 83 | Or you can use closures. 84 | 85 | ```swift 86 | socket = WebSocket(url: URL(string: "ws://localhost:8080/")!) 87 | //websocketDidConnect 88 | socket.onConnect = { 89 | print("websocket is connected") 90 | } 91 | //websocketDidDisconnect 92 | socket.onDisconnect = { (error: Error?) in 93 | print("websocket is disconnected: \(error?.localizedDescription)") 94 | } 95 | //websocketDidReceiveMessage 96 | socket.onText = { (text: String) in 97 | print("got some text: \(text)") 98 | } 99 | //websocketDidReceiveData 100 | socket.onData = { (data: Data) in 101 | print("got some data: \(data.count)") 102 | } 103 | //you could do onPong as well. 104 | socket.connect() 105 | ``` 106 | 107 | One more: you can listen to socket connection and disconnection via notifications. Starscream posts `WebsocketDidConnectNotification` and `WebsocketDidDisconnectNotification`. You can find an `Error` that caused the disconection by accessing `WebsocketDisconnectionErrorKeyName` on notification `userInfo`. 108 | 109 | 110 | ## The delegate methods give you a simple way to handle data from the server, but how do you send data? 111 | 112 | ### write a binary frame 113 | 114 | The writeData method gives you a simple way to send `Data` (binary) data to the server. 115 | 116 | ```swift 117 | socket.write(data: data) //write some Data over the socket! 118 | ``` 119 | 120 | ### write a string frame 121 | 122 | The writeString method is the same as writeData, but sends text/string. 123 | 124 | ```swift 125 | socket.write(string: "Hi Server!") //example on how to write text over the socket! 126 | ``` 127 | 128 | ### write a ping frame 129 | 130 | The writePing method is the same as write, but sends a ping control frame. 131 | 132 | ```swift 133 | socket.write(ping: Data()) //example on how to write a ping control frame over the socket! 134 | ``` 135 | 136 | ### write a pong frame 137 | 138 | 139 | the writePong method is the same as writePing, but sends a pong control frame. 140 | 141 | ```swift 142 | socket.write(pong: Data()) //example on how to write a pong control frame over the socket! 143 | ``` 144 | 145 | Starscream will automatically respond to incoming `ping` control frames so you do not need to manually send `pong`s. 146 | 147 | However if for some reason you need to control this process you can turn off the automatic `ping` response by disabling `respondToPingWithPong`. 148 | 149 | ```swift 150 | socket.respondToPingWithPong = false //Do not automaticaly respond to incoming pings with pongs. 151 | ``` 152 | 153 | In most cases you will not need to do this. 154 | 155 | ### disconnect 156 | 157 | The disconnect method does what you would expect and closes the socket. 158 | 159 | ```swift 160 | socket.disconnect() 161 | ``` 162 | 163 | The socket can be forcefully closed, by specifying a timeout (in milliseconds). A timeout of zero will also close the socket immediately without waiting on the server. 164 | 165 | ```swift 166 | socket.disconnect(forceTimeout: 10, closeCode: CloseCode.normal.rawValue) 167 | ``` 168 | 169 | ### isConnected 170 | 171 | Returns if the socket is connected or not. 172 | 173 | ```swift 174 | if socket.isConnected { 175 | // do cool stuff. 176 | } 177 | ``` 178 | 179 | ### Custom Headers 180 | 181 | You can also override the default websocket headers with your own custom ones like so: 182 | 183 | ```swift 184 | var request = URLRequest(url: URL(string: "ws://localhost:8080/")!) 185 | request.timeoutInterval = 5 186 | request.setValue("someother protocols", forHTTPHeaderField: "Sec-WebSocket-Protocol") 187 | request.setValue("14", forHTTPHeaderField: "Sec-WebSocket-Version") 188 | request.setValue("Everything is Awesome!", forHTTPHeaderField: "My-Awesome-Header") 189 | let socket = WebSocket(request: request) 190 | ``` 191 | 192 | ### Custom HTTP Method 193 | 194 | Your server may use a different HTTP method when connecting to the websocket: 195 | 196 | ```swift 197 | var request = URLRequest(url: URL(string: "ws://localhost:8080/")!) 198 | request.httpMethod = "POST" 199 | request.timeoutInterval = 5 200 | let socket = WebSocket(request: request) 201 | ``` 202 | 203 | ### Protocols 204 | 205 | If you need to specify a protocol, simple add it to the init: 206 | 207 | ```swift 208 | //chat and superchat are the example protocols here 209 | socket = WebSocket(url: URL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"]) 210 | socket.delegate = self 211 | socket.connect() 212 | ``` 213 | 214 | ### Self Signed SSL 215 | 216 | ```swift 217 | socket = WebSocket(url: URL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"]) 218 | 219 | //set this if you want to ignore SSL cert validation, so a self signed SSL certificate can be used. 220 | socket.disableSSLCertValidation = true 221 | ``` 222 | 223 | ### SSL Pinning 224 | 225 | SSL Pinning is also supported in Starscream. 226 | 227 | ```swift 228 | socket = WebSocket(url: URL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"]) 229 | let data = ... //load your certificate from disk 230 | socket.security = SSLSecurity(certs: [SSLCert(data: data)], usePublicKeys: true) 231 | //socket.security = SSLSecurity() //uses the .cer files in your app's bundle 232 | ``` 233 | You load either a `Data` blob of your certificate or you can use a `SecKeyRef` if you have a public key you want to use. The `usePublicKeys` bool is whether to use the certificates for validation or the public keys. The public keys will be extracted from the certificates automatically if `usePublicKeys` is choosen. 234 | 235 | ### SSL Cipher Suites 236 | 237 | To use an SSL encrypted connection, you need to tell Starscream about the cipher suites your server supports. 238 | 239 | ```swift 240 | socket = WebSocket(url: URL(string: "wss://localhost:8080/")!, protocols: ["chat","superchat"]) 241 | 242 | // Set enabled cipher suites to AES 256 and AES 128 243 | socket.enabledSSLCipherSuites = [TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256] 244 | ``` 245 | 246 | If you don't know which cipher suites are supported by your server, you can try pointing [SSL Labs](https://www.ssllabs.com/ssltest/) at it and checking the results. 247 | 248 | ### Compression Extensions 249 | 250 | Compression Extensions ([RFC 7692](https://tools.ietf.org/html/rfc7692)) is supported in Starscream. Compression is enabled by default, however compression will only be used if it is supported by the server as well. You may enable or disable compression via the `.enableCompression` property: 251 | 252 | ```swift 253 | socket = WebSocket(url: URL(string: "ws://localhost:8080/")!) 254 | socket.enableCompression = false 255 | ``` 256 | 257 | Compression should be disabled if your application is transmitting already-compressed, random, or other uncompressable data. 258 | 259 | ### Custom Queue 260 | 261 | A custom queue can be specified when delegate methods are called. By default `DispatchQueue.main` is used, thus making all delegate methods calls run on the main thread. It is important to note that all WebSocket processing is done on a background thread, only the delegate method calls are changed when modifying the queue. The actual processing is always on a background thread and will not pause your app. 262 | 263 | ```swift 264 | socket = WebSocket(url: URL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"]) 265 | //create a custom queue 266 | socket.callbackQueue = DispatchQueue(label: "com.vluxe.starscream.myapp") 267 | ``` 268 | 269 | ## Example Project 270 | 271 | Check out the SimpleTest project in the examples directory to see how to setup a simple connection to a WebSocket server. 272 | 273 | ## Requirements 274 | 275 | Starscream works with iOS 7/OSX 10.9 or above. It is recommended to use iOS 8/10.10 or above for CocoaPods/framework support. To use Starscream with a project targeting iOS 7, you must include all Swift files directly in your project. 276 | 277 | ## Installation 278 | 279 | ### CocoaPods 280 | 281 | Check out [Get Started](http://cocoapods.org/) tab on [cocoapods.org](http://cocoapods.org/). 282 | 283 | To use Starscream in your project add the following 'Podfile' to your project 284 | 285 | source 'https://github.com/CocoaPods/Specs.git' 286 | platform :ios, '9.0' 287 | use_frameworks! 288 | 289 | pod 'Starscream', '~> 3.0.2' 290 | 291 | Then run: 292 | 293 | pod install 294 | 295 | ### Carthage 296 | 297 | Check out the [Carthage](https://github.com/Carthage/Carthage) docs on how to add a install. The `Starscream` framework is already setup with shared schemes. 298 | 299 | [Carthage Install](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) 300 | 301 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command: 302 | 303 | ```bash 304 | $ brew update 305 | $ brew install carthage 306 | ``` 307 | 308 | To integrate Starscream into your Xcode project using Carthage, specify it in your `Cartfile`: 309 | 310 | ``` 311 | github "daltoniam/Starscream" >= 3.0.2 312 | ``` 313 | 314 | ### Accio 315 | 316 | Check out the [Accio](https://github.com/JamitLabs/Accio) docs on how to add a install. 317 | 318 | Add the following to your Package.swift: 319 | 320 | ```swift 321 | .package(url: "https://github.com/daltoniam/Starscream.git", .upToNextMajor(from: "3.1.0")), 322 | ``` 323 | 324 | Next, add `Starscream` to your App targets dependencies like so: 325 | 326 | ```swift 327 | .target( 328 | name: "App", 329 | dependencies: [ 330 | "Starscream", 331 | ] 332 | ), 333 | ``` 334 | 335 | Then run `accio update`. 336 | 337 | ### Rogue 338 | 339 | First see the [installation docs](https://github.com/acmacalister/Rogue) for how to install Rogue. 340 | 341 | To install Starscream run the command below in the directory you created the rogue file. 342 | 343 | ``` 344 | rogue add https://github.com/daltoniam/Starscream 345 | ``` 346 | 347 | Next open the `libs` folder and add the `Starscream.xcodeproj` to your Xcode project. Once that is complete, in your "Build Phases" add the `Starscream.framework` to your "Link Binary with Libraries" phase. Make sure to add the `libs` folder to your `.gitignore` file. 348 | 349 | ### Swift Package Manager 350 | 351 | The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. 352 | 353 | Once you have your Swift package set up, adding Starscream as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. 354 | 355 | ```swift 356 | dependencies: [ 357 | .Package(url: "https://github.com/daltoniam/Starscream.git", majorVersion: 3) 358 | ] 359 | ``` 360 | 361 | ### Other 362 | 363 | Simply grab the framework (either via git submodule or another package manager). 364 | 365 | Add the `Starscream.xcodeproj` to your Xcode project. Once that is complete, in your "Build Phases" add the `Starscream.framework` to your "Link Binary with Libraries" phase. 366 | 367 | ### Add Copy Frameworks Phase 368 | 369 | If you are running this in an OSX app or on a physical iOS device you will need to make sure you add the `Starscream.framework` to be included in your app bundle. To do this, in Xcode, navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar. In the tab bar at the top of that window, open the "Build Phases" panel. Expand the "Link Binary with Libraries" group, and add `Starscream.framework`. Click on the + button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add `Starscream.framework` respectively. 370 | 371 | 372 | ## WebSocketAdvancedDelegate 373 | The advanced delegate acts just like the simpler delegate but provides some additional information on the connection and incoming frames. 374 | 375 | ```swift 376 | socket.advancedDelegate = self 377 | ``` 378 | 379 | In most cases you do not need the extra info and should use the normal delegate. 380 | 381 | #### websocketDidReceiveMessage 382 | ```swift 383 | func websocketDidReceiveMessage(socket: WebSocketClient, text: String, response: WebSocket.WSResponse) { 384 | print("got some text: \(text)") 385 | print("First frame for this message arrived on \(response.firstFrame)") 386 | } 387 | ``` 388 | 389 | #### websocketDidReceiveData 390 | ```swift 391 | func websocketDidReceiveData(socket: WebSocketClient, data: Date, response: WebSocket.WSResponse) { 392 | print("got some data it long: \(data.count)") 393 | print("A total of \(response.frameCount) frames were used to send this data") 394 | } 395 | ``` 396 | 397 | #### websocketHttpUpgrade 398 | These methods are called when the HTTP upgrade request is sent and when the response returns. 399 | ```swift 400 | func websocketHttpUpgrade(socket: WebSocketClient, request: CFHTTPMessage) { 401 | print("the http request was sent we can check the raw http if we need to") 402 | } 403 | ``` 404 | 405 | ```swift 406 | func websocketHttpUpgrade(socket: WebSocketClient, response: CFHTTPMessage) { 407 | print("the http response has returned.") 408 | } 409 | ``` 410 | 411 | ## Swift versions 412 | 413 | * Swift 4.2 - 3.0.6 414 | 415 | ## KNOWN ISSUES 416 | - WatchOS does not have the the CFNetwork String constants to modify the stream's SSL behavior. It will be the default Foundation SSL behavior. This means watchOS CANNOT use `SSLCiphers`, `disableSSLCertValidation`, or SSL pinning. All these values set on watchOS will do nothing. 417 | - Linux does not have the security framework, so it CANNOT use SSL pinning or `SSLCiphers` either. 418 | 419 | 420 | ## TODOs 421 | 422 | - [ ] Add Unit Tests - Local WebSocket server that runs against Autobahn 423 | 424 | ## License 425 | 426 | Starscream is licensed under the Apache v2 License. 427 | 428 | ## Contact 429 | 430 | ### Dalton Cherry 431 | * https://github.com/daltoniam 432 | * http://twitter.com/daltoniam 433 | * http://daltoniam.com 434 | 435 | ### Austin Cherry ### 436 | * https://github.com/acmacalister 437 | * http://twitter.com/acmacalister 438 | * http://austincherry.me 439 | -------------------------------------------------------------------------------- /Example/Pods/Starscream/Sources/Starscream/Compression.swift: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Compression.swift 4 | // 5 | // Created by Joseph Ross on 7/16/14. 6 | // Copyright © 2017 Joseph Ross. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | ////////////////////////////////////////////////////////////////////////////////////////////////// 21 | 22 | ////////////////////////////////////////////////////////////////////////////////////////////////// 23 | // 24 | // Compression implementation is implemented in conformance with RFC 7692 Compression Extensions 25 | // for WebSocket: https://tools.ietf.org/html/rfc7692 26 | // 27 | ////////////////////////////////////////////////////////////////////////////////////////////////// 28 | 29 | import Foundation 30 | import zlib 31 | 32 | class Decompressor { 33 | private var strm = z_stream() 34 | private var buffer = [UInt8](repeating: 0, count: 0x2000) 35 | private var inflateInitialized = false 36 | private let windowBits:Int 37 | 38 | init?(windowBits:Int) { 39 | self.windowBits = windowBits 40 | guard initInflate() else { return nil } 41 | } 42 | 43 | private func initInflate() -> Bool { 44 | if Z_OK == inflateInit2_(&strm, -CInt(windowBits), 45 | ZLIB_VERSION, CInt(MemoryLayout.size)) 46 | { 47 | inflateInitialized = true 48 | return true 49 | } 50 | return false 51 | } 52 | 53 | func reset() throws { 54 | teardownInflate() 55 | guard initInflate() else { throw WSError(type: .compressionError, message: "Error for decompressor on reset", code: 0) } 56 | } 57 | 58 | func decompress(_ data: Data, finish: Bool) throws -> Data { 59 | return try data.withUnsafeBytes { (bytes:UnsafePointer) -> Data in 60 | return try decompress(bytes: bytes, count: data.count, finish: finish) 61 | } 62 | } 63 | 64 | func decompress(bytes: UnsafePointer, count: Int, finish: Bool) throws -> Data { 65 | var decompressed = Data() 66 | try decompress(bytes: bytes, count: count, out: &decompressed) 67 | 68 | if finish { 69 | let tail:[UInt8] = [0x00, 0x00, 0xFF, 0xFF] 70 | try decompress(bytes: tail, count: tail.count, out: &decompressed) 71 | } 72 | 73 | return decompressed 74 | 75 | } 76 | 77 | private func decompress(bytes: UnsafePointer, count: Int, out:inout Data) throws { 78 | var res:CInt = 0 79 | strm.next_in = UnsafeMutablePointer(mutating: bytes) 80 | strm.avail_in = CUnsignedInt(count) 81 | 82 | repeat { 83 | strm.next_out = UnsafeMutablePointer(&buffer) 84 | strm.avail_out = CUnsignedInt(buffer.count) 85 | 86 | res = inflate(&strm, 0) 87 | 88 | let byteCount = buffer.count - Int(strm.avail_out) 89 | out.append(buffer, count: byteCount) 90 | } while res == Z_OK && strm.avail_out == 0 91 | 92 | guard (res == Z_OK && strm.avail_out > 0) 93 | || (res == Z_BUF_ERROR && Int(strm.avail_out) == buffer.count) 94 | else { 95 | throw WSError(type: .compressionError, message: "Error on decompressing", code: 0) 96 | } 97 | } 98 | 99 | private func teardownInflate() { 100 | if inflateInitialized, Z_OK == inflateEnd(&strm) { 101 | inflateInitialized = false 102 | } 103 | } 104 | 105 | deinit { 106 | teardownInflate() 107 | } 108 | } 109 | 110 | class Compressor { 111 | private var strm = z_stream() 112 | private var buffer = [UInt8](repeating: 0, count: 0x2000) 113 | private var deflateInitialized = false 114 | private let windowBits:Int 115 | 116 | init?(windowBits: Int) { 117 | self.windowBits = windowBits 118 | guard initDeflate() else { return nil } 119 | } 120 | 121 | private func initDeflate() -> Bool { 122 | if Z_OK == deflateInit2_(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, 123 | -CInt(windowBits), 8, Z_DEFAULT_STRATEGY, 124 | ZLIB_VERSION, CInt(MemoryLayout.size)) 125 | { 126 | deflateInitialized = true 127 | return true 128 | } 129 | return false 130 | } 131 | 132 | func reset() throws { 133 | teardownDeflate() 134 | guard initDeflate() else { throw WSError(type: .compressionError, message: "Error for compressor on reset", code: 0) } 135 | } 136 | 137 | func compress(_ data: Data) throws -> Data { 138 | var compressed = Data() 139 | var res:CInt = 0 140 | data.withUnsafeBytes { (ptr:UnsafePointer) -> Void in 141 | strm.next_in = UnsafeMutablePointer(mutating: ptr) 142 | strm.avail_in = CUnsignedInt(data.count) 143 | 144 | repeat { 145 | strm.next_out = UnsafeMutablePointer(&buffer) 146 | strm.avail_out = CUnsignedInt(buffer.count) 147 | 148 | res = deflate(&strm, Z_SYNC_FLUSH) 149 | 150 | let byteCount = buffer.count - Int(strm.avail_out) 151 | compressed.append(buffer, count: byteCount) 152 | } 153 | while res == Z_OK && strm.avail_out == 0 154 | 155 | } 156 | 157 | guard res == Z_OK && strm.avail_out > 0 158 | || (res == Z_BUF_ERROR && Int(strm.avail_out) == buffer.count) 159 | else { 160 | throw WSError(type: .compressionError, message: "Error on compressing", code: 0) 161 | } 162 | 163 | compressed.removeLast(4) 164 | return compressed 165 | } 166 | 167 | private func teardownDeflate() { 168 | if deflateInitialized, Z_OK == deflateEnd(&strm) { 169 | deflateInitialized = false 170 | } 171 | } 172 | 173 | deinit { 174 | teardownDeflate() 175 | } 176 | } 177 | 178 | -------------------------------------------------------------------------------- /Example/Pods/Starscream/Sources/Starscream/SSLClientCertificate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSLClientCertificate.swift 3 | // Starscream 4 | // 5 | // Created by Tomasz Trela on 08/03/2018. 6 | // Copyright © 2018 Vluxe. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct SSLClientCertificateError: LocalizedError { 12 | public var errorDescription: String? 13 | 14 | init(errorDescription: String) { 15 | self.errorDescription = errorDescription 16 | } 17 | } 18 | 19 | public class SSLClientCertificate { 20 | internal let streamSSLCertificates: NSArray 21 | 22 | /** 23 | Convenience init. 24 | - parameter pkcs12Path: Path to pkcs12 file containing private key and X.509 ceritifacte (.p12) 25 | - parameter password: file password, see **kSecImportExportPassphrase** 26 | */ 27 | public convenience init(pkcs12Path: String, password: String) throws { 28 | let pkcs12Url = URL(fileURLWithPath: pkcs12Path) 29 | do { 30 | try self.init(pkcs12Url: pkcs12Url, password: password) 31 | } catch { 32 | throw error 33 | } 34 | } 35 | 36 | /** 37 | Designated init. For more information, see SSLSetCertificate() in Security/SecureTransport.h. 38 | - parameter identity: SecIdentityRef, see **kCFStreamSSLCertificates** 39 | - parameter identityCertificate: CFArray of SecCertificateRefs, see **kCFStreamSSLCertificates** 40 | */ 41 | public init(identity: SecIdentity, identityCertificate: SecCertificate) { 42 | self.streamSSLCertificates = NSArray(objects: identity, identityCertificate) 43 | } 44 | 45 | /** 46 | Convenience init. 47 | - parameter pkcs12Url: URL to pkcs12 file containing private key and X.509 ceritifacte (.p12) 48 | - parameter password: file password, see **kSecImportExportPassphrase** 49 | */ 50 | public convenience init(pkcs12Url: URL, password: String) throws { 51 | let importOptions = [kSecImportExportPassphrase as String : password] as CFDictionary 52 | do { 53 | try self.init(pkcs12Url: pkcs12Url, importOptions: importOptions) 54 | } catch { 55 | throw error 56 | } 57 | } 58 | 59 | /** 60 | Designated init. 61 | - parameter pkcs12Url: URL to pkcs12 file containing private key and X.509 ceritifacte (.p12) 62 | - parameter importOptions: A dictionary containing import options. A 63 | kSecImportExportPassphrase entry is required at minimum. Only password-based 64 | PKCS12 blobs are currently supported. See **SecImportExport.h** 65 | */ 66 | public init(pkcs12Url: URL, importOptions: CFDictionary) throws { 67 | do { 68 | let pkcs12Data = try Data(contentsOf: pkcs12Url) 69 | var rawIdentitiesAndCertificates: CFArray? 70 | let pkcs12CFData: CFData = pkcs12Data as CFData 71 | let importStatus = SecPKCS12Import(pkcs12CFData, importOptions, &rawIdentitiesAndCertificates) 72 | 73 | guard importStatus == errSecSuccess else { 74 | throw SSLClientCertificateError(errorDescription: "(Starscream) Error during 'SecPKCS12Import', see 'SecBase.h' - OSStatus: \(importStatus)") 75 | } 76 | guard let identitiyAndCertificate = (rawIdentitiesAndCertificates as? Array>)?.first else { 77 | throw SSLClientCertificateError(errorDescription: "(Starscream) Error - PKCS12 file is empty") 78 | } 79 | 80 | let identity = identitiyAndCertificate[kSecImportItemIdentity as String] as! SecIdentity 81 | var identityCertificate: SecCertificate? 82 | let copyStatus = SecIdentityCopyCertificate(identity, &identityCertificate) 83 | guard copyStatus == errSecSuccess else { 84 | throw SSLClientCertificateError(errorDescription: "(Starscream) Error during 'SecIdentityCopyCertificate', see 'SecBase.h' - OSStatus: \(copyStatus)") 85 | } 86 | self.streamSSLCertificates = NSArray(objects: identity, identityCertificate!) 87 | } catch { 88 | throw error 89 | } 90 | } 91 | } 92 | 93 | -------------------------------------------------------------------------------- /Example/Pods/Starscream/Sources/Starscream/SSLSecurity.swift: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // SSLSecurity.swift 4 | // Starscream 5 | // 6 | // Created by Dalton Cherry on 5/16/15. 7 | // Copyright (c) 2014-2016 Dalton Cherry. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // 13 | // http://www.apache.org/licenses/LICENSE-2.0 14 | // 15 | // Unless required by applicable law or agreed to in writing, software 16 | // distributed under the License is distributed on an "AS IS" BASIS, 17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | ////////////////////////////////////////////////////////////////////////////////////////////////// 22 | #if os(Linux) 23 | #else 24 | import Foundation 25 | import Security 26 | 27 | public protocol SSLTrustValidator { 28 | func isValid(_ trust: SecTrust, domain: String?) -> Bool 29 | } 30 | 31 | open class SSLCert { 32 | var certData: Data? 33 | var key: SecKey? 34 | 35 | /** 36 | Designated init for certificates 37 | 38 | - parameter data: is the binary data of the certificate 39 | 40 | - returns: a representation security object to be used with 41 | */ 42 | public init(data: Data) { 43 | self.certData = data 44 | } 45 | 46 | /** 47 | Designated init for public keys 48 | 49 | - parameter key: is the public key to be used 50 | 51 | - returns: a representation security object to be used with 52 | */ 53 | public init(key: SecKey) { 54 | self.key = key 55 | } 56 | } 57 | 58 | open class SSLSecurity : SSLTrustValidator { 59 | public var validatedDN = true //should the domain name be validated? 60 | public var validateEntireChain = true //should the entire cert chain be validated 61 | 62 | var isReady = false //is the key processing done? 63 | var certificates: [Data]? //the certificates 64 | var pubKeys: [SecKey]? //the public keys 65 | var usePublicKeys = false //use public keys or certificate validation? 66 | 67 | /** 68 | Use certs from main app bundle 69 | 70 | - parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation 71 | 72 | - returns: a representation security object to be used with 73 | */ 74 | public convenience init(usePublicKeys: Bool = false) { 75 | let paths = Bundle.main.paths(forResourcesOfType: "cer", inDirectory: ".") 76 | 77 | let certs = paths.reduce([SSLCert]()) { (certs: [SSLCert], path: String) -> [SSLCert] in 78 | var certs = certs 79 | if let data = NSData(contentsOfFile: path) { 80 | certs.append(SSLCert(data: data as Data)) 81 | } 82 | return certs 83 | } 84 | 85 | self.init(certs: certs, usePublicKeys: usePublicKeys) 86 | } 87 | 88 | /** 89 | Designated init 90 | 91 | - parameter certs: is the certificates or public keys to use 92 | - parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation 93 | 94 | - returns: a representation security object to be used with 95 | */ 96 | public init(certs: [SSLCert], usePublicKeys: Bool) { 97 | self.usePublicKeys = usePublicKeys 98 | 99 | if self.usePublicKeys { 100 | DispatchQueue.global(qos: .default).async { 101 | let pubKeys = certs.reduce([SecKey]()) { (pubKeys: [SecKey], cert: SSLCert) -> [SecKey] in 102 | var pubKeys = pubKeys 103 | if let data = cert.certData, cert.key == nil { 104 | cert.key = self.extractPublicKey(data) 105 | } 106 | if let key = cert.key { 107 | pubKeys.append(key) 108 | } 109 | return pubKeys 110 | } 111 | 112 | self.pubKeys = pubKeys 113 | self.isReady = true 114 | } 115 | } else { 116 | let certificates = certs.reduce([Data]()) { (certificates: [Data], cert: SSLCert) -> [Data] in 117 | var certificates = certificates 118 | if let data = cert.certData { 119 | certificates.append(data) 120 | } 121 | return certificates 122 | } 123 | self.certificates = certificates 124 | self.isReady = true 125 | } 126 | } 127 | 128 | /** 129 | Valid the trust and domain name. 130 | 131 | - parameter trust: is the serverTrust to validate 132 | - parameter domain: is the CN domain to validate 133 | 134 | - returns: if the key was successfully validated 135 | */ 136 | open func isValid(_ trust: SecTrust, domain: String?) -> Bool { 137 | 138 | var tries = 0 139 | while !self.isReady { 140 | usleep(1000) 141 | tries += 1 142 | if tries > 5 { 143 | return false //doesn't appear it is going to ever be ready... 144 | } 145 | } 146 | var policy: SecPolicy 147 | if self.validatedDN { 148 | policy = SecPolicyCreateSSL(true, domain as NSString?) 149 | } else { 150 | policy = SecPolicyCreateBasicX509() 151 | } 152 | SecTrustSetPolicies(trust,policy) 153 | if self.usePublicKeys { 154 | if let keys = self.pubKeys { 155 | let serverPubKeys = publicKeyChain(trust) 156 | for serverKey in serverPubKeys as [AnyObject] { 157 | for key in keys as [AnyObject] { 158 | if serverKey.isEqual(key) { 159 | return true 160 | } 161 | } 162 | } 163 | } 164 | } else if let certs = self.certificates { 165 | let serverCerts = certificateChain(trust) 166 | var collect = [SecCertificate]() 167 | for cert in certs { 168 | collect.append(SecCertificateCreateWithData(nil,cert as CFData)!) 169 | } 170 | SecTrustSetAnchorCertificates(trust,collect as NSArray) 171 | var result: SecTrustResultType = .unspecified 172 | SecTrustEvaluate(trust,&result) 173 | if result == .unspecified || result == .proceed { 174 | if !validateEntireChain { 175 | return true 176 | } 177 | var trustedCount = 0 178 | for serverCert in serverCerts { 179 | for cert in certs { 180 | if cert == serverCert { 181 | trustedCount += 1 182 | break 183 | } 184 | } 185 | } 186 | if trustedCount == serverCerts.count { 187 | return true 188 | } 189 | } 190 | } 191 | return false 192 | } 193 | 194 | /** 195 | Get the public key from a certificate data 196 | 197 | - parameter data: is the certificate to pull the public key from 198 | 199 | - returns: a public key 200 | */ 201 | public func extractPublicKey(_ data: Data) -> SecKey? { 202 | guard let cert = SecCertificateCreateWithData(nil, data as CFData) else { return nil } 203 | 204 | return extractPublicKey(cert, policy: SecPolicyCreateBasicX509()) 205 | } 206 | 207 | /** 208 | Get the public key from a certificate 209 | 210 | - parameter data: is the certificate to pull the public key from 211 | 212 | - returns: a public key 213 | */ 214 | public func extractPublicKey(_ cert: SecCertificate, policy: SecPolicy) -> SecKey? { 215 | var possibleTrust: SecTrust? 216 | SecTrustCreateWithCertificates(cert, policy, &possibleTrust) 217 | 218 | guard let trust = possibleTrust else { return nil } 219 | var result: SecTrustResultType = .unspecified 220 | SecTrustEvaluate(trust, &result) 221 | return SecTrustCopyPublicKey(trust) 222 | } 223 | 224 | /** 225 | Get the certificate chain for the trust 226 | 227 | - parameter trust: is the trust to lookup the certificate chain for 228 | 229 | - returns: the certificate chain for the trust 230 | */ 231 | public func certificateChain(_ trust: SecTrust) -> [Data] { 232 | let certificates = (0.. [Data] in 233 | var certificates = certificates 234 | let cert = SecTrustGetCertificateAtIndex(trust, index) 235 | certificates.append(SecCertificateCopyData(cert!) as Data) 236 | return certificates 237 | } 238 | 239 | return certificates 240 | } 241 | 242 | /** 243 | Get the public key chain for the trust 244 | 245 | - parameter trust: is the trust to lookup the certificate chain and extract the public keys 246 | 247 | - returns: the public keys from the certifcate chain for the trust 248 | */ 249 | public func publicKeyChain(_ trust: SecTrust) -> [SecKey] { 250 | let policy = SecPolicyCreateBasicX509() 251 | let keys = (0.. [SecKey] in 252 | var keys = keys 253 | let cert = SecTrustGetCertificateAtIndex(trust, index) 254 | if let key = extractPublicKey(cert!, policy: policy) { 255 | keys.append(key) 256 | } 257 | 258 | return keys 259 | } 260 | 261 | return keys 262 | } 263 | 264 | 265 | } 266 | #endif 267 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-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 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Scaledrone 5 | 6 | Copyright (c) 2019 marinbenc 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## Starscream 28 | 29 | Apache License 30 | Version 2.0, January 2004 31 | http://www.apache.org/licenses/ 32 | 33 | Copyright (c) 2014-2016 Dalton Cherry. 34 | 35 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 36 | 37 | 1. Definitions. 38 | 39 | "License" shall mean the terms and conditions for use, reproduction, 40 | and distribution as defined by Sections 1 through 9 of this document. 41 | 42 | "Licensor" shall mean the copyright owner or entity authorized by 43 | the copyright owner that is granting the License. 44 | 45 | "Legal Entity" shall mean the union of the acting entity and all 46 | other entities that control, are controlled by, or are under common 47 | control with that entity. For the purposes of this definition, 48 | "control" means (i) the power, direct or indirect, to cause the 49 | direction or management of such entity, whether by contract or 50 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 51 | outstanding shares, or (iii) beneficial ownership of such entity. 52 | 53 | "You" (or "Your") shall mean an individual or Legal Entity 54 | exercising permissions granted by this License. 55 | 56 | "Source" form shall mean the preferred form for making modifications, 57 | including but not limited to software source code, documentation 58 | source, and configuration files. 59 | 60 | "Object" form shall mean any form resulting from mechanical 61 | transformation or translation of a Source form, including but 62 | not limited to compiled object code, generated documentation, 63 | and conversions to other media types. 64 | 65 | "Work" shall mean the work of authorship, whether in Source or 66 | Object form, made available under the License, as indicated by a 67 | copyright notice that is included in or attached to the work 68 | (an example is provided in the Appendix below). 69 | 70 | "Derivative Works" shall mean any work, whether in Source or Object 71 | form, that is based on (or derived from) the Work and for which the 72 | editorial revisions, annotations, elaborations, or other modifications 73 | represent, as a whole, an original work of authorship. For the purposes 74 | of this License, Derivative Works shall not include works that remain 75 | separable from, or merely link (or bind by name) to the interfaces of, 76 | the Work and Derivative Works thereof. 77 | 78 | "Contribution" shall mean any work of authorship, including 79 | the original version of the Work and any modifications or additions 80 | to that Work or Derivative Works thereof, that is intentionally 81 | submitted to Licensor for inclusion in the Work by the copyright owner 82 | or by an individual or Legal Entity authorized to submit on behalf of 83 | the copyright owner. For the purposes of this definition, "submitted" 84 | means any form of electronic, verbal, or written communication sent 85 | to the Licensor or its representatives, including but not limited to 86 | communication on electronic mailing lists, source code control systems, 87 | and issue tracking systems that are managed by, or on behalf of, the 88 | Licensor for the purpose of discussing and improving the Work, but 89 | excluding communication that is conspicuously marked or otherwise 90 | designated in writing by the copyright owner as "Not a Contribution." 91 | 92 | "Contributor" shall mean Licensor and any individual or Legal Entity 93 | on behalf of whom a Contribution has been received by Licensor and 94 | subsequently incorporated within the Work. 95 | 96 | 2. Grant of Copyright License. Subject to the terms and conditions of 97 | this License, each Contributor hereby grants to You a perpetual, 98 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 99 | copyright license to reproduce, prepare Derivative Works of, 100 | publicly display, publicly perform, sublicense, and distribute the 101 | Work and such Derivative Works in Source or Object form. 102 | 103 | 3. Grant of Patent License. Subject to the terms and conditions of 104 | this License, each Contributor hereby grants to You a perpetual, 105 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 106 | (except as stated in this section) patent license to make, have made, 107 | use, offer to sell, sell, import, and otherwise transfer the Work, 108 | where such license applies only to those patent claims licensable 109 | by such Contributor that are necessarily infringed by their 110 | Contribution(s) alone or by combination of their Contribution(s) 111 | with the Work to which such Contribution(s) was submitted. If You 112 | institute patent litigation against any entity (including a 113 | cross-claim or counterclaim in a lawsuit) alleging that the Work 114 | or a Contribution incorporated within the Work constitutes direct 115 | or contributory patent infringement, then any patent licenses 116 | granted to You under this License for that Work shall terminate 117 | as of the date such litigation is filed. 118 | 119 | 4. Redistribution. You may reproduce and distribute copies of the 120 | Work or Derivative Works thereof in any medium, with or without 121 | modifications, and in Source or Object form, provided that You 122 | meet the following conditions: 123 | 124 | (a) You must give any other recipients of the Work or 125 | Derivative Works a copy of this License; and 126 | 127 | (b) You must cause any modified files to carry prominent notices 128 | stating that You changed the files; and 129 | 130 | (c) You must retain, in the Source form of any Derivative Works 131 | that You distribute, all copyright, patent, trademark, and 132 | attribution notices from the Source form of the Work, 133 | excluding those notices that do not pertain to any part of 134 | the Derivative Works; and 135 | 136 | (d) If the Work includes a "NOTICE" text file as part of its 137 | distribution, then any Derivative Works that You distribute must 138 | include a readable copy of the attribution notices contained 139 | within such NOTICE file, excluding those notices that do not 140 | pertain to any part of the Derivative Works, in at least one 141 | of the following places: within a NOTICE text file distributed 142 | as part of the Derivative Works; within the Source form or 143 | documentation, if provided along with the Derivative Works; or, 144 | within a display generated by the Derivative Works, if and 145 | wherever such third-party notices normally appear. The contents 146 | of the NOTICE file are for informational purposes only and 147 | do not modify the License. You may add Your own attribution 148 | notices within Derivative Works that You distribute, alongside 149 | or as an addendum to the NOTICE text from the Work, provided 150 | that such additional attribution notices cannot be construed 151 | as modifying the License. 152 | 153 | You may add Your own copyright statement to Your modifications and 154 | may provide additional or different license terms and conditions 155 | for use, reproduction, or distribution of Your modifications, or 156 | for any such Derivative Works as a whole, provided Your use, 157 | reproduction, and distribution of the Work otherwise complies with 158 | the conditions stated in this License. 159 | 160 | 5. Submission of Contributions. Unless You explicitly state otherwise, 161 | any Contribution intentionally submitted for inclusion in the Work 162 | by You to the Licensor shall be under the terms and conditions of 163 | this License, without any additional terms or conditions. 164 | Notwithstanding the above, nothing herein shall supersede or modify 165 | the terms of any separate license agreement you may have executed 166 | with Licensor regarding such Contributions. 167 | 168 | 6. Trademarks. This License does not grant permission to use the trade 169 | names, trademarks, service marks, or product names of the Licensor, 170 | except as required for reasonable and customary use in describing the 171 | origin of the Work and reproducing the content of the NOTICE file. 172 | 173 | 7. Disclaimer of Warranty. Unless required by applicable law or 174 | agreed to in writing, Licensor provides the Work (and each 175 | Contributor provides its Contributions) on an "AS IS" BASIS, 176 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 177 | implied, including, without limitation, any warranties or conditions 178 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 179 | PARTICULAR PURPOSE. You are solely responsible for determining the 180 | appropriateness of using or redistributing the Work and assume any 181 | risks associated with Your exercise of permissions under this License. 182 | 183 | 8. Limitation of Liability. In no event and under no legal theory, 184 | whether in tort (including negligence), contract, or otherwise, 185 | unless required by applicable law (such as deliberate and grossly 186 | negligent acts) or agreed to in writing, shall any Contributor be 187 | liable to You for damages, including any direct, indirect, special, 188 | incidental, or consequential damages of any character arising as a 189 | result of this License or out of the use or inability to use the 190 | Work (including but not limited to damages for loss of goodwill, 191 | work stoppage, computer failure or malfunction, or any and all 192 | other commercial damages or losses), even if such Contributor 193 | has been advised of the possibility of such damages. 194 | 195 | 9. Accepting Warranty or Additional Liability. While redistributing 196 | the Work or Derivative Works thereof, You may choose to offer, 197 | and charge a fee for, acceptance of support, warranty, indemnity, 198 | or other liability obligations and/or rights consistent with this 199 | License. However, in accepting such obligations, You may act only 200 | on Your own behalf and on Your sole responsibility, not on behalf 201 | of any other Contributor, and only if You agree to indemnify, 202 | defend, and hold each Contributor harmless for any liability 203 | incurred by, or claims asserted against, such Contributor by reason 204 | of your accepting any such warranty or additional liability. 205 | Generated by CocoaPods - https://cocoapods.org 206 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2019 marinbenc <marinbenc@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | Apache-2.0 39 | Title 40 | Scaledrone 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Apache License 47 | Version 2.0, January 2004 48 | http://www.apache.org/licenses/ 49 | 50 | Copyright (c) 2014-2016 Dalton Cherry. 51 | 52 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 53 | 54 | 1. Definitions. 55 | 56 | "License" shall mean the terms and conditions for use, reproduction, 57 | and distribution as defined by Sections 1 through 9 of this document. 58 | 59 | "Licensor" shall mean the copyright owner or entity authorized by 60 | the copyright owner that is granting the License. 61 | 62 | "Legal Entity" shall mean the union of the acting entity and all 63 | other entities that control, are controlled by, or are under common 64 | control with that entity. For the purposes of this definition, 65 | "control" means (i) the power, direct or indirect, to cause the 66 | direction or management of such entity, whether by contract or 67 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 68 | outstanding shares, or (iii) beneficial ownership of such entity. 69 | 70 | "You" (or "Your") shall mean an individual or Legal Entity 71 | exercising permissions granted by this License. 72 | 73 | "Source" form shall mean the preferred form for making modifications, 74 | including but not limited to software source code, documentation 75 | source, and configuration files. 76 | 77 | "Object" form shall mean any form resulting from mechanical 78 | transformation or translation of a Source form, including but 79 | not limited to compiled object code, generated documentation, 80 | and conversions to other media types. 81 | 82 | "Work" shall mean the work of authorship, whether in Source or 83 | Object form, made available under the License, as indicated by a 84 | copyright notice that is included in or attached to the work 85 | (an example is provided in the Appendix below). 86 | 87 | "Derivative Works" shall mean any work, whether in Source or Object 88 | form, that is based on (or derived from) the Work and for which the 89 | editorial revisions, annotations, elaborations, or other modifications 90 | represent, as a whole, an original work of authorship. For the purposes 91 | of this License, Derivative Works shall not include works that remain 92 | separable from, or merely link (or bind by name) to the interfaces of, 93 | the Work and Derivative Works thereof. 94 | 95 | "Contribution" shall mean any work of authorship, including 96 | the original version of the Work and any modifications or additions 97 | to that Work or Derivative Works thereof, that is intentionally 98 | submitted to Licensor for inclusion in the Work by the copyright owner 99 | or by an individual or Legal Entity authorized to submit on behalf of 100 | the copyright owner. For the purposes of this definition, "submitted" 101 | means any form of electronic, verbal, or written communication sent 102 | to the Licensor or its representatives, including but not limited to 103 | communication on electronic mailing lists, source code control systems, 104 | and issue tracking systems that are managed by, or on behalf of, the 105 | Licensor for the purpose of discussing and improving the Work, but 106 | excluding communication that is conspicuously marked or otherwise 107 | designated in writing by the copyright owner as "Not a Contribution." 108 | 109 | "Contributor" shall mean Licensor and any individual or Legal Entity 110 | on behalf of whom a Contribution has been received by Licensor and 111 | subsequently incorporated within the Work. 112 | 113 | 2. Grant of Copyright License. Subject to the terms and conditions of 114 | this License, each Contributor hereby grants to You a perpetual, 115 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 116 | copyright license to reproduce, prepare Derivative Works of, 117 | publicly display, publicly perform, sublicense, and distribute the 118 | Work and such Derivative Works in Source or Object form. 119 | 120 | 3. Grant of Patent License. Subject to the terms and conditions of 121 | this License, each Contributor hereby grants to You a perpetual, 122 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 123 | (except as stated in this section) patent license to make, have made, 124 | use, offer to sell, sell, import, and otherwise transfer the Work, 125 | where such license applies only to those patent claims licensable 126 | by such Contributor that are necessarily infringed by their 127 | Contribution(s) alone or by combination of their Contribution(s) 128 | with the Work to which such Contribution(s) was submitted. If You 129 | institute patent litigation against any entity (including a 130 | cross-claim or counterclaim in a lawsuit) alleging that the Work 131 | or a Contribution incorporated within the Work constitutes direct 132 | or contributory patent infringement, then any patent licenses 133 | granted to You under this License for that Work shall terminate 134 | as of the date such litigation is filed. 135 | 136 | 4. Redistribution. You may reproduce and distribute copies of the 137 | Work or Derivative Works thereof in any medium, with or without 138 | modifications, and in Source or Object form, provided that You 139 | meet the following conditions: 140 | 141 | (a) You must give any other recipients of the Work or 142 | Derivative Works a copy of this License; and 143 | 144 | (b) You must cause any modified files to carry prominent notices 145 | stating that You changed the files; and 146 | 147 | (c) You must retain, in the Source form of any Derivative Works 148 | that You distribute, all copyright, patent, trademark, and 149 | attribution notices from the Source form of the Work, 150 | excluding those notices that do not pertain to any part of 151 | the Derivative Works; and 152 | 153 | (d) If the Work includes a "NOTICE" text file as part of its 154 | distribution, then any Derivative Works that You distribute must 155 | include a readable copy of the attribution notices contained 156 | within such NOTICE file, excluding those notices that do not 157 | pertain to any part of the Derivative Works, in at least one 158 | of the following places: within a NOTICE text file distributed 159 | as part of the Derivative Works; within the Source form or 160 | documentation, if provided along with the Derivative Works; or, 161 | within a display generated by the Derivative Works, if and 162 | wherever such third-party notices normally appear. The contents 163 | of the NOTICE file are for informational purposes only and 164 | do not modify the License. You may add Your own attribution 165 | notices within Derivative Works that You distribute, alongside 166 | or as an addendum to the NOTICE text from the Work, provided 167 | that such additional attribution notices cannot be construed 168 | as modifying the License. 169 | 170 | You may add Your own copyright statement to Your modifications and 171 | may provide additional or different license terms and conditions 172 | for use, reproduction, or distribution of Your modifications, or 173 | for any such Derivative Works as a whole, provided Your use, 174 | reproduction, and distribution of the Work otherwise complies with 175 | the conditions stated in this License. 176 | 177 | 5. Submission of Contributions. Unless You explicitly state otherwise, 178 | any Contribution intentionally submitted for inclusion in the Work 179 | by You to the Licensor shall be under the terms and conditions of 180 | this License, without any additional terms or conditions. 181 | Notwithstanding the above, nothing herein shall supersede or modify 182 | the terms of any separate license agreement you may have executed 183 | with Licensor regarding such Contributions. 184 | 185 | 6. Trademarks. This License does not grant permission to use the trade 186 | names, trademarks, service marks, or product names of the Licensor, 187 | except as required for reasonable and customary use in describing the 188 | origin of the Work and reproducing the content of the NOTICE file. 189 | 190 | 7. Disclaimer of Warranty. Unless required by applicable law or 191 | agreed to in writing, Licensor provides the Work (and each 192 | Contributor provides its Contributions) on an "AS IS" BASIS, 193 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 194 | implied, including, without limitation, any warranties or conditions 195 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 196 | PARTICULAR PURPOSE. You are solely responsible for determining the 197 | appropriateness of using or redistributing the Work and assume any 198 | risks associated with Your exercise of permissions under this License. 199 | 200 | 8. Limitation of Liability. In no event and under no legal theory, 201 | whether in tort (including negligence), contract, or otherwise, 202 | unless required by applicable law (such as deliberate and grossly 203 | negligent acts) or agreed to in writing, shall any Contributor be 204 | liable to You for damages, including any direct, indirect, special, 205 | incidental, or consequential damages of any character arising as a 206 | result of this License or out of the use or inability to use the 207 | Work (including but not limited to damages for loss of goodwill, 208 | work stoppage, computer failure or malfunction, or any and all 209 | other commercial damages or losses), even if such Contributor 210 | has been advised of the possibility of such damages. 211 | 212 | 9. Accepting Warranty or Additional Liability. While redistributing 213 | the Work or Derivative Works thereof, You may choose to offer, 214 | and charge a fee for, acceptance of support, warranty, indemnity, 215 | or other liability obligations and/or rights consistent with this 216 | License. However, in accepting such obligations, You may act only 217 | on Your own behalf and on Your sole responsibility, not on behalf 218 | of any other Contributor, and only if You agree to indemnify, 219 | defend, and hold each Contributor harmless for any liability 220 | incurred by, or claims asserted against, such Contributor by reason 221 | of your accepting any such warranty or additional liability. 222 | License 223 | Apache License, Version 2.0 224 | Title 225 | Starscream 226 | Type 227 | PSGroupSpecifier 228 | 229 | 230 | FooterText 231 | Generated by CocoaPods - https://cocoapods.org 232 | Title 233 | 234 | Type 235 | PSGroupSpecifier 236 | 237 | 238 | StringsTable 239 | Acknowledgements 240 | Title 241 | Acknowledgements 242 | 243 | 244 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Scaledrone_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Scaledrone_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | 23 | # Used as a return value for each invocation of `strip_invalid_archs` function. 24 | STRIP_BINARY_RETVAL=0 25 | 26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 29 | 30 | # Copies and strips a vendored framework 31 | install_framework() 32 | { 33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 34 | local source="${BUILT_PRODUCTS_DIR}/$1" 35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 37 | elif [ -r "$1" ]; then 38 | local source="$1" 39 | fi 40 | 41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 42 | 43 | if [ -L "${source}" ]; then 44 | echo "Symlinked..." 45 | source="$(readlink "${source}")" 46 | fi 47 | 48 | # Use filter instead of exclude so missing patterns don't throw errors. 49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 51 | 52 | local basename 53 | basename="$(basename -s .framework "$1")" 54 | binary="${destination}/${basename}.framework/${basename}" 55 | 56 | if ! [ -r "$binary" ]; then 57 | binary="${destination}/${basename}" 58 | elif [ -L "${binary}" ]; then 59 | echo "Destination binary is symlinked..." 60 | dirname="$(dirname "${binary}")" 61 | binary="${dirname}/$(readlink "${binary}")" 62 | fi 63 | 64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 66 | strip_invalid_archs "$binary" 67 | fi 68 | 69 | # Resign the code if required by the build settings to avoid unstable apps 70 | code_sign_if_enabled "${destination}/$(basename "$1")" 71 | 72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 74 | local swift_runtime_libs 75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 76 | for lib in $swift_runtime_libs; do 77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 79 | code_sign_if_enabled "${destination}/${lib}" 80 | done 81 | fi 82 | } 83 | 84 | # Copies and strips a vendored dSYM 85 | install_dsym() { 86 | local source="$1" 87 | if [ -r "$source" ]; then 88 | # Copy the dSYM into a the targets temp dir. 89 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 90 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 91 | 92 | local basename 93 | basename="$(basename -s .framework.dSYM "$source")" 94 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 95 | 96 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 97 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 98 | strip_invalid_archs "$binary" 99 | fi 100 | 101 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 102 | # Move the stripped file into its final destination. 103 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 104 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 105 | else 106 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 107 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 108 | fi 109 | fi 110 | } 111 | 112 | # Copies the bcsymbolmap files of a vendored framework 113 | install_bcsymbolmap() { 114 | local bcsymbolmap_path="$1" 115 | local destination="${BUILT_PRODUCTS_DIR}" 116 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 117 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 118 | } 119 | 120 | # Signs a framework with the provided identity 121 | code_sign_if_enabled() { 122 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 123 | # Use the current code_sign_identity 124 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 125 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 126 | 127 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 128 | code_sign_cmd="$code_sign_cmd &" 129 | fi 130 | echo "$code_sign_cmd" 131 | eval "$code_sign_cmd" 132 | fi 133 | } 134 | 135 | # Strip invalid architectures 136 | strip_invalid_archs() { 137 | binary="$1" 138 | # Get architectures for current target binary 139 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 140 | # Intersect them with the architectures we are building for 141 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 142 | # If there are no archs supported by this binary then warn the user 143 | if [[ -z "$intersected_archs" ]]; then 144 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 145 | STRIP_BINARY_RETVAL=0 146 | return 147 | fi 148 | stripped="" 149 | for arch in $binary_archs; do 150 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 151 | # Strip non-valid architectures in-place 152 | lipo -remove "$arch" -output "$binary" "$binary" 153 | stripped="$stripped $arch" 154 | fi 155 | done 156 | if [[ "$stripped" ]]; then 157 | echo "Stripped $binary of architectures:$stripped" 158 | fi 159 | STRIP_BINARY_RETVAL=1 160 | } 161 | 162 | 163 | if [[ "$CONFIGURATION" == "Debug" ]]; then 164 | install_framework "${BUILT_PRODUCTS_DIR}/Scaledrone/Scaledrone.framework" 165 | install_framework "${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework" 166 | fi 167 | if [[ "$CONFIGURATION" == "Release" ]]; then 168 | install_framework "${BUILT_PRODUCTS_DIR}/Scaledrone/Scaledrone.framework" 169 | install_framework "${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework" 170 | fi 171 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 172 | wait 173 | fi 174 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Scaledrone_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Scaledrone_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Scaledrone" "${PODS_CONFIGURATION_BUILD_DIR}/Starscream" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Scaledrone/Scaledrone.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Starscream/Starscream.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Scaledrone" -framework "Starscream" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Scaledrone_Tests { 2 | umbrella header "Pods-Scaledrone_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Scaledrone" "${PODS_CONFIGURATION_BUILD_DIR}/Starscream" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Scaledrone/Scaledrone.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Starscream/Starscream.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Scaledrone" -framework "Starscream" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Scaledrone/Scaledrone-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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Scaledrone/Scaledrone-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Scaledrone : NSObject 3 | @end 4 | @implementation PodsDummy_Scaledrone 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Scaledrone/Scaledrone-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Scaledrone/Scaledrone-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double ScaledroneVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char ScaledroneVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Scaledrone/Scaledrone.modulemap: -------------------------------------------------------------------------------- 1 | framework module Scaledrone { 2 | umbrella header "Scaledrone-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Scaledrone/Scaledrone.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Scaledrone 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Starscream" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Starscream/Starscream-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 | 3.1.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Starscream/Starscream-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Starscream : NSObject 3 | @end 4 | @implementation PodsDummy_Starscream 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Starscream/Starscream-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Starscream/Starscream-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double StarscreamVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char StarscreamVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Starscream/Starscream.modulemap: -------------------------------------------------------------------------------- 1 | framework module Starscream { 2 | umbrella header "Starscream-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Starscream/Starscream.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Starscream 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Starscream 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Example/Scaledrone.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 11 | 642C0599CBEF79D4360F821C /* Pods_Scaledrone_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CEE77035C4A3A84BDDAB1E6 /* Pods_Scaledrone_Tests.framework */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 268C1D798F1A64A411CB7EC4 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 16 | 59595A49B95947AA802A8B99 /* Pods-Scaledrone_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Scaledrone_Tests.release.xcconfig"; path = "Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests.release.xcconfig"; sourceTree = ""; }; 17 | 607FACE51AFB9204008FA782 /* Scaledrone_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Scaledrone_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 19 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 20 | 8CEE77035C4A3A84BDDAB1E6 /* Pods_Scaledrone_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Scaledrone_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | A93EE81DB1C77813CC8EF421 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 22 | D5FB980C93B1ED2DB0390229 /* Scaledrone.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Scaledrone.podspec; path = ../Scaledrone.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 23 | D98F7DD9623AA0F5E92EE234 /* Pods-Scaledrone_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Scaledrone_Tests.debug.xcconfig"; path = "Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests.debug.xcconfig"; sourceTree = ""; }; 24 | /* End PBXFileReference section */ 25 | 26 | /* Begin PBXFrameworksBuildPhase section */ 27 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 28 | isa = PBXFrameworksBuildPhase; 29 | buildActionMask = 2147483647; 30 | files = ( 31 | 642C0599CBEF79D4360F821C /* Pods_Scaledrone_Tests.framework in Frameworks */, 32 | ); 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXFrameworksBuildPhase section */ 36 | 37 | /* Begin PBXGroup section */ 38 | 5A8C3FD54DA77751C5B6DC0A /* Frameworks */ = { 39 | isa = PBXGroup; 40 | children = ( 41 | 8CEE77035C4A3A84BDDAB1E6 /* Pods_Scaledrone_Tests.framework */, 42 | ); 43 | name = Frameworks; 44 | sourceTree = ""; 45 | }; 46 | 607FACC71AFB9204008FA782 = { 47 | isa = PBXGroup; 48 | children = ( 49 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 50 | 607FACE81AFB9204008FA782 /* Tests */, 51 | 607FACD11AFB9204008FA782 /* Products */, 52 | B17CED8C089BA0F30AEC80AB /* Pods */, 53 | 5A8C3FD54DA77751C5B6DC0A /* Frameworks */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 607FACD11AFB9204008FA782 /* Products */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 607FACE51AFB9204008FA782 /* Scaledrone_Tests.xctest */, 61 | ); 62 | name = Products; 63 | sourceTree = ""; 64 | }; 65 | 607FACE81AFB9204008FA782 /* Tests */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 69 | 607FACE91AFB9204008FA782 /* Supporting Files */, 70 | ); 71 | path = Tests; 72 | sourceTree = ""; 73 | }; 74 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 607FACEA1AFB9204008FA782 /* Info.plist */, 78 | ); 79 | name = "Supporting Files"; 80 | sourceTree = ""; 81 | }; 82 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | D5FB980C93B1ED2DB0390229 /* Scaledrone.podspec */, 86 | 268C1D798F1A64A411CB7EC4 /* README.md */, 87 | A93EE81DB1C77813CC8EF421 /* LICENSE */, 88 | ); 89 | name = "Podspec Metadata"; 90 | sourceTree = ""; 91 | }; 92 | B17CED8C089BA0F30AEC80AB /* Pods */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | D98F7DD9623AA0F5E92EE234 /* Pods-Scaledrone_Tests.debug.xcconfig */, 96 | 59595A49B95947AA802A8B99 /* Pods-Scaledrone_Tests.release.xcconfig */, 97 | ); 98 | path = Pods; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 607FACE41AFB9204008FA782 /* Scaledrone_Tests */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Scaledrone_Tests" */; 107 | buildPhases = ( 108 | C2E1CFDC9F96124A76C61DA8 /* [CP] Check Pods Manifest.lock */, 109 | 607FACE11AFB9204008FA782 /* Sources */, 110 | 607FACE21AFB9204008FA782 /* Frameworks */, 111 | 607FACE31AFB9204008FA782 /* Resources */, 112 | EFDD96794A710BB5FBB5158B /* [CP] Embed Pods Frameworks */, 113 | ); 114 | buildRules = ( 115 | ); 116 | dependencies = ( 117 | ); 118 | name = Scaledrone_Tests; 119 | productName = Tests; 120 | productReference = 607FACE51AFB9204008FA782 /* Scaledrone_Tests.xctest */; 121 | productType = "com.apple.product-type.bundle.unit-test"; 122 | }; 123 | /* End PBXNativeTarget section */ 124 | 125 | /* Begin PBXProject section */ 126 | 607FACC81AFB9204008FA782 /* Project object */ = { 127 | isa = PBXProject; 128 | attributes = { 129 | LastSwiftUpdateCheck = 0830; 130 | LastUpgradeCheck = 0830; 131 | ORGANIZATIONNAME = CocoaPods; 132 | TargetAttributes = { 133 | 607FACE41AFB9204008FA782 = { 134 | CreatedOnToolsVersion = 6.3.1; 135 | LastSwiftMigration = 0900; 136 | TestTargetID = 607FACCF1AFB9204008FA782; 137 | }; 138 | }; 139 | }; 140 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Scaledrone" */; 141 | compatibilityVersion = "Xcode 3.2"; 142 | developmentRegion = English; 143 | hasScannedForEncodings = 0; 144 | knownRegions = ( 145 | English, 146 | en, 147 | Base, 148 | ); 149 | mainGroup = 607FACC71AFB9204008FA782; 150 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 151 | projectDirPath = ""; 152 | projectRoot = ""; 153 | targets = ( 154 | 607FACE41AFB9204008FA782 /* Scaledrone_Tests */, 155 | ); 156 | }; 157 | /* End PBXProject section */ 158 | 159 | /* Begin PBXResourcesBuildPhase section */ 160 | 607FACE31AFB9204008FA782 /* Resources */ = { 161 | isa = PBXResourcesBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | ); 165 | runOnlyForDeploymentPostprocessing = 0; 166 | }; 167 | /* End PBXResourcesBuildPhase section */ 168 | 169 | /* Begin PBXShellScriptBuildPhase section */ 170 | C2E1CFDC9F96124A76C61DA8 /* [CP] Check Pods Manifest.lock */ = { 171 | isa = PBXShellScriptBuildPhase; 172 | buildActionMask = 2147483647; 173 | files = ( 174 | ); 175 | inputFileListPaths = ( 176 | ); 177 | inputPaths = ( 178 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 179 | "${PODS_ROOT}/Manifest.lock", 180 | ); 181 | name = "[CP] Check Pods Manifest.lock"; 182 | outputFileListPaths = ( 183 | ); 184 | outputPaths = ( 185 | "$(DERIVED_FILE_DIR)/Pods-Scaledrone_Tests-checkManifestLockResult.txt", 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | shellPath = /bin/sh; 189 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 190 | showEnvVarsInLog = 0; 191 | }; 192 | EFDD96794A710BB5FBB5158B /* [CP] Embed Pods Frameworks */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | "${PODS_ROOT}/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-frameworks.sh", 199 | "${BUILT_PRODUCTS_DIR}/Scaledrone/Scaledrone.framework", 200 | "${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework", 201 | ); 202 | name = "[CP] Embed Pods Frameworks"; 203 | outputPaths = ( 204 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Scaledrone.framework", 205 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Starscream.framework", 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | shellPath = /bin/sh; 209 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Scaledrone_Tests/Pods-Scaledrone_Tests-frameworks.sh\"\n"; 210 | showEnvVarsInLog = 0; 211 | }; 212 | /* End PBXShellScriptBuildPhase section */ 213 | 214 | /* Begin PBXSourcesBuildPhase section */ 215 | 607FACE11AFB9204008FA782 /* Sources */ = { 216 | isa = PBXSourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | /* End PBXSourcesBuildPhase section */ 224 | 225 | /* Begin XCBuildConfiguration section */ 226 | 607FACED1AFB9204008FA782 /* Debug */ = { 227 | isa = XCBuildConfiguration; 228 | buildSettings = { 229 | ALWAYS_SEARCH_USER_PATHS = NO; 230 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 231 | CLANG_CXX_LIBRARY = "libc++"; 232 | CLANG_ENABLE_MODULES = YES; 233 | CLANG_ENABLE_OBJC_ARC = YES; 234 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 235 | CLANG_WARN_BOOL_CONVERSION = YES; 236 | CLANG_WARN_COMMA = YES; 237 | CLANG_WARN_CONSTANT_CONVERSION = YES; 238 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 239 | CLANG_WARN_EMPTY_BODY = YES; 240 | CLANG_WARN_ENUM_CONVERSION = YES; 241 | CLANG_WARN_INFINITE_RECURSION = YES; 242 | CLANG_WARN_INT_CONVERSION = YES; 243 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 244 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 245 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 246 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 247 | CLANG_WARN_STRICT_PROTOTYPES = YES; 248 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 249 | CLANG_WARN_UNREACHABLE_CODE = YES; 250 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 251 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 252 | COPY_PHASE_STRIP = NO; 253 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 254 | ENABLE_STRICT_OBJC_MSGSEND = YES; 255 | ENABLE_TESTABILITY = YES; 256 | GCC_C_LANGUAGE_STANDARD = gnu99; 257 | GCC_DYNAMIC_NO_PIC = NO; 258 | GCC_NO_COMMON_BLOCKS = YES; 259 | GCC_OPTIMIZATION_LEVEL = 0; 260 | GCC_PREPROCESSOR_DEFINITIONS = ( 261 | "DEBUG=1", 262 | "$(inherited)", 263 | ); 264 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 265 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 266 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 267 | GCC_WARN_UNDECLARED_SELECTOR = YES; 268 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 269 | GCC_WARN_UNUSED_FUNCTION = YES; 270 | GCC_WARN_UNUSED_VARIABLE = YES; 271 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 272 | MTL_ENABLE_DEBUG_INFO = YES; 273 | ONLY_ACTIVE_ARCH = YES; 274 | SDKROOT = iphoneos; 275 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 276 | }; 277 | name = Debug; 278 | }; 279 | 607FACEE1AFB9204008FA782 /* Release */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ALWAYS_SEARCH_USER_PATHS = NO; 283 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 284 | CLANG_CXX_LIBRARY = "libc++"; 285 | CLANG_ENABLE_MODULES = YES; 286 | CLANG_ENABLE_OBJC_ARC = YES; 287 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 288 | CLANG_WARN_BOOL_CONVERSION = YES; 289 | CLANG_WARN_COMMA = YES; 290 | CLANG_WARN_CONSTANT_CONVERSION = YES; 291 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 292 | CLANG_WARN_EMPTY_BODY = YES; 293 | CLANG_WARN_ENUM_CONVERSION = YES; 294 | CLANG_WARN_INFINITE_RECURSION = YES; 295 | CLANG_WARN_INT_CONVERSION = YES; 296 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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[sdk=iphoneos*]" = "iPhone Developer"; 305 | COPY_PHASE_STRIP = NO; 306 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 307 | ENABLE_NS_ASSERTIONS = NO; 308 | ENABLE_STRICT_OBJC_MSGSEND = YES; 309 | GCC_C_LANGUAGE_STANDARD = gnu99; 310 | GCC_NO_COMMON_BLOCKS = YES; 311 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 312 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 313 | GCC_WARN_UNDECLARED_SELECTOR = YES; 314 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 315 | GCC_WARN_UNUSED_FUNCTION = YES; 316 | GCC_WARN_UNUSED_VARIABLE = YES; 317 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 318 | MTL_ENABLE_DEBUG_INFO = NO; 319 | SDKROOT = iphoneos; 320 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 321 | VALIDATE_PRODUCT = YES; 322 | }; 323 | name = Release; 324 | }; 325 | 607FACF31AFB9204008FA782 /* Debug */ = { 326 | isa = XCBuildConfiguration; 327 | baseConfigurationReference = D98F7DD9623AA0F5E92EE234 /* Pods-Scaledrone_Tests.debug.xcconfig */; 328 | buildSettings = { 329 | FRAMEWORK_SEARCH_PATHS = ( 330 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 331 | "$(inherited)", 332 | ); 333 | GCC_PREPROCESSOR_DEFINITIONS = ( 334 | "DEBUG=1", 335 | "$(inherited)", 336 | ); 337 | INFOPLIST_FILE = Tests/Info.plist; 338 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 339 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 340 | PRODUCT_NAME = "$(TARGET_NAME)"; 341 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 342 | SWIFT_VERSION = 4.0; 343 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Scaledrone_Example.app/Scaledrone_Example"; 344 | }; 345 | name = Debug; 346 | }; 347 | 607FACF41AFB9204008FA782 /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | baseConfigurationReference = 59595A49B95947AA802A8B99 /* Pods-Scaledrone_Tests.release.xcconfig */; 350 | buildSettings = { 351 | FRAMEWORK_SEARCH_PATHS = ( 352 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 353 | "$(inherited)", 354 | ); 355 | INFOPLIST_FILE = Tests/Info.plist; 356 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 357 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 358 | PRODUCT_NAME = "$(TARGET_NAME)"; 359 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 360 | SWIFT_VERSION = 4.0; 361 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Scaledrone_Example.app/Scaledrone_Example"; 362 | }; 363 | name = Release; 364 | }; 365 | /* End XCBuildConfiguration section */ 366 | 367 | /* Begin XCConfigurationList section */ 368 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Scaledrone" */ = { 369 | isa = XCConfigurationList; 370 | buildConfigurations = ( 371 | 607FACED1AFB9204008FA782 /* Debug */, 372 | 607FACEE1AFB9204008FA782 /* Release */, 373 | ); 374 | defaultConfigurationIsVisible = 0; 375 | defaultConfigurationName = Release; 376 | }; 377 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Scaledrone_Tests" */ = { 378 | isa = XCConfigurationList; 379 | buildConfigurations = ( 380 | 607FACF31AFB9204008FA782 /* Debug */, 381 | 607FACF41AFB9204008FA782 /* Release */, 382 | ); 383 | defaultConfigurationIsVisible = 0; 384 | defaultConfigurationName = Release; 385 | }; 386 | /* End XCConfigurationList section */ 387 | }; 388 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 389 | } 390 | -------------------------------------------------------------------------------- /Example/Scaledrone.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Scaledrone.xcodeproj/xcshareddata/xcschemes/Scaledrone-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 80 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | 99 | 101 | 107 | 108 | 109 | 110 | 112 | 113 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Example/Scaledrone.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Scaledrone.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Tests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Scaledrone 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testExample() { 17 | // This is an example of a functional test case. 18 | XCTAssert(true, "Pass") 19 | } 20 | 21 | func testPerformanceExample() { 22 | // This is an example of a performance test case. 23 | self.measure() { 24 | // Put the code you want to measure the time of here. 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 marinbenc 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "Starscream", 6 | "repositoryURL": "https://github.com/daltoniam/Starscream.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "e6b65c6d9077ea48b4a7bdda8994a1d3c6969c8d", 10 | "version": "3.1.1" 11 | } 12 | }, 13 | { 14 | "package": "swift-nio-zlib-support", 15 | "repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "37760e9a52030bb9011972c5213c3350fa9d41fd", 19 | "version": "1.0.0" 20 | } 21 | } 22 | ] 23 | }, 24 | "version": 1 25 | } 26 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "Scaledrone", 8 | platforms: [ 9 | .macOS(.v10_10), 10 | .iOS(.v9), 11 | .tvOS(.v9) 12 | ], 13 | products: [ 14 | .library( 15 | name: "Scaledrone", 16 | targets: ["Scaledrone"]), 17 | ], 18 | dependencies: [ 19 | .package(url: "https://github.com/daltoniam/Starscream.git", from: "3.1.1") 20 | ], 21 | targets: [ 22 | .target(name: "Scaledrone", 23 | dependencies: [.product(name: "Starscream", package: "Starscream")]), 24 | ], 25 | swiftLanguageVersions: [.v5] 26 | ) 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Scaledrone](https://www.scaledrone.com/) Swift 2 | 3 | > Use the Scaledrone Swift client to connect to the Scaledrone realtime messaging service 4 | 5 | This project is still a work in progress, pull requests and issues are very welcome. 6 | 7 | 8 | ## Installation 9 | 10 | ### CocoaPods 11 | 12 | Check out [Get Started](http://cocoapods.org/) tab on [cocoapods.org](http://cocoapods.org/). 13 | 14 | To use Scaledrone in your project add the following 'Podfile' to your project 15 | 16 | ```ruby 17 | pod 'Scaledrone', '~> 0.5.2' 18 | ``` 19 | 20 | Then run: 21 | ``` 22 | pod install 23 | ``` 24 | 25 | ### Carthage 26 | 27 | Check out [the Carthage Quick Start instructions](https://github.com/Carthage/Carthage#quick-start). 28 | 29 | To use Scaledrone with Carthage, add the following to your Cartfile: 30 | 31 | ```ruby 32 | github "ScaleDrone/Scaledrone-Swift" 33 | ``` 34 | 35 | Then run: 36 | 37 | ``` 38 | carthage update 39 | ``` 40 | 41 | After that, follow the [instructions on Carthage's docs](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). 42 | 43 | ### Swift Package Manager 44 | 45 | [Use Xcode to add this repo as a package.](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app) Search for `https://github.com/ScaleDrone/Scaledrone-Swift`. 46 | 47 | ## Usage 48 | 49 | First thing is to import the framework. See the Installation instructions on how to add the framework to your project. 50 | 51 | ```swift 52 | import Scaledrone 53 | ``` 54 | 55 | Once imported, you can connect to Scaledrone. 56 | 57 | ```swift 58 | scaledrone = Scaledrone(channelID: "your-channel-id") 59 | scaledrone.delegate = self 60 | scaledrone.connect() 61 | ``` 62 | 63 | After you are connected, there are some delegate methods that we need to implement. 64 | 65 | #### scaledroneDidConnect 66 | 67 | ```swift 68 | func scaledroneDidConnect(scaledrone: Scaledrone, error: Error?) { 69 | print("Connected to Scaledrone") 70 | } 71 | ``` 72 | 73 | #### scaledroneDidReceiveError 74 | 75 | ```swift 76 | func scaledroneDidReceiveError(scaledrone: Scaledrone, error: Error?) { 77 | print("Scaledrone error", error ?? "") 78 | } 79 | ``` 80 | 81 | #### scaledroneDidDisconnect 82 | 83 | ```swift 84 | func scaledroneDidDisconnect(scaledrone: Scaledrone, error: Error?) { 85 | print("Scaledrone disconnected", error ?? "") 86 | } 87 | ``` 88 | 89 | ## Authentication 90 | 91 | Implement the **`ScaledroneAuthenticateDelegate`** protocol and set an additional delegate 92 | ```swift 93 | scaledrone.authenticateDelegate = self 94 | ``` 95 | 96 | Then use the authenticate method to authenticate using a JWT 97 | 98 | ```swift 99 | scaledrone.authenticate(jwt: "jwt_string") 100 | ``` 101 | 102 | #### scaledroneDidAuthenticate 103 | 104 | ```swift 105 | func scaledroneDidAuthenticate(scaledrone: Scaledrone, error: Error?) { 106 | print("Scaledrone authenticated", error ?? "") 107 | } 108 | ``` 109 | 110 | ## Sending messages 111 | 112 | ```swift 113 | scaledrone.publish(message: "Hello from Swift", room: "myroom") 114 | // Or 115 | room.publish(message: ["foo": "bar", "1": 2]) 116 | ``` 117 | 118 | ## Subscribing to messages 119 | 120 | Subscribe to a room and implement the **`ScaledroneRoomDelegate`** protocol, then set additional delegation 121 | 122 | ```swift 123 | let room = scaledrone.subscribe(roomName: "myroom") 124 | room.delegate = self 125 | ``` 126 | 127 | #### scaledroneRoomDidConnect 128 | 129 | ```swift 130 | func scaledroneRoomDidConnect(room: ScaledroneRoom, error: Error?) { 131 | print("Scaledrone connected to room", room.name, error ?? "") 132 | } 133 | ``` 134 | 135 | #### scaledroneRoomDidReceiveMessage 136 | 137 | The `member` argument exists when the message was sent to an [observable room](#observable-rooms) using the socket API (not the REST API). 138 | 139 | ```swift 140 | func scaledroneRoomDidReceiveMessage(room: ScaledroneRoom, message: ScaledroneMessage) { 141 | if message.member != nil { 142 | // This message was sent to an observable room 143 | // This message was sent through the socket API, not the REST API 144 | print("Received message from member:", message.memberID as Any) 145 | } 146 | 147 | let data = message.data 148 | 149 | if let messageData = data as? [String: Any] { 150 | print("Received a dictionary:", messageData) 151 | } 152 | if let messageData = data as? [Any] { 153 | print("Received an array:", messageData) 154 | } 155 | if let messageData = data as? String { 156 | print("Received a string:", messageData) 157 | } 158 | } 159 | ``` 160 | 161 | ## Observable rooms 162 | 163 | Observable rooms act like regular rooms but provide additional functionality for keeping track of connected members and linking messages to members. 164 | 165 | ### Adding data to the member object 166 | 167 | Observable rooms allow adding custom data to a connected user. The data can be added in two ways: 168 | 169 | 1. Passing the data object to a new instance of Scaledrone in your Swift code. 170 | ```swift 171 | let scaledrone = Scaledrone(channelID: "", data: ["name": "Swift", "color": "#ff0000"]) 172 | ``` 173 | This data can later be accessed like so: 174 | ```swift 175 | func scaledroneObservableRoomMemberDidJoin(room: ScaledroneRoom, member: ScaledroneMember) { 176 | print("member joined with clientData", member.clientData) 177 | } 178 | ``` 179 | 180 | 2. Adding the data to the JSON Web Token as the `data` clause during [authentication](https://www.scaledrone.com/docs/jwt-authentication). This method is safer as the user has no way of changing the data on the client side. 181 | ```json 182 | { 183 | "client": "client_id_sent_from_javascript_client", 184 | "channel": "channel_id", 185 | "data": { 186 | "name": "Swift", 187 | "color": "#ff0000" 188 | }, 189 | "permissions": { 190 | "^main-room$": { 191 | "publish": false, 192 | "subscribe": false 193 | } 194 | }, 195 | "exp": 1408639878000 196 | } 197 | ``` 198 | This data can later be accessed like so: 199 | ```swift 200 | func scaledroneObservableRoomMemberDidJoin(room: ScaledroneRoom, member: ScaledroneMember) { 201 | print("member joined with authData", member.authData) 202 | } 203 | ``` 204 | 205 | ### Receiving the observable events 206 | 207 | Implement the **`ScaledroneObservableRoomDelegate`** protocol, then set additional delegation. 208 | 209 | > Observable room names need to be prefixed with *observable-* 210 | 211 | ```swift 212 | let room = scaledrone.subscribe(roomName: "observable-room") 213 | room.delegate = self 214 | room.observableDelegate = self 215 | ``` 216 | 217 | #### scaledroneObservableRoomDidConnect 218 | ```swift 219 | func scaledroneObservableRoomDidConnect(room: ScaledroneRoom, members: [ScaledroneMember]) { 220 | // The list will contain yourself 221 | print(members.map { (m: ScaledroneMember) -> String in 222 | return m.id 223 | }) 224 | } 225 | ``` 226 | 227 | #### scaledroneObservableRoomMemberDidJoin 228 | ```swift 229 | func scaledroneObservableRoomMemberDidJoin(room: ScaledroneRoom, member: ScaledroneMember) { 230 | print("member joined", member, member.id) 231 | } 232 | ``` 233 | 234 | #### scaledroneObservableRoomMemberDidLeave 235 | ```swift 236 | func scaledroneObservableRoomMemberDidLeave(room: ScaledroneRoom, member: ScaledroneMember) { 237 | print("member left", member, member.id) 238 | } 239 | ``` 240 | 241 | ## Message History 242 | 243 | When creating a Scaledrone room you can supply the number of messages to recieve from that room's history. The messages will arrive, in reverse chronological order and one by one, in `scaledroneRoomDidReceiveMessage`, just like real-time messages. 244 | 245 | In order to recieve message history messages, this feature needs to be enabled in the [Scaledrone dashboard](http://dashboard.scaledrone.com). You can learn more about Message History and its limitations in [Scaledrone docs](https://www.scaledrone.com/docs/message-history). 246 | 247 | ``` 248 | let room = scaledrone.subscribe(roomName: "chat-room", messageHistory: 50) 249 | ``` 250 | 251 | 252 | ## Basic Example 253 | ```swift 254 | import UIKit 255 | 256 | class ViewController: UIViewController, ScaledroneDelegate, ScaledroneRoomDelegate { 257 | 258 | let scaledrone = Scaledrone(channelID: "your-channel-id") 259 | 260 | override func viewDidLoad() { 261 | super.viewDidLoad() 262 | scaledrone.delegate = self 263 | scaledrone.connect() 264 | } 265 | 266 | func scaledroneDidConnect(scaledrone: Scaledrone, error: Error?) { 267 | print("Connected to Scaledrone channel", scaledrone.clientID) 268 | let room = scaledrone.subscribe(roomName: "notifications") 269 | room.delegate = self 270 | } 271 | 272 | func scaledroneDidReceiveError(scaledrone: Scaledrone, error: Error?) { 273 | print("Scaledrone error") 274 | } 275 | 276 | func scaledroneDidDisconnect(scaledrone: Scaledrone, error: Error?) { 277 | print("Scaledrone disconnected") 278 | } 279 | 280 | func scaledroneRoomDidConnect(room: ScaledroneRoom, error: Error?) { 281 | print("Scaledrone connected to room", room.name) 282 | } 283 | 284 | func scaledroneRoomDidReceiveMessage(room: ScaledroneRoom, message: String) { 285 | print("Room received message:", message) 286 | } 287 | } 288 | ``` 289 | 290 | For a longer example see the `ViewController.swift` file. 291 | 292 | ## Migration notes 293 | 294 | ### 0.5.0 295 | 296 | Scaledrone 0.5.0 removes the use of `NSError` in favor of `Error` in the delegate methods, and adds support for Swift 5. 297 | 298 | ### 0.5.2: 299 | 300 | `scaledroneRoomDidReceiveMessage(room:message:member)` was renamed to `scaledroneRoomDidReceiveMessage(room:message:)` and `message` is now of type `ScaledroneMessage` which includes the member and message IDs, the message's time as well as the data that was sent. 301 | 302 | ## Todo: 303 | 304 | * Automatic reconnection 305 | -------------------------------------------------------------------------------- /Scaledrone.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Scaledrone' 3 | s.version = '0.5.3' 4 | s.summary = 'Scaledrone Swift Client' 5 | s.homepage = 'https://github.com/scaledrone/scaledrone-swift' 6 | s.license = 'Apache-2.0' 7 | s.author = { "Scaledrone" => "info@scaledrone.com" } 8 | s.requires_arc = true 9 | s.source = { git: "https://github.com/scaledrone/Scaledrone-Swift.git", :tag => "0.5.3" } 10 | s.swift_version = '5.0' 11 | 12 | s.ios.deployment_target = '8.0' 13 | s.osx.deployment_target = '10.10' 14 | s.tvos.deployment_target = '9.0' 15 | 16 | s.source_files = 'Sources/Scaledrone/Classes/**/*' 17 | s.dependency "Starscream", "~> 3.1.1" 18 | 19 | end 20 | -------------------------------------------------------------------------------- /Sources/Scaledrone/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScaleDrone/Scaledrone-Swift/f94346fef8ededa037a1fbc0d86da2ff28d4193b/Sources/Scaledrone/Assets/.gitkeep -------------------------------------------------------------------------------- /Sources/Scaledrone/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScaleDrone/Scaledrone-Swift/f94346fef8ededa037a1fbc0d86da2ff28d4193b/Sources/Scaledrone/Classes/.gitkeep -------------------------------------------------------------------------------- /Sources/Scaledrone/Classes/Scaledrone.swift: -------------------------------------------------------------------------------- 1 | import Starscream 2 | import Foundation 3 | 4 | public protocol ScaledroneDelegate: class { 5 | func scaledroneDidConnect(scaledrone: Scaledrone, error: Error?) 6 | func scaledroneDidReceiveError(scaledrone: Scaledrone, error: Error?) 7 | func scaledroneDidDisconnect(scaledrone: Scaledrone, error: Error?) 8 | } 9 | 10 | public protocol ScaledroneAuthenticateDelegate: class { 11 | func scaledroneDidAuthenticate(scaledrone: Scaledrone, error: Error?) 12 | } 13 | 14 | public protocol ScaledroneRoomDelegate: class { 15 | func scaledroneRoomDidConnect(room: ScaledroneRoom, error: Error?) 16 | func scaledroneRoomDidReceiveMessage(room: ScaledroneRoom, message: ScaledroneMessage) 17 | } 18 | 19 | public protocol ScaledroneObservableRoomDelegate: class { 20 | func scaledroneObservableRoomDidConnect(room: ScaledroneRoom, members: [ScaledroneMember]) 21 | func scaledroneObservableRoomMemberDidJoin(room: ScaledroneRoom, member: ScaledroneMember) 22 | func scaledroneObservableRoomMemberDidLeave(room: ScaledroneRoom, member: ScaledroneMember) 23 | } 24 | 25 | public class Scaledrone: WebSocketDelegate { 26 | 27 | private typealias Callback = ([String:Any]) -> Void 28 | 29 | private let socket: WebSocket 30 | private var callbacks: [Int: Callback] = [:] 31 | private var callbackId: Int = 0 32 | private var rooms: [String: ScaledroneRoom] = [:] 33 | private let channelID: String 34 | private var data: Any? 35 | public var clientID: String = "" 36 | 37 | private typealias RoomName = String 38 | private var nextHistoryIndex: [RoomName: Int] = [:] 39 | private var pendingHistoryMessages: [RoomName: [[String: Any]]] = [:] 40 | 41 | public weak var delegate: ScaledroneDelegate? 42 | public weak var authenticateDelegate: ScaledroneAuthenticateDelegate? 43 | 44 | public init(channelID: String, url: String? = "wss://api.scaledrone.com/v3/websocket", data: Any?) { 45 | self.channelID = channelID 46 | self.data = data 47 | socket = WebSocket(url: URL(string: url!)!) 48 | } 49 | 50 | private func createCallback(fn: @escaping Callback) -> Int { 51 | callbackId += 1 52 | callbacks[callbackId] = fn 53 | return callbackId 54 | } 55 | 56 | public func connect() { 57 | socket.delegate = self 58 | socket.connect() 59 | } 60 | 61 | public func authenticate(jwt: String) { 62 | let msg = [ 63 | "type": "authenticate", 64 | "token": jwt, 65 | "callback": createCallback(fn: { data in 66 | self.authenticateDelegate?.scaledroneDidAuthenticate(scaledrone: self, error: data["error"] as? NSError) 67 | }) 68 | ] as [String : Any] 69 | self.send(msg) 70 | } 71 | 72 | public func publish(message: Any, room: String) { 73 | let msg = [ 74 | "type": "publish", 75 | "room": room, 76 | "message": message, 77 | ] as [String : Any] 78 | self.send(msg) 79 | } 80 | 81 | // MARK: Websocket Delegate Methods. 82 | 83 | public func websocketDidConnect(socket: WebSocketClient) { 84 | var msg = [ 85 | "type": "handshake", 86 | "channel": self.channelID, 87 | "callback": createCallback(fn: { data in 88 | self.clientID = data["client_id"] as! String 89 | self.delegate?.scaledroneDidConnect(scaledrone: self, error: data["error"] as? NSError) 90 | }) 91 | ] as [String : Any] 92 | if (self.data != nil) { 93 | msg["client_data"] = self.data 94 | } 95 | self.send(msg) 96 | } 97 | 98 | public func websocketDidDisconnect(socket: WebSocketClient, error: Error?) { 99 | delegate?.scaledroneDidDisconnect(scaledrone: self, error: error) 100 | } 101 | 102 | public func websocketDidReceiveMessage(socket: WebSocketClient, text: String) { 103 | var dic = convertJSONMessageToDictionary(text: text) 104 | 105 | if let error = dic["error"] as? String { 106 | dic["error"] = NSError(domain: "scaledrone.com", code: 0, userInfo: ["error": error]) 107 | } 108 | 109 | if let cb = dic["callback"] as? Int { 110 | if let fn = callbacks[cb] { 111 | fn(dic) 112 | } 113 | return 114 | } 115 | 116 | if let error = dic["error"] as? NSError { 117 | delegate?.scaledroneDidReceiveError(scaledrone: self, error: error) 118 | return 119 | } 120 | 121 | 122 | if let type = dic["type"] as? String { 123 | if let roomName = dic["room"] as? String { 124 | if let room = rooms[roomName] as ScaledroneRoom? { 125 | switch type { 126 | case "publish": 127 | delegatePublishMessage(room: room, messageDic: dic) 128 | case "observable_members": 129 | let members = convertAnyToMembers(any: dic["data"]) 130 | room.members = members 131 | room.observableDelegate?.scaledroneObservableRoomDidConnect(room: room, members: members) 132 | case "observable_member_join": 133 | let member = convertAnyToMember(any: dic["data"]) 134 | room.members.append(member) 135 | room.observableDelegate?.scaledroneObservableRoomMemberDidJoin(room: room, member: member) 136 | case "observable_member_leave": 137 | let member = convertAnyToMember(any: dic["data"]) 138 | room.members = room.members.filter { $0.id != member.id } 139 | room.observableDelegate?.scaledroneObservableRoomMemberDidLeave(room: room, member: member) 140 | case "history_message": 141 | handleHistoryMessage(room: room, messageDic: dic) 142 | default: break 143 | } 144 | } 145 | } 146 | } 147 | } 148 | 149 | /// Notifies the delegate of new message history type messages in their correct order. 150 | private func handleHistoryMessage(room: ScaledroneRoom, messageDic: [String: Any]) { 151 | guard pendingHistoryMessages[room.name] != nil && 152 | nextHistoryIndex[room.name] != nil else { 153 | return 154 | } 155 | 156 | pendingHistoryMessages[room.name]?.append(messageDic) 157 | 158 | func findPendingMessage(withIndex index: Int)-> Int? { 159 | let pendingMessages = pendingHistoryMessages[room.name]! 160 | return pendingMessages.firstIndex(where: { messageDic in 161 | messageDic["index"] as? Int == index 162 | }) 163 | } 164 | 165 | while let pendingIndex = findPendingMessage(withIndex: nextHistoryIndex[room.name]!) { 166 | nextHistoryIndex[room.name]! += 1 167 | let pending = pendingHistoryMessages[room.name]!.remove(at: pendingIndex) 168 | delegatePublishMessage(room: room, messageDic: pending) 169 | } 170 | } 171 | 172 | /// Notifies the delegate of a newly arrived publish type message. 173 | private func delegatePublishMessage(room: ScaledroneRoom, messageDic: [String: Any]) { 174 | var member: ScaledroneMember? 175 | if let clientID = messageDic["client_id"] as? String { 176 | member = room.members.first(where: { $0.id == clientID }) 177 | } 178 | 179 | var time: Date? 180 | if let timestamp = messageDic["timestamp"] as? Int { 181 | time = Date(timeIntervalSince1970: TimeInterval(timestamp)) 182 | } 183 | 184 | let message = ScaledroneMessage( 185 | data: messageDic["message"] as Any, 186 | memberID: messageDic["client_id"] as? String, 187 | time: time, 188 | member: member, 189 | messageID: messageDic["id"] as? String) 190 | 191 | room.delegate?.scaledroneRoomDidReceiveMessage(room: room, message: message) 192 | } 193 | 194 | public func websocketDidReceiveData(socket: WebSocketClient, data: Data) { 195 | print("Should not have received any data: \(data.count)") 196 | } 197 | 198 | private func send(_ value: Any) { 199 | guard JSONSerialization.isValidJSONObject(value) else { 200 | print("[WEBSOCKET] Value is not a valid JSON object.\n \(value)") 201 | return 202 | } 203 | 204 | do { 205 | let data = try JSONSerialization.data(withJSONObject: value, options: []) 206 | socket.write(data: data) 207 | } catch let error { 208 | print("[WEBSOCKET] Error serializing JSON:\n\(error)") 209 | } 210 | } 211 | 212 | public func subscribe(roomName: String, messageHistory: Int = 0) -> ScaledroneRoom { 213 | let room = ScaledroneRoom(name: roomName, scaledrone: self) 214 | rooms[roomName] = room 215 | 216 | let msg = [ 217 | "type": "subscribe", 218 | "room": roomName, 219 | "callback": createCallback(fn: { data in 220 | room.delegate?.scaledroneRoomDidConnect(room: room, error: nil) 221 | }), 222 | "history_count": messageHistory, 223 | "history": messageHistory 224 | ] as [String : Any] 225 | self.send(msg) 226 | 227 | if messageHistory > 0 { 228 | nextHistoryIndex[room.name] = 0 229 | pendingHistoryMessages[room.name] = [] 230 | } 231 | 232 | return room 233 | } 234 | 235 | public func disconnect() { 236 | socket.disconnect() 237 | } 238 | 239 | } 240 | 241 | public class ScaledroneRoom { 242 | 243 | public let name: String 244 | public let scaledrone: Scaledrone 245 | public var members: [ScaledroneMember] 246 | 247 | public weak var delegate: ScaledroneRoomDelegate? 248 | public weak var observableDelegate: ScaledroneObservableRoomDelegate? 249 | 250 | init(name: String, scaledrone: Scaledrone) { 251 | self.name = name 252 | self.scaledrone = scaledrone 253 | self.members = [] 254 | } 255 | 256 | public func publish(message: Any) { 257 | scaledrone.publish(message: message, room: self.name) 258 | } 259 | 260 | } 261 | 262 | public class ScaledroneMember { 263 | public let id: String 264 | public let authData: Any? 265 | public let clientData: Any? 266 | 267 | init(id: String, authData: Any?, clientData: Any?) { 268 | self.id = id 269 | self.authData = authData 270 | self.clientData = clientData 271 | } 272 | 273 | public var description: String { 274 | return "Member: \(id) authData: \(authData ?? "nil") clientData: \(clientData ?? "nil")" 275 | } 276 | } 277 | 278 | public struct ScaledroneMessage { 279 | public let data: Any 280 | public let memberID: String? 281 | public let time: Date? 282 | public let member: ScaledroneMember? 283 | public let messageID: String? 284 | } 285 | 286 | func convertJSONMessageToDictionary(text: String) -> [String: Any] { 287 | if let message = text.data(using: .utf8) { 288 | do { 289 | var json = try JSONSerialization.jsonObject(with: message, options: []) as! [String: Any] 290 | if let data = json["data"] as? [[String: Any]] { 291 | json["data"] = data 292 | } 293 | return json 294 | } catch { 295 | print(error.localizedDescription) 296 | } 297 | } 298 | return [:] 299 | } 300 | 301 | func convertAnyToMember(any: Any?) -> ScaledroneMember { 302 | let dic = any as! [String : Any] 303 | return ScaledroneMember(id: dic["id"] as! String, authData: dic["authData"], clientData: dic["clientData"]) 304 | } 305 | 306 | func convertAnyToMembers(any: Any?) -> [ScaledroneMember] { 307 | let list = any as! [Any] 308 | return list.map({ 309 | (value: Any) -> ScaledroneMember in return convertAnyToMember(any: value) 310 | }) 311 | } 312 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------