diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/SignalRSwift.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/SignalRSwift.xcscheme new file mode 100644 index 0000000..30e9ab6 --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/SignalRSwift.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..4b55ef6 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire", + "state" : { + "revision" : "8dd85aee02e39dd280c75eef88ffdb86eed4b07b", + "version" : "5.6.2" + } + }, + { + "identity" : "starscream", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kamrankhan07/Starscream", + "state" : { + "revision" : "0cf71ccdb201271ee706b91ff9c5234c1da29b08", + "version" : "4.0.5" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..a8328e2 --- /dev/null +++ b/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version: 5.5 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "SignalRSwift", + platforms: [.macOS(.v10_13), + .iOS(.v11), + .tvOS(.v11), + .watchOS(.v4)], + products: [ + .library( + name: "SignalRSwift", + targets: ["SignalRSwift"]), + ], + dependencies: [ + .package(url: "https://github.com/Alamofire/Alamofire", from: "5.6.2"), + .package(url: "https://github.com/kamrankhan07/Starscream", from: "4.0.5"), + ], + targets: [ + .target( + name: "SignalRSwift", + dependencies: ["Alamofire", "Starscream"], + path: "SignalR-Swift", + exclude: ["Info.plist"]) + ], + swiftLanguageVersions: [.v5] +) diff --git a/Podfile b/Podfile index e568f69..130fc53 100644 --- a/Podfile +++ b/Podfile @@ -1,30 +1,20 @@ # Uncomment the next line to define a global platform for your project -platform :ios, '10.3' +platform :ios, '10.0' target 'SignalRSwift' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for SignalR-Swift - pod 'Alamofire', '~> 4.2' - pod 'Starscream', '~> 3.0' + pod 'Alamofire', '~> 5.6.2' + pod 'Starscream', :git => 'https://github.com/kamrankhan07/Starscream.git' target 'SignalR-SwiftTests' do inherit! :search_paths # Pods for testing pod 'Quick' pod 'Nimble' - pod 'Mockit', '~> 1.3' + pod 'Mockit' end end - -post_install do |installer| - installer.pods_project.targets.each do |target| - if target.name == 'Mockit' - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '3.2' - end - end - end -end \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock index 7110e54..8216d12 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,24 +1,40 @@ PODS: - - Alamofire (4.6.0) - - Mockit (1.3.4) - - Nimble (7.0.3) - - Quick (1.2.0) - - Starscream (3.0.3) + - Alamofire (5.4.4) + - Mockit (1.5.0) + - Nimble (9.2.1) + - Quick (4.0.0) + - Starscream (4.0.4.1) DEPENDENCIES: - - Alamofire (~> 4.2) - - Mockit (~> 1.3) + - Alamofire + - Mockit - Nimble - Quick - - Starscream (~> 3.0) + - Starscream (from `https://github.com/kamrankhan07/Starscream.git`) + +SPEC REPOS: + trunk: + - Alamofire + - Mockit + - Nimble + - Quick + +EXTERNAL SOURCES: + Starscream: + :git: https://github.com/kamrankhan07/Starscream.git + +CHECKOUT OPTIONS: + Starscream: + :commit: 99bc549b6e2c3d7ddc6ccb7ca0aecaff8b745a6c + :git: https://github.com/kamrankhan07/Starscream.git SPEC CHECKSUMS: - Alamofire: f41a599bd63041760b26d393ec1069d9d7b917f4 - Mockit: 1b253f229dde898b268f8bd5dffcf2fd0151ff75 - Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac - Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08 - Starscream: dfb1b3f39506717ee52b67fb48de0c8269504cbc + Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9 + Mockit: 09492d654a2945096603d76ea77b131bdcfb2233 + Nimble: e7e615c0335ee4bf5b0d786685451e62746117d5 + Quick: 6473349e43b9271a8d43839d9ba1c442ed1b7ac4 + Starscream: 88daa4735c36fd75a3e609af08ca5081f0f2c377 -PODFILE CHECKSUM: 79d0be02a68490c1ac445f39448ee90e8f37cad7 +PODFILE CHECKSUM: 54cea80c0b7fcd8f0543026a052ccbd7d232a0d1 -COCOAPODS: 1.3.1 +COCOAPODS: 1.11.2 diff --git a/README.md b/README.md index 4722aa9..b224882 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,14 @@ $ gem install cocoapods To integrate SignalR-Swift into your Xcode project using CocoaPods, specify it in your Podfile: ``` -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' +source 'https://github.com/kamrankhan07/SignalR-Swift.git' +platform :ios, '9.0' (2.1.6) +pod 'SignalRSwift', :git => 'https://github.com/kamrankhan07/SignalR-Swift.git', :tag => '2.1.6' -pod 'SignalRSwift', '~> 2.0.2' + +platform :ios, '10.0' (onwards) +pod 'Starscream', :git => 'https://github.com/kamrankhan07/Starscream' +pod 'SignalRSwift', :git => 'https://github.com/kamrankhan07/SignalR-Swift.git' ``` Then, run the following command: diff --git a/SignalR-Swift-Example/Podfile b/SignalR-Swift-Example/Podfile index aa850b5..cddd0b3 100644 --- a/SignalR-Swift-Example/Podfile +++ b/SignalR-Swift-Example/Podfile @@ -1,5 +1,5 @@ # Uncomment the next line to define a global platform for your project -platform :ios, '10.3' +platform :ios, '10.0' target 'SignalR-Swift-Example' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks diff --git a/SignalR-Swift-Example/Podfile.lock b/SignalR-Swift-Example/Podfile.lock index ad6858b..d713c0c 100644 --- a/SignalR-Swift-Example/Podfile.lock +++ b/SignalR-Swift-Example/Podfile.lock @@ -1,22 +1,27 @@ PODS: - - Alamofire (4.6.0) - - SignalRSwift (2.0.1): - - Alamofire (~> 4.2) - - Starscream (~> 3.0) - - Starscream (3.0.3) + - Alamofire (5.4.4) + - SignalRSwift (2.1.9): + - Alamofire + - Starscream + - Starscream (4.0.4) DEPENDENCIES: - SignalRSwift (from `../`) +SPEC REPOS: + trunk: + - Alamofire + - Starscream + EXTERNAL SOURCES: SignalRSwift: - :path: ../ + :path: "../" SPEC CHECKSUMS: - Alamofire: f41a599bd63041760b26d393ec1069d9d7b917f4 - SignalRSwift: 92b0536d81f0dea4bb3f941adea7422dc26886e8 - Starscream: dfb1b3f39506717ee52b67fb48de0c8269504cbc + Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9 + SignalRSwift: e1e4a08c45e9c6dcaa7e126c8c57fed0e7c93efa + Starscream: 5178aed56b316f13fa3bc55694e583d35dd414d9 -PODFILE CHECKSUM: 0b670b9c4ac8d7df99f98ba1a30595cebc4466a9 +PODFILE CHECKSUM: b21ec611911e40f8919863b5c067ce599c15f03e -COCOAPODS: 1.3.1 +COCOAPODS: 1.11.2 diff --git a/SignalR-Swift-Example/SignalR-Swift-Example.xcodeproj/project.pbxproj b/SignalR-Swift-Example/SignalR-Swift-Example.xcodeproj/project.pbxproj index 19568e7..b3ccebb 100644 --- a/SignalR-Swift-Example/SignalR-Swift-Example.xcodeproj/project.pbxproj +++ b/SignalR-Swift-Example/SignalR-Swift-Example.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 715553CCD279348CB60CA3CA /* Pods_SignalR_Swift_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB5250B3C095B54B6A8372E7 /* Pods_SignalR_Swift_ExampleTests.framework */; }; C9E64D701E27DC3300DEDC20 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E64D6F1E27DC3300DEDC20 /* AppDelegate.swift */; }; C9E64D721E27DC3300DEDC20 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E64D711E27DC3300DEDC20 /* ViewController.swift */; }; C9E64D771E27DC3300DEDC20 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C9E64D761E27DC3300DEDC20 /* Assets.xcassets */; }; @@ -27,12 +26,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 26A458CE9EF8F3422E825CF9 /* Pods_SignalR_Swift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalR_Swift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 790AC94075959051C56799D5 /* Pods-SignalR-Swift-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-ExampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalR-Swift-ExampleTests/Pods-SignalR-Swift-ExampleTests.release.xcconfig"; sourceTree = ""; }; - 793E4C03DAB6B7009192E2EF /* Pods-SignalR-Swift-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example.release.xcconfig"; sourceTree = ""; }; - A2D0F25BF5CDF45777FDC3D3 /* Pods-SignalR-Swift-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-ExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SignalR-Swift-ExampleTests/Pods-SignalR-Swift-ExampleTests.debug.xcconfig"; sourceTree = ""; }; - BB5250B3C095B54B6A8372E7 /* Pods_SignalR_Swift_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalR_Swift_ExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C61CCEAF90DA9573CAF2F41D /* Pods-SignalR-Swift-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example.debug.xcconfig"; sourceTree = ""; }; + 05E37B89163869AF502F1CDF /* Pods-SignalR-Swift-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-SignalR-Swift-ExampleTests/Pods-SignalR-Swift-ExampleTests.release.xcconfig"; sourceTree = ""; }; + 64FBD2AA863EBC1C6E5F1847 /* Pods-SignalR-Swift-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-SignalR-Swift-ExampleTests/Pods-SignalR-Swift-ExampleTests.debug.xcconfig"; sourceTree = ""; }; + 71D72D02CAC62F15659B33F8 /* Pods-SignalR-Swift-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-Example.debug.xcconfig"; path = "Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example.debug.xcconfig"; sourceTree = ""; }; C9E64D6C1E27DC3300DEDC20 /* SignalR-Swift-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SignalR-Swift-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; C9E64D6F1E27DC3300DEDC20 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; C9E64D711E27DC3300DEDC20 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -43,6 +39,7 @@ C9E64D841E27DC3400DEDC20 /* SignalR_Swift_ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignalR_Swift_ExampleTests.swift; sourceTree = ""; }; C9E64D861E27DC3400DEDC20 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C9E64D901E27E47800DEDC20 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + DF6E88DA50252B1C671A3177 /* Pods-SignalR-Swift-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-Swift-Example.release.xcconfig"; path = "Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -57,31 +54,28 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 715553CCD279348CB60CA3CA /* Pods_SignalR_Swift_ExampleTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 3074C68C23B280A1578C9624 /* Frameworks */ = { + 886B7849965E5C3A8E3E1D7A /* Frameworks */ = { isa = PBXGroup; children = ( - 26A458CE9EF8F3422E825CF9 /* Pods_SignalR_Swift_Example.framework */, - BB5250B3C095B54B6A8372E7 /* Pods_SignalR_Swift_ExampleTests.framework */, ); name = Frameworks; sourceTree = ""; }; - 781EA09133FDDDA08190CC4A /* Pods */ = { + AA34610D67E363DB319A23F6 /* Pods */ = { isa = PBXGroup; children = ( - C61CCEAF90DA9573CAF2F41D /* Pods-SignalR-Swift-Example.debug.xcconfig */, - 793E4C03DAB6B7009192E2EF /* Pods-SignalR-Swift-Example.release.xcconfig */, - A2D0F25BF5CDF45777FDC3D3 /* Pods-SignalR-Swift-ExampleTests.debug.xcconfig */, - 790AC94075959051C56799D5 /* Pods-SignalR-Swift-ExampleTests.release.xcconfig */, + 71D72D02CAC62F15659B33F8 /* Pods-SignalR-Swift-Example.debug.xcconfig */, + DF6E88DA50252B1C671A3177 /* Pods-SignalR-Swift-Example.release.xcconfig */, + 64FBD2AA863EBC1C6E5F1847 /* Pods-SignalR-Swift-ExampleTests.debug.xcconfig */, + 05E37B89163869AF502F1CDF /* Pods-SignalR-Swift-ExampleTests.release.xcconfig */, ); - name = Pods; + path = Pods; sourceTree = ""; }; C9E64D631E27DC3300DEDC20 = { @@ -90,8 +84,8 @@ C9E64D6E1E27DC3300DEDC20 /* SignalR-Swift-Example */, C9E64D831E27DC3400DEDC20 /* SignalR-Swift-ExampleTests */, C9E64D6D1E27DC3300DEDC20 /* Products */, - 781EA09133FDDDA08190CC4A /* Pods */, - 3074C68C23B280A1578C9624 /* Frameworks */, + AA34610D67E363DB319A23F6 /* Pods */, + 886B7849965E5C3A8E3E1D7A /* Frameworks */, ); sourceTree = ""; }; @@ -133,12 +127,11 @@ isa = PBXNativeTarget; buildConfigurationList = C9E64D891E27DC3400DEDC20 /* Build configuration list for PBXNativeTarget "SignalR-Swift-Example" */; buildPhases = ( - 0C3202FEE06CE733AE264351 /* [CP] Check Pods Manifest.lock */, + 42C00E5E2B74186C5A2DE8AD /* [CP] Check Pods Manifest.lock */, C9E64D681E27DC3300DEDC20 /* Sources */, C9E64D691E27DC3300DEDC20 /* Frameworks */, C9E64D6A1E27DC3300DEDC20 /* Resources */, - 6F42A1175AEEF087513135D6 /* [CP] Embed Pods Frameworks */, - 3B0F052C7D6CDBE56E5190EC /* [CP] Copy Pods Resources */, + 8B56917674E1E95B61682FB0 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -153,12 +146,10 @@ isa = PBXNativeTarget; buildConfigurationList = C9E64D8C1E27DC3400DEDC20 /* Build configuration list for PBXNativeTarget "SignalR-Swift-ExampleTests" */; buildPhases = ( - B721394EE4F0D4E64AB5B418 /* [CP] Check Pods Manifest.lock */, + 1A821CDD21B22CE9CCFBF011 /* [CP] Check Pods Manifest.lock */, C9E64D7C1E27DC3400DEDC20 /* Sources */, C9E64D7D1E27DC3400DEDC20 /* Frameworks */, C9E64D7E1E27DC3400DEDC20 /* Resources */, - 10D9A3292E3B053C4B1F1E8B /* [CP] Embed Pods Frameworks */, - 77521BBF68CE60E8E2BA4051 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -177,7 +168,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "Jordan Camara"; TargetAttributes = { C9E64D6B1E27DC3300DEDC20 = { @@ -195,7 +186,7 @@ }; buildConfigurationList = C9E64D671E27DC3300DEDC20 /* Build configuration list for PBXProject "SignalR-Swift-Example" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -233,61 +224,57 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0C3202FEE06CE733AE264351 /* [CP] Check Pods Manifest.lock */ = { + 1A821CDD21B22CE9CCFBF011 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SignalR-Swift-Example-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-SignalR-Swift-ExampleTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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"; showEnvVarsInLog = 0; }; - 10D9A3292E3B053C4B1F1E8B /* [CP] Embed Pods Frameworks */ = { + 42C00E5E2B74186C5A2DE8AD /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SignalR-Swift-ExampleTests/Pods-SignalR-Swift-ExampleTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3B0F052C7D6CDBE56E5190EC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Copy Pods Resources"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SignalR-Swift-Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example-resources.sh\"\n"; + 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"; showEnvVarsInLog = 0; }; - 6F42A1175AEEF087513135D6 /* [CP] Embed Pods Frameworks */ = { + 8B56917674E1E95B61682FB0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", "${BUILT_PRODUCTS_DIR}/SignalRSwift/SignalRSwift.framework", "${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework", @@ -300,40 +287,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 77521BBF68CE60E8E2BA4051 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SignalR-Swift-ExampleTests/Pods-SignalR-Swift-ExampleTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - B721394EE4F0D4E64AB5B418 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SignalR-Swift-ExampleTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - 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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SignalR-Swift-Example/Pods-SignalR-Swift-Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -390,6 +344,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -399,6 +354,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -406,8 +362,10 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -432,12 +390,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -446,6 +405,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -455,6 +415,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -462,8 +423,10 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -482,10 +445,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -493,7 +457,7 @@ }; C9E64D8A1E27DC3400DEDC20 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C61CCEAF90DA9573CAF2F41D /* Pods-SignalR-Swift-Example.debug.xcconfig */; + baseConfigurationReference = 71D72D02CAC62F15659B33F8 /* Pods-SignalR-Swift-Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = 8Z35TU97D6; @@ -501,13 +465,13 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-Swift-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; C9E64D8B1E27DC3400DEDC20 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 793E4C03DAB6B7009192E2EF /* Pods-SignalR-Swift-Example.release.xcconfig */; + baseConfigurationReference = DF6E88DA50252B1C671A3177 /* Pods-SignalR-Swift-Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = 8Z35TU97D6; @@ -515,13 +479,13 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-Swift-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; C9E64D8D1E27DC3400DEDC20 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A2D0F25BF5CDF45777FDC3D3 /* Pods-SignalR-Swift-ExampleTests.debug.xcconfig */; + baseConfigurationReference = 64FBD2AA863EBC1C6E5F1847 /* Pods-SignalR-Swift-ExampleTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -530,14 +494,14 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-Swift-ExampleTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SignalR-Swift-Example.app/SignalR-Swift-Example"; }; name = Debug; }; C9E64D8E1E27DC3400DEDC20 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 790AC94075959051C56799D5 /* Pods-SignalR-Swift-ExampleTests.release.xcconfig */; + baseConfigurationReference = 05E37B89163869AF502F1CDF /* Pods-SignalR-Swift-ExampleTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -546,7 +510,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-Swift-ExampleTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SignalR-Swift-Example.app/SignalR-Swift-Example"; }; name = Release; diff --git a/SignalR-Swift-Example/SignalR-Swift-Example.xcodeproj/xcshareddata/xcschemes/SignalR-Swift-Example.xcscheme b/SignalR-Swift-Example/SignalR-Swift-Example.xcodeproj/xcshareddata/xcschemes/SignalR-Swift-Example.xcscheme new file mode 100644 index 0000000..d0f3e09 --- /dev/null +++ b/SignalR-Swift-Example/SignalR-Swift-Example.xcodeproj/xcshareddata/xcschemes/SignalR-Swift-Example.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SignalR-Swift-Example/SignalR-Swift-Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SignalR-Swift-Example/SignalR-Swift-Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SignalR-Swift-Example/SignalR-Swift-Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SignalR-Swift-Example/SignalR-Swift-Example/AppDelegate.swift b/SignalR-Swift-Example/SignalR-Swift-Example/AppDelegate.swift index abe746a..ca04448 100644 --- a/SignalR-Swift-Example/SignalR-Swift-Example/AppDelegate.swift +++ b/SignalR-Swift-Example/SignalR-Swift-Example/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/SignalR-Swift-Example/SignalR-Swift-Example/ViewController.swift b/SignalR-Swift-Example/SignalR-Swift-Example/ViewController.swift index 33c9020..2b658b9 100644 --- a/SignalR-Swift-Example/SignalR-Swift-Example/ViewController.swift +++ b/SignalR-Swift-Example/SignalR-Swift-Example/ViewController.swift @@ -101,7 +101,7 @@ class ViewController: UIViewController { @IBAction func send(_ sender: AnyObject?) { if let hub = chatHub, let message = messageTextField.text { - hub.invoke(method: "send", withArgs: [name, message]) + hub.invoke(method: "send", withArgs: [name ?? "Name: ", message]) } messageTextField.resignFirstResponder() } diff --git a/SignalR-Swift.xcodeproj/project.pbxproj b/SignalR-Swift.xcodeproj/project.pbxproj index 60d96a5..f684148 100644 --- a/SignalR-Swift.xcodeproj/project.pbxproj +++ b/SignalR-Swift.xcodeproj/project.pbxproj @@ -7,11 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 03D89CA2D29AD16BE22FB404 /* Pods_SignalRSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3DD50F71B5A709F5EC093E9 /* Pods_SignalRSwift.framework */; }; 563B87161F1FA11100D75CEF /* ServerSentEventsTransport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 563B87151F1FA11100D75CEF /* ServerSentEventsTransport.swift */; }; 568A77191F223CB2004F5D1C /* ChunkBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568A77181F223CB2004F5D1C /* ChunkBuffer.swift */; }; 568A771B1F223CF0004F5D1C /* ServerSentEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568A771A1F223CF0004F5D1C /* ServerSentEvent.swift */; }; - AA049197DB8438E88C7B3D5D /* Pods_SignalR_SwiftTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 291C54976E982A542BA4B4C3 /* Pods_SignalR_SwiftTests.framework */; }; C91154631E24113F007C0DD9 /* WebSocketTransport.swift in Sources */ = {isa = PBXBuildFile; fileRef = C91154621E24113F007C0DD9 /* WebSocketTransport.swift */; }; C91154661E241239007C0DD9 /* WebSocketConnectionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = C91154651E241239007C0DD9 /* WebSocketConnectionInfo.swift */; }; C91154681E243082007C0DD9 /* ReceivedMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C91154671E243082007C0DD9 /* ReceivedMessage.swift */; }; @@ -53,14 +51,13 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 291C54976E982A542BA4B4C3 /* Pods_SignalR_SwiftTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalR_SwiftTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 42E40FC4FECA749AD861D67E /* Pods-SignalRSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalRSwift.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SignalRSwift/Pods-SignalRSwift.debug.xcconfig"; sourceTree = ""; }; + 2EC113E2B99A23B23569B683 /* Pods-SignalR-SwiftTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-SwiftTests.release.xcconfig"; path = "Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests.release.xcconfig"; sourceTree = ""; }; + 3019D93A3287DFB23C41B846 /* Pods-SignalR-SwiftTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-SwiftTests.debug.xcconfig"; path = "Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests.debug.xcconfig"; sourceTree = ""; }; + 49B5BB4A071DD8A199988E10 /* Pods-SignalRSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalRSwift.debug.xcconfig"; path = "Target Support Files/Pods-SignalRSwift/Pods-SignalRSwift.debug.xcconfig"; sourceTree = ""; }; 563B87151F1FA11100D75CEF /* ServerSentEventsTransport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerSentEventsTransport.swift; sourceTree = ""; }; 568A77181F223CB2004F5D1C /* ChunkBuffer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChunkBuffer.swift; path = "SignalR-Swift/Transports/ServerSentEvents/ChunkBuffer.swift"; sourceTree = SOURCE_ROOT; }; 568A771A1F223CF0004F5D1C /* ServerSentEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ServerSentEvent.swift; path = "SignalR-Swift/Transports/ServerSentEvents/ServerSentEvent.swift"; sourceTree = SOURCE_ROOT; }; - 65B59CFA9FAF15B46BDCDEC1 /* Pods-SignalR-SwiftTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-SwiftTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests.debug.xcconfig"; sourceTree = ""; }; - B5E080DF752A22D635CE38CF /* Pods-SignalR-SwiftTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalR-SwiftTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests.release.xcconfig"; sourceTree = ""; }; - B9B048FC932F5933F9447DCE /* Pods-SignalRSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalRSwift.release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalRSwift/Pods-SignalRSwift.release.xcconfig"; sourceTree = ""; }; + BB9B649DF0F8A7E41F534F0A /* Pods-SignalRSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalRSwift.release.xcconfig"; path = "Target Support Files/Pods-SignalRSwift/Pods-SignalRSwift.release.xcconfig"; sourceTree = ""; }; C91154621E24113F007C0DD9 /* WebSocketTransport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebSocketTransport.swift; sourceTree = ""; }; C91154651E241239007C0DD9 /* WebSocketConnectionInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebSocketConnectionInfo.swift; sourceTree = ""; }; C91154671E243082007C0DD9 /* ReceivedMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReceivedMessage.swift; sourceTree = ""; }; @@ -92,7 +89,9 @@ C9FC2D941E2025B80027FE59 /* AutoTransport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutoTransport.swift; sourceTree = ""; }; C9FC2D961E2025DB0027FE59 /* HttpTransport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpTransport.swift; sourceTree = ""; }; C9FC2D981E23BC600027FE59 /* ConnectionDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionDelegate.swift; sourceTree = ""; }; - E3DD50F71B5A709F5EC093E9 /* Pods_SignalRSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalRSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CE3269EC23F3B26B00B29F0F /* SignalRSwift.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = SignalRSwift.podspec; sourceTree = ""; }; + CE3269ED23F3B26B00B29F0F /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + CEF6816528DB513000649172 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -100,7 +99,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 03D89CA2D29AD16BE22FB404 /* Pods_SignalRSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -109,40 +107,37 @@ buildActionMask = 2147483647; files = ( C9330B321E1FE59A00B1F2D5 /* SignalRSwift.framework in Frameworks */, - AA049197DB8438E88C7B3D5D /* Pods_SignalR_SwiftTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 316A9BF3DEFAB629DD2C78FD /* Frameworks */ = { + 5686CBB81F7C03B3008CA187 /* ServerSentEvents */ = { isa = PBXGroup; children = ( - E3DD50F71B5A709F5EC093E9 /* Pods_SignalRSwift.framework */, - 291C54976E982A542BA4B4C3 /* Pods_SignalR_SwiftTests.framework */, + 568A77181F223CB2004F5D1C /* ChunkBuffer.swift */, + 568A771A1F223CF0004F5D1C /* ServerSentEvent.swift */, ); - name = Frameworks; + path = ServerSentEvents; sourceTree = ""; }; - 5686CBB81F7C03B3008CA187 /* ServerSentEvents */ = { + 89A6BE56D58C5D1F44B4C1F2 /* Pods */ = { isa = PBXGroup; children = ( - 568A77181F223CB2004F5D1C /* ChunkBuffer.swift */, - 568A771A1F223CF0004F5D1C /* ServerSentEvent.swift */, + 3019D93A3287DFB23C41B846 /* Pods-SignalR-SwiftTests.debug.xcconfig */, + 2EC113E2B99A23B23569B683 /* Pods-SignalR-SwiftTests.release.xcconfig */, + 49B5BB4A071DD8A199988E10 /* Pods-SignalRSwift.debug.xcconfig */, + BB9B649DF0F8A7E41F534F0A /* Pods-SignalRSwift.release.xcconfig */, ); - path = ServerSentEvents; + path = Pods; sourceTree = ""; }; - C4B90292188059B3970F0902 /* Pods */ = { + B7D1214F5724602EDD3E0C77 /* Frameworks */ = { isa = PBXGroup; children = ( - 65B59CFA9FAF15B46BDCDEC1 /* Pods-SignalR-SwiftTests.debug.xcconfig */, - B5E080DF752A22D635CE38CF /* Pods-SignalR-SwiftTests.release.xcconfig */, - 42E40FC4FECA749AD861D67E /* Pods-SignalRSwift.debug.xcconfig */, - B9B048FC932F5933F9447DCE /* Pods-SignalRSwift.release.xcconfig */, ); - name = Pods; + name = Frameworks; sourceTree = ""; }; C911545F1E23D205007C0DD9 /* Models */ = { @@ -178,8 +173,11 @@ C9330B2A1E1FE59A00B1F2D5 /* SignalR-Swift */, C9330B351E1FE59A00B1F2D5 /* SignalR-SwiftTests */, C9330B291E1FE59A00B1F2D5 /* Products */, - C4B90292188059B3970F0902 /* Pods */, - 316A9BF3DEFAB629DD2C78FD /* Frameworks */, + CE3269ED23F3B26B00B29F0F /* README.md */, + CE3269EC23F3B26B00B29F0F /* SignalRSwift.podspec */, + CEF6816528DB513000649172 /* Package.swift */, + 89A6BE56D58C5D1F44B4C1F2 /* Pods */, + B7D1214F5724602EDD3E0C77 /* Frameworks */, ); sourceTree = ""; }; @@ -324,12 +322,11 @@ isa = PBXNativeTarget; buildConfigurationList = C9330B3C1E1FE59A00B1F2D5 /* Build configuration list for PBXNativeTarget "SignalRSwift" */; buildPhases = ( - 8893B2F1770B24873610B1CA /* [CP] Check Pods Manifest.lock */, + FF1C626F19D1E9D255108BAC /* [CP] Check Pods Manifest.lock */, C9330B231E1FE59A00B1F2D5 /* Sources */, C9330B241E1FE59A00B1F2D5 /* Frameworks */, C9330B251E1FE59A00B1F2D5 /* Headers */, C9330B261E1FE59A00B1F2D5 /* Resources */, - BE9A67E61EA448B742E04260 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -344,12 +341,11 @@ isa = PBXNativeTarget; buildConfigurationList = C9330B3F1E1FE59A00B1F2D5 /* Build configuration list for PBXNativeTarget "SignalR-SwiftTests" */; buildPhases = ( - F71AD12E7750A42FE3671D48 /* [CP] Check Pods Manifest.lock */, + 196215561549F25403E8C35D /* [CP] Check Pods Manifest.lock */, C9330B2D1E1FE59A00B1F2D5 /* Sources */, C9330B2E1E1FE59A00B1F2D5 /* Frameworks */, C9330B2F1E1FE59A00B1F2D5 /* Resources */, - 1408BA98AFE158F7832B6F37 /* [CP] Embed Pods Frameworks */, - E29934DC4C7132EA079822B1 /* [CP] Copy Pods Resources */, + 8F3A2AB0DEBA64E63E054FE0 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -368,7 +364,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0820; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "Jordan Camara"; TargetAttributes = { C9330B271E1FE59A00B1F2D5 = { @@ -390,6 +386,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = C9330B1E1E1FE59A00B1F2D5; @@ -421,92 +418,66 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1408BA98AFE158F7832B6F37 /* [CP] Embed Pods Frameworks */ = { + 196215561549F25403E8C35D /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Mockit/Mockit.framework", - "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", - "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", - "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", - "${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mockit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Starscream.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 8893B2F1770B24873610B1CA /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SignalRSwift-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-SignalR-SwiftTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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"; showEnvVarsInLog = 0; }; - BE9A67E61EA448B742E04260 /* [CP] Copy Pods Resources */ = { + 8F3A2AB0DEBA64E63E054FE0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Mockit/Mockit.framework", + "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", + "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", ); - name = "[CP] Copy Pods Resources"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mockit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SignalRSwift/Pods-SignalRSwift-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - E29934DC4C7132EA079822B1 /* [CP] Copy Pods Resources */ = { + FF1C626F19D1E9D255108BAC /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SignalR-SwiftTests/Pods-SignalR-SwiftTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F71AD12E7750A42FE3671D48 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SignalR-SwiftTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-SignalRSwift-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -574,20 +545,30 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -611,12 +592,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -627,20 +609,30 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -658,10 +650,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -671,7 +664,7 @@ }; C9330B3D1E1FE59A00B1F2D5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 42E40FC4FECA749AD861D67E /* Pods-SignalRSwift.debug.xcconfig */; + baseConfigurationReference = 49B5BB4A071DD8A199988E10 /* Pods-SignalRSwift.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; @@ -682,19 +675,19 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "SignalR-Swift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 2.1.7; PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; C9330B3E1E1FE59A00B1F2D5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B9B048FC932F5933F9447DCE /* Pods-SignalRSwift.release.xcconfig */; + baseConfigurationReference = BB9B649DF0F8A7E41F534F0A /* Pods-SignalRSwift.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; @@ -705,20 +698,19 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "SignalR-Swift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 2.1.7; PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; C9330B401E1FE59A00B1F2D5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 65B59CFA9FAF15B46BDCDEC1 /* Pods-SignalR-SwiftTests.debug.xcconfig */; + baseConfigurationReference = 3019D93A3287DFB23C41B846 /* Pods-SignalR-SwiftTests.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; DEVELOPMENT_TEAM = 8Z35TU97D6; INFOPLIST_FILE = "SignalR-SwiftTests/Info.plist"; @@ -726,22 +718,21 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-SwiftTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; C9330B411E1FE59A00B1F2D5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B5E080DF752A22D635CE38CF /* Pods-SignalR-SwiftTests.release.xcconfig */; + baseConfigurationReference = 2EC113E2B99A23B23569B683 /* Pods-SignalR-SwiftTests.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; DEVELOPMENT_TEAM = 8Z35TU97D6; INFOPLIST_FILE = "SignalR-SwiftTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.autosoftdms.SignalR-SwiftTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/SignalR-Swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SignalR-Swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SignalR-Swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SignalR-Swift/Client/Connection.swift b/SignalR-Swift/Client/Connection.swift index c8bcb0e..f485976 100644 --- a/SignalR-Swift/Client/Connection.swift +++ b/SignalR-Swift/Client/Connection.swift @@ -7,8 +7,13 @@ // import Foundation -import UIKit import Alamofire +#if canImport(UIKit) +import UIKit +#elseif canImport(AppKit) +import AppKit +#else +#endif public typealias ConnectionStartedClosure = (() -> ()) public typealias ConnectionReceivedClosure = ((Any) -> ()) @@ -43,8 +48,8 @@ public class Connection: ConnectionProtocol { public var headers = HTTPHeaders() public var keepAliveData: KeepAliveData? - public var webSocketAllowsSelfSignedSSL = false - public internal(set) var sessionManager: SessionManager + public var webSocketAllowsSelfSignedSSL = true + public internal(set) var sessionManager: Session public var transport: ClientTransportProtocol? public var transportConnectTimeout = 0.0 @@ -68,7 +73,7 @@ public class Connection: ConnectionProtocol { return connection.state == .reconnecting } - public init(withUrl url: String, queryString: [String: String]? = nil, sessionManager: SessionManager = .default) { + public init(withUrl url: String, queryString: [String: String]? = nil, sessionManager: Session = .default) { self.url = url.hasSuffix("/") ? url : url.appending("/") self.queryString = queryString self.sessionManager = sessionManager @@ -258,7 +263,9 @@ public class Connection: ConnectionProtocol { } public func didReconnect() { - NSObject.cancelPreviousPerformRequests(withTarget: self.disconnectTimeoutOperation, selector: #selector(BlockOperation.start), object: nil) + if let operation = disconnectTimeoutOperation { + NSObject.cancelPreviousPerformRequests(withTarget: operation, selector: #selector(BlockOperation.start), object: nil) + } self.disconnectTimeoutOperation = nil self.reconnected?() @@ -287,36 +294,49 @@ public class Connection: ConnectionProtocol { public func updateLastKeepAlive() { self.keepAliveData?.lastKeepAlive = Date() } - - public func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?) -> DataRequest { - return self.getRequest(url: url, httpMethod: httpMethod, encoding: encoding, parameters: parameters, timeout: 30.0, headers: [:]) - } - - public func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double) -> DataRequest { - return self.getRequest(url: url, httpMethod: httpMethod, encoding: encoding, parameters: parameters, timeout: timeout, headers: [:]) - } - public func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double, headers: HTTPHeaders) -> DataRequest { + private func encodedURLRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double, headers: HTTPHeaders) -> URLRequest? { var globalHeaders = self.headers globalHeaders["User-Agent"] = self.createUserAgentString(client: "SignalR.Client.iOS") - - for (httpHeader, value) in headers { + + for (httpHeader, value) in headers.dictionary { globalHeaders[httpHeader] = value } - + var urlRequest = try? URLRequest(url: url.asURL(), method: httpMethod, headers: globalHeaders) urlRequest?.timeoutInterval = timeout - + let encodedURLRequest = try? encoding.encode(urlRequest!, with: parameters) - return sessionManager.request(encodedURLRequest!) + return encodedURLRequest + } + + public func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?) -> DataRequest { + let request = encodedURLRequest(url: url, httpMethod: httpMethod, encoding: encoding, parameters: parameters, timeout: 30.0, headers: [:]) + return sessionManager.request(request!) + } + + public func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double) -> DataRequest { + let request = encodedURLRequest(url: url, httpMethod: httpMethod, encoding: encoding, parameters: parameters, timeout: timeout, headers: [:]) + return sessionManager.request(request!) + } + + public func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double, headers: HTTPHeaders) -> DataStreamRequest { + let request = encodedURLRequest(url: url, httpMethod: httpMethod, encoding: encoding, parameters: parameters, timeout: timeout, headers: headers) + return sessionManager.streamRequest(request!) } func createUserAgentString(client: String) -> String { if self.assemblyVersion == nil { self.assemblyVersion = Version(major: 2, minor: 0) } - - return "\(client)/\(self.assemblyVersion!) (\(UIDevice.current.localizedModel) \(UIDevice.current.systemVersion))" + + #if os(iOS) || os(watchOS) || os(tvOS) + return "\(client)/\(self.assemblyVersion!) (\(UIDevice.current.localizedModel) \(UIDevice.current.systemVersion))" + #elseif os(macOS) + return "\(client)/\(self.assemblyVersion!) (\(Host.current().name ?? ""))" + #else + return "\(client)/\(self.assemblyVersion!)" + #endif } public func processResponse(response: Data, shouldReconnect: inout Bool, disconnected: inout Bool) { diff --git a/SignalR-Swift/Client/Hubs/HubConnection.swift b/SignalR-Swift/Client/Hubs/HubConnection.swift index 39e8a18..e34951b 100644 --- a/SignalR-Swift/Client/Hubs/HubConnection.swift +++ b/SignalR-Swift/Client/Hubs/HubConnection.swift @@ -17,7 +17,7 @@ public class HubConnection: Connection, HubConnectionProtocol { public init(withUrl url: String, queryString: [String: String]? = nil, - sessionManager: SessionManager = .default, + sessionManager: Session = .default, useDefault: Bool = true) { super.init(withUrl: HubConnection.getUrl(url: url, useDefault: useDefault), queryString: queryString, diff --git a/SignalR-Swift/Client/Hubs/HubProxy.swift b/SignalR-Swift/Client/Hubs/HubProxy.swift index f6b8f8f..8902b33 100644 --- a/SignalR-Swift/Client/Hubs/HubProxy.swift +++ b/SignalR-Swift/Client/Hubs/HubProxy.swift @@ -2,29 +2,29 @@ // HubProxy.swift // SignalR-Swift // -// +// // Copyright © 2017 Jordan Camara. All rights reserved. // import Foundation public class HubProxy: HubProxyProtocol { - + public var state = [String: Any]() - + private weak var connection: HubConnectionProtocol? private let hubName: String private var subscriptions = [String: Subscription]() - + // MARK: - Init - + public init(connection: HubConnectionProtocol, hubName: String) { self.connection = connection self.hubName = hubName } - + // MARK: - Subscribe - + public func on(eventName: String, handler: @escaping Subscription) -> Subscription? { guard !eventName.isEmpty else { NSException.raise(.invalidArgumentException, format: NSLocalizedString("Argument eventName is null", comment: "null event name exception"), arguments: getVaList(["nil"])) @@ -33,19 +33,19 @@ public class HubProxy: HubProxyProtocol { return self.subscriptions[eventName] ?? self.subscriptions.updateValue(handler, forKey: eventName) ?? handler } - + public func invokeEvent(eventName: String, withArgs args: [Any]) { if let subscription = self.subscriptions[eventName] { subscription(args) } } - + // MARK: - Publish - + public func invoke(method: String, withArgs args: [Any]) { self.invoke(method: method, withArgs: args, completionHandler: nil) } - + public func invoke(method: String, withArgs args: [Any], completionHandler: ((Any?, Error?) -> ())?) { guard !method.isEmpty else { NSException.raise(.invalidArgumentException, format: NSLocalizedString("Argument method is null", comment: "null event name exception"), arguments: getVaList(["nil"])) @@ -53,13 +53,22 @@ public class HubProxy: HubProxyProtocol { } guard let connection = self.connection else { return } - + let callbackId = connection.registerCallback { result in guard let hubResult = result else { return } hubResult.state?.forEach { (key, value) in self.state[key] = value } - completionHandler?(hubResult.result, nil) + if hubResult.error == nil { + completionHandler?(hubResult.result, nil) + } else { + let userInfo = [ + NSLocalizedFailureReasonErrorKey: NSExceptionName.objectNotAvailableException.rawValue, + NSLocalizedDescriptionKey: hubResult.error! + ] + let error = NSError(domain: "com.autosoftdms.SignalR-Swift.\(type(of: self))", code: 0, userInfo: userInfo) + completionHandler?(nil, error) + } } - + let hubData = HubInvocation(callbackId: callbackId, hub: self.hubName, method: method, diff --git a/SignalR-Swift/Client/Infrastructure/Version.swift b/SignalR-Swift/Client/Infrastructure/Version.swift index 5919f74..de3467f 100644 --- a/SignalR-Swift/Client/Infrastructure/Version.swift +++ b/SignalR-Swift/Client/Infrastructure/Version.swift @@ -7,7 +7,6 @@ // import Foundation -import UIKit public struct Version : Equatable, CustomStringConvertible { let major: UInt diff --git a/SignalR-Swift/Client/Protocols/ConnectionDelegate.swift b/SignalR-Swift/Client/Protocols/ConnectionDelegate.swift index 9d81796..7e4203b 100644 --- a/SignalR-Swift/Client/Protocols/ConnectionDelegate.swift +++ b/SignalR-Swift/Client/Protocols/ConnectionDelegate.swift @@ -8,7 +8,7 @@ import Foundation -protocol ConnectionDelegate: class { +protocol ConnectionDelegate: AnyObject { func connectionDidOpen(connection: ConnectionProtocol) func connectionDidClose(connection: ConnectionProtocol) func connectionWillReconnect(connection: ConnectionProtocol) diff --git a/SignalR-Swift/Client/Protocols/ConnectionProtocol.swift b/SignalR-Swift/Client/Protocols/ConnectionProtocol.swift index 517c1d0..a081899 100644 --- a/SignalR-Swift/Client/Protocols/ConnectionProtocol.swift +++ b/SignalR-Swift/Client/Protocols/ConnectionProtocol.swift @@ -7,10 +7,9 @@ // import Foundation -import UIKit import Alamofire -public protocol ConnectionProtocol: class { +public protocol ConnectionProtocol: AnyObject { var version: Version { get set } var transportConnectTimeout: Double { get set } var keepAliveData: KeepAliveData? { get set } @@ -24,7 +23,7 @@ public protocol ConnectionProtocol: class { var state: ConnectionState { get } var transport: ClientTransportProtocol? { get } var headers: HTTPHeaders { get set } - var sessionManager: SessionManager { get } + var sessionManager: Session { get } var webSocketAllowsSelfSignedSSL: Bool { get set } func onSending() -> String? @@ -45,6 +44,6 @@ public protocol ConnectionProtocol: class { func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?) -> DataRequest func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double) -> DataRequest - func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double, headers: HTTPHeaders) -> DataRequest + func getRequest(url: URLConvertible, httpMethod: HTTPMethod, encoding: ParameterEncoding, parameters: Parameters?, timeout: Double, headers: HTTPHeaders) -> DataStreamRequest func processResponse(response: Data, shouldReconnect: inout Bool, disconnected: inout Bool) } diff --git a/SignalR-Swift/Info.plist b/SignalR-Swift/Info.plist index fbe1e6b..ec0cc7b 100644 --- a/SignalR-Swift/Info.plist +++ b/SignalR-Swift/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/SignalR-Swift/Transports/AutoTransport.swift b/SignalR-Swift/Transports/AutoTransport.swift index 61ec1a4..19632a1 100644 --- a/SignalR-Swift/Transports/AutoTransport.swift +++ b/SignalR-Swift/Transports/AutoTransport.swift @@ -22,7 +22,7 @@ public class AutoTransport: HttpTransport { self.init(withTransports: transports) } - init(withTransports transports: [ClientTransportProtocol]) { + public init(withTransports transports: [ClientTransportProtocol]) { self.transports = transports } @@ -42,7 +42,7 @@ public class AutoTransport: HttpTransport { if error == nil, let tryWebSockets = response?.tryWebSockets, !tryWebSockets, - let invalidIndex = strongRef.transports.index(where: { $0.name == "webSockets" }) { + let invalidIndex = strongRef.transports.firstIndex(where: { $0.name == "webSockets" }) { strongRef.transports.remove(at: invalidIndex) } diff --git a/SignalR-Swift/Transports/HttpTransport.swift b/SignalR-Swift/Transports/HttpTransport.swift index dc6abd6..06d5bfb 100644 --- a/SignalR-Swift/Transports/HttpTransport.swift +++ b/SignalR-Swift/Transports/HttpTransport.swift @@ -27,15 +27,18 @@ public class HttpTransport: ClientTransportProtocol { let parameters = self.getConnectionParameters(connection: connection, connectionData: connectionData) let encodedRequest = connection.getRequest(url: url, httpMethod: .get, encoding: URLEncoding.default, parameters: parameters, timeout: 30.0) + + /*encodedRequest.responseJSON { (response) in + print(response.debugDescription) + }*/ - encodedRequest.validate().responseJSON { (response: DataResponse) in + encodedRequest.validate().responseJSON { (response: DataResponse) in switch response.result { case .success(let result): if let json = result as? [String: Any] { completionHandler?(NegotiationResponse(jsonObject: json), nil) - } - else { - completionHandler?(nil, AFError.responseSerializationFailed(reason: .inputDataNil)) + } else { + completionHandler?(nil, AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) } case .failure(let error): completionHandler?(nil, error) @@ -68,7 +71,7 @@ public class HttpTransport: ClientTransportProtocol { } let request = connection.getRequest(url: encodedRequestURL, httpMethod: .post, encoding: URLEncoding.httpBody, parameters: requestParams) - request.validate().responseJSON { (response: DataResponse) in + request.validate().responseJSON { (response: DataResponse) in switch response.result { case .success(let result): connection.didReceiveData(data: result) @@ -108,11 +111,20 @@ public class HttpTransport: ClientTransportProtocol { let parameters = self.getConnectionParameters(connection: connection, connectionData: connectionData) let encodedRequest = connection.getRequest(url: url, httpMethod: .get, encoding: URLEncoding.default, parameters: parameters, timeout: 2.0) - - let request = connection.getRequest(url: encodedRequest.request!.url!.absoluteString, httpMethod: .post, encoding: URLEncoding.httpBody, parameters: nil) - request.validate().response { response in - if response.error != nil { - self.completeAbort() + + encodedRequest.onURLRequestCreation { [weak self] urlRequest in + if let url = urlRequest.url { + let request = connection.getRequest(url: url.absoluteString, httpMethod: .post, encoding: URLEncoding.httpBody, parameters: nil) + request.validate().response { response in + switch response.result { + case .success(_): + self?.completeAbort() + case .failure(let error): + print(error) + } + } + } else { + self?.completeAbort() } } } diff --git a/SignalR-Swift/Transports/LongPollingTransport.swift b/SignalR-Swift/Transports/LongPollingTransport.swift index 445e1d7..169b337 100644 --- a/SignalR-Swift/Transports/LongPollingTransport.swift +++ b/SignalR-Swift/Transports/LongPollingTransport.swift @@ -14,6 +14,10 @@ public class LongPollingTransport: HttpTransport { var errorDelay = 2.0 var pollingQueue = DispatchQueue(label: "com.autosoftdms.SignalR-Swift.serial") + public override init() { + super.init() + } + // MARK: - Client Transport Protocol override public var name: String? { @@ -118,7 +122,7 @@ public class LongPollingTransport: HttpTransport { canReconnect = true - _ = BlockOperation(block: { + BlockOperation(block: { strongSelf.poll(connection: strongConnection, connectionData: connectionData, completionHandler: nil) }).perform(#selector(BlockOperation.start), with: nil, afterDelay: strongSelf.errorDelay) } else { @@ -138,7 +142,7 @@ public class LongPollingTransport: HttpTransport { if canReconnect { canReconnect = false - _ = BlockOperation(block: { [weak self, weak connection] in + BlockOperation(block: { [weak self, weak connection] in guard let strongSelf = self, let strongConnection = connection else { return } strongSelf.connectionReconnect(connection: strongConnection, canReconnect: canReconnectCopy) }).perform(#selector(BlockOperation.start), with: nil, afterDelay: self.reconnectDelay) diff --git a/SignalR-Swift/Transports/ServerSentEvents/ChunkBuffer.swift b/SignalR-Swift/Transports/ServerSentEvents/ChunkBuffer.swift index 3cc8e6a..72c7bc4 100644 --- a/SignalR-Swift/Transports/ServerSentEvents/ChunkBuffer.swift +++ b/SignalR-Swift/Transports/ServerSentEvents/ChunkBuffer.swift @@ -22,17 +22,17 @@ final class ChunkBuffer { func readLine() -> String? { var line: String? - - while let endIndex = buffer.index(of: "\n") { + + while let endIndex = buffer.firstIndex(of: "\n") ?? buffer.firstIndex(of: "\r\n") { let substring = buffer[.. ())?) { super.negotiate(connection: connection, connectionData: connectionData, completionHandler: completionHandler) } - + override public func start(connection: ConnectionProtocol, connectionData: String?, completionHandler: ((Any?, Error?) -> ())?) { self.connectionInfo = WebSocketConnectionInfo(connection: connection, data: connectionData) - + // perform connection self.performConnect(completionHandler: completionHandler) } - + override public func send(connection: ConnectionProtocol, data: Any, connectionData: String?, completionHandler: ((Any?, Error?) -> ())?) { if let dataString = data as? String { self.webSocket?.write(string: dataString) @@ -47,34 +51,34 @@ public class WebSocketTransport: HttpTransport, WebSocketDelegate { completionHandler?(nil, nil) } - + override public func abort(connection: ConnectionProtocol, timeout: Double, connectionData: String?) { self.stopWebSocket() super.abort(connection: connection, timeout: timeout, connectionData: connectionData) } - + override public func lostConnection(connection: ConnectionProtocol) { self.stopWebSocket() - + if self.tryCompleteAbort() { return } - + self.reconnect(connection: self.connectionInfo?.connection) } - + private func stopWebSocket() { self.webSocket?.delegate = nil self.webSocket?.disconnect() self.webSocket = nil } - + // MARK: - WebSockets transport - + func performConnect(completionHandler: ((_ response: String?, _ error: Error?) -> ())?) { self.performConnect(reconnecting: false, completionHandler: completionHandler) } - + func performConnect(reconnecting: Bool, completionHandler: ((_ response: String?, _ error: Error?) -> ())?) { let connection = self.connectionInfo?.connection var parameters: [String: Any] = [ @@ -84,13 +88,13 @@ public class WebSocketTransport: HttpTransport, WebSocketDelegate { "groupsToken": connection?.groupsToken ?? "", "connectionData": self.connectionInfo?.data ?? "" ] - + if let queryString = self.connectionInfo?.connection?.queryString { for (key, value) in queryString { parameters[key] = value } } - + var urlComponents = URLComponents(string: connection!.url) if let urlScheme = urlComponents?.scheme { if urlScheme.hasPrefix("https") { @@ -99,19 +103,13 @@ public class WebSocketTransport: HttpTransport, WebSocketDelegate { urlComponents?.scheme = "ws" } } - + do { - let baseUrl = try urlComponents?.asURL() - - let url = reconnecting ? baseUrl!.absoluteString.appending("reconnect") : baseUrl!.absoluteString.appending("connect") - - let request = connection?.getRequest(url: url, httpMethod: .get, encoding: URLEncoding.default, parameters: parameters, timeout: 30) - self.startClosure = completionHandler if let startClosure = self.startClosure { self.connectTimeoutOperation = BlockOperation(block: { [weak self] in guard let strongSelf = self else { return } - + let userInfo = [ NSLocalizedDescriptionKey: NSLocalizedString("Connection timed out.", comment: "timeout error description"), NSLocalizedFailureReasonErrorKey: NSLocalizedString("Connection did not receive initialized message before the timeout.", comment: "timeout error reason"), @@ -119,86 +117,107 @@ public class WebSocketTransport: HttpTransport, WebSocketDelegate { ] let error = NSError(domain: "com.autosoftdms.SignalR-Swift.\(type(of: strongSelf))", code: NSURLErrorTimedOut, userInfo: userInfo) strongSelf.stopWebSocket() - strongSelf.startClosure = nil startClosure(nil, error) }) - self.connectTimeoutOperation?.perform(#selector(BlockOperation.start), with: nil, afterDelay: connection!.transportConnectTimeout) } - - if let encodedRequest = request?.request { - self.webSocket = WebSocket(request: encodedRequest) - self.webSocket!.disableSSLCertValidation = connection?.webSocketAllowsSelfSignedSSL ?? false + + let baseUrl = try urlComponents?.asURL() + let url = reconnecting ? baseUrl!.absoluteString.appending("reconnect") : baseUrl!.absoluteString.appending("connect") + let request = connection?.getRequest(url: url, httpMethod: .get, encoding: URLEncoding.default, parameters: parameters, timeout: 30) + + request?.onURLRequestCreation(perform: { [weak self] urlRequest in + guard let self = self else { return } + self.webSocket = WebSocket(request: urlRequest, certPinner: FoundationSecurity(allowSelfSigned: connection?.webSocketAllowsSelfSignedSSL ?? true)) self.webSocket!.delegate = self self.webSocket!.connect() - } + }) } catch { - + print("error: \(error)") } } - + func reconnect(connection: ConnectionProtocol?) { - _ = BlockOperation { [weak self] in + BlockOperation { [weak self] in if let strongSelf = self, let connection = connection, Connection.ensureReconnecting(connection: connection) { strongSelf.performConnect(reconnecting: true, completionHandler: nil) } - }.perform(#selector(BlockOperation.start), with: nil, afterDelay: self.reconnectDelay) + }.perform(#selector(BlockOperation.start), with: nil, afterDelay: self.reconnectDelay) } - + // MARK: - WebSocketDelegate - - public func websocketDidConnect(socket: WebSocketClient){ - if let connection = self.connectionInfo?.connection, connection.changeState(oldState: .reconnecting, toState: .connected) { - connection.didReconnect() + private func stopTimeOutOperation() { + if let startClosure = self.startClosure, let connectTimeoutOperation = self.connectTimeoutOperation { + NSObject.cancelPreviousPerformRequests(withTarget: connectTimeoutOperation, selector: #selector(BlockOperation.start), object: nil) + self.connectTimeoutOperation = nil + self.startClosure = nil + startClosure(nil, nil) } } - public func websocketDidDisconnect(socket: WebSocketClient, error: Error?) { - if let error = error { - webSocketError(error) - } - else if !self.tryCompleteAbort() { - self.reconnect(connection: self.connectionInfo?.connection) + private func webSocketConnected(_ headers: [String: String]) { + self.stopTimeOutOperation() + if let connection = self.connectionInfo?.connection, + connection.changeState(oldState: .reconnecting, toState: .connected) == true { + connection.didReconnect() } } - - private func webSocketError(_ error: Error) { - if let startClosure = self.startClosure, let connectTimeoutOperation = self.connectTimeoutOperation { - NSObject.cancelPreviousPerformRequests(withTarget: connectTimeoutOperation, selector: #selector(BlockOperation.start), object: nil) - - self.connectTimeoutOperation = nil - self.stopWebSocket() - - self.startClosure = nil - startClosure(nil, error) - } else if !self.startedAbort { + + private func webSocketDisconnected(_ reason: String, _ code: UInt16) { + if self.tryCompleteAbort() == false { self.reconnect(connection: self.connectionInfo?.connection) + } else { + self.connectionInfo?.connection?.disconnect() + self.stopWebSocket() } } - - public func websocketDidReceiveMessage(socket: WebSocketClient, text: String) { + + private func webSocketReceivedMessage(_ string: String) { var timedOut = false var disconnected = false - - if let connection = self.connectionInfo?.connection, let data = text.data(using: .utf8) { + if let connection = self.connectionInfo?.connection, let data = string.data(using: .utf8) { connection.processResponse(response: data, shouldReconnect: &timedOut, disconnected: &disconnected) } - - if let startClosure = self.startClosure, let connectTimeoutOperation = self.connectTimeoutOperation { - NSObject.cancelPreviousPerformRequests(withTarget: connectTimeoutOperation, selector: #selector(BlockOperation.start), object: nil) - self.connectTimeoutOperation = nil - - self.startClosure = nil - startClosure(nil, nil) - } - - if disconnected { - self.connectionInfo?.connection?.disconnect() + } + + private func webSocketError(_ error: Error?) { + if self.startedAbort == false { + self.reconnect(connection: self.connectionInfo?.connection) + } else { + self.stopTimeOutOperation() self.stopWebSocket() } } - public func websocketDidReceiveData(socket: WebSocketClient, data: Data) { + public func didReceive(event: WebSocketEvent, client: WebSocketClient) { + switch event { + case .connected(let headers): + //print("websocket is connected: \(headers)") + webSocketConnected(headers) + case .disconnected(let reason, let code): + //print("websocket is disconnected: \(reason) with code: \(code)") + webSocketDisconnected(reason, code) + case .text(let string): + //print("Received text: \(string)") + webSocketReceivedMessage(string) + case .binary(_): + //print("Received data: \(data.count)") + break + case .ping(_): + break + case .pong(_): + break + case .viabilityChanged(_): + break + case .reconnectSuggested(_): + break + case .cancelled: + break; + case .error(let error): + print(error.debugDescription) + webSocketError(error) + } } } + diff --git a/SignalRSwift.podspec b/SignalRSwift.podspec index 570d170..8178b35 100644 --- a/SignalRSwift.podspec +++ b/SignalRSwift.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "SignalRSwift" - s.version = "2.0.3" + s.version = "2.2.8" s.summary = "A SignalR client library for iOS written in Swift" # This description is used to generate tags and improve search results. @@ -57,14 +57,14 @@ Pod::Spec.new do |s| # the deployment target. You can optionally include the target after the platform. # - s.platform = :ios, "8.0" + s.platform = :ios, "10.0" s.source = { :git => "https://github.com/AutosoftDMS/SignalR-Swift.git", :tag => "#{s.version}" } s.source_files = "SignalR-Swift/**/*.swift" s.exclude_files = "Classes/Exclude" - s.dependency "Alamofire", "~> 4.2" - s.dependency "Starscream", "~> 3.0" + s.dependency "Alamofire" + s.dependency "Starscream" end