Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Swift 5 and Dependency updates. #193

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
defaults: &defaults
macos:
xcode: "9.0"
xcode: "10.2"
shell: /bin/bash --login -eo pipefail
aliases:
- &prepare
|
|
git submodule update --init --recursive
gem install bundler
bundle install
Expand All @@ -20,7 +20,7 @@ jobs:
steps:
- checkout
- run: *prepare
- run: xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk iphonesimulator -scheme ParseLiveQuery-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone 6 Plus" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c;
- run: xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk iphonesimulator -scheme ParseLiveQuery-iOS -configuration Debug -destination "platform=iOS Simulator,OS=12.2,name=iPhone X" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c;
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: build/reports
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.3
ruby-2.4
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branches:
- /^v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?$/
language: objective-c
os: osx
osx_image: xcode10.1
osx_image: xcode10.2
cache:
- cocoapods
install: bundle install
Expand Down
6 changes: 3 additions & 3 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "BoltsFramework/Bolts-Swift" "e9baa72d04521c3b25ef4fa6fef12b340953ee02"
github "ParsePlatform/Parse-SDK-iOS-OSX" ~> 1.17.0
github "daltoniam/Starscream" ~> 3.0.4
github "BoltsFramework/Bolts-Swift" "e7811181243e9dfa9462ec3048cd5957519fa26f"
github "ParsePlatform/Parse-SDK-iOS-OSX" ~> 1.17.2
github "daltoniam/Starscream" ~> 3.1.0
10 changes: 4 additions & 6 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
github "BoltsFramework/Bolts-ObjC" "1.9.0"
github "BoltsFramework/Bolts-Swift" "e9baa72d04521c3b25ef4fa6fef12b340953ee02"
github "ParsePlatform/Parse-SDK-iOS-OSX" "1.17.0"
github "daltoniam/Starscream" "3.0.4"
github "daltoniam/common-crypto-spm" "1.1.0"
github "daltoniam/zlib-spm" "1.1.0"
github "facebook/facebook-ios-sdk" "sdk-version-4.31.1"
github "BoltsFramework/Bolts-Swift" "e7811181243e9dfa9462ec3048cd5957519fa26f"
github "ParsePlatform/Parse-SDK-iOS-OSX" "1.17.2"
github "daltoniam/Starscream" "3.1.0"
github "facebook/facebook-ios-sdk" "v4.44.1"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Parse-SDK-iOS-OSX
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Starscream
Submodule Starscream updated 56 files
+93 −2 .gitignore
+0 −1 .swift-version
+7 −0 .travis.yml
+37 −7 CHANGELOG.md
+0 −2 Cartfile
+0 −2 Cartfile.resolved
+4 −0 Gemfile
+201 −0 Gemfile.lock
+8 −0 Package.resolved
+9 −7 Package.swift
+11 −1 README.md
+1 −1 Sources/Info.plist
+1 −1 Sources/Starscream/Compression.swift
+92 −0 Sources/Starscream/SSLClientCertificate.swift
+5 −5 Sources/Starscream/SSLSecurity.swift
+96 −84 Sources/Starscream/WebSocket.swift
+3 −8 Starscream.podspec
+39 −81 Starscream.xcodeproj/project.pbxproj
+3 −5 Starscream.xcodeproj/xcshareddata/xcschemes/Starscream.xcscheme
+3 −1 Tests/CompressionTests.swift
+6 −0 build.sh
+1 −1 examples/SimpleTest/ws-server.rb
+11 −0 examples/WebSocketsOrgEcho/Podfile
+16 −0 examples/WebSocketsOrgEcho/Podfile.lock
+24 −0 examples/WebSocketsOrgEcho/Pods/Local Podspecs/Starscream.podspec.json
+16 −0 examples/WebSocketsOrgEcho/Pods/Manifest.lock
+26 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho-Info.plist
+182 −0 ...tsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho-acknowledgements.markdown
+5 −0 ...cketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho-acknowledgements.plist
+5 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho-dummy.m
+158 −0 ...les/WebSocketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho-frameworks.sh
+16 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho-umbrella.h
+11 −0 ...es/WebSocketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho.debug.xcconfig
+6 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho.modulemap
+11 −0 .../WebSocketsOrgEcho/Pods/Target Support Files/Pods-WebSocketsOrgEcho/Pods-WebSocketsOrgEcho.release.xcconfig
+26 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Starscream/Starscream-Info.plist
+5 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Starscream/Starscream-dummy.m
+12 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Starscream/Starscream-prefix.pch
+16 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Starscream/Starscream-umbrella.h
+6 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Starscream/Starscream.modulemap
+9 −0 examples/WebSocketsOrgEcho/Pods/Target Support Files/Starscream/Starscream.xcconfig
+10 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho.xcworkspace/contents.xcworkspacedata
+8 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+21 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/AppDelegate.swift
+98 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/Assets.xcassets/AppIcon.appiconset/Contents.json
+6 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/Assets.xcassets/Contents.json
+25 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/Base.lproj/LaunchScreen.storyboard
+40 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/Base.lproj/Main.storyboard
+45 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/Info.plist
+19 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/URL+Extensions.swift
+42 −0 examples/WebSocketsOrgEcho/WebSocketsOrgEcho/ViewController.swift
+28 −0 fastlane/Fastfile
+29 −0 fastlane/README.md
+4 −0 release.sh
+0 −2 zlib/include.h
+0 −9 zlib/module.modulemap
2 changes: 1 addition & 1 deletion Carthage/Checkouts/facebook-ios-sdk
Submodule facebook-ios-sdk updated 485 files
6 changes: 3 additions & 3 deletions Examples/LiveQueryDemo-ObjC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
};
buildConfigurationList = F519CBAC1CA9CA04005295C0 /* Build configuration list for PBXProject "LiveQueryDemo-ObjC" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -244,7 +244,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.parse.LiveQueryDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -257,7 +257,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.parse.LiveQueryDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
6 changes: 3 additions & 3 deletions Examples/LiveQueryDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
};
buildConfigurationList = F59F85A71C9BB48200566A29 /* Build configuration list for PBXProject "LiveQueryDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -225,7 +225,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.parse.LiveQueryDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -239,7 +239,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.parse.LiveQueryDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
8 changes: 4 additions & 4 deletions ParseLiveQuery.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.platform = :ios, :osx, :tvos
s.swift_version = '4.2'
s.cocoapods_version = '>= 1.4'
s.swift_version = '5.0'
s.cocoapods_version = '>= 1.5.3'

s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'
Expand All @@ -22,8 +22,8 @@ Pod::Spec.new do |s|
s.source_files = 'Sources/ParseLiveQuery/**/*.{swift,h}'
s.module_name = 'ParseLiveQuery'

s.dependency 'Parse', '~> 1.17.0'
s.dependency 'Parse', '~> 1.17.2'
s.dependency 'Bolts-Swift', '~> 1.4.0'
s.dependency 'Starscream', '~> 3.0.4'
s.dependency 'Starscream', '~> 3.1.0'
s.dependency 'Bolts', '~> 1.9.0'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
10 changes: 5 additions & 5 deletions Sources/ParseLiveQuery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
};
buildConfigurationList = F5256FC81BD71F9A0052FB8A /* Build configuration list for PBXProject "ParseLiveQuery" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -848,7 +848,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -872,7 +872,7 @@
PRODUCT_NAME = ParseLiveQuery;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -898,7 +898,7 @@
SKIP_INSTALL = YES;
SWIFT_INSTALL_OBJC_HEADER = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -924,7 +924,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_INSTALL_OBJC_HEADER = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseLiveQuery/Internal/ClientPrivate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ extension Event {
extension Client {
fileprivate func subscriptionRecord(_ requestId: RequestId) -> SubscriptionRecord? {
guard
let recordIndex = self.subscriptions.index(where: { $0.requestId == requestId }) else {
let recordIndex = self.subscriptions.firstIndex(where: { $0.requestId == requestId }) else {
return nil
}
let record = self.subscriptions[recordIndex]
Expand Down Expand Up @@ -225,7 +225,7 @@ extension Client {

case .unsubscribed(let requestId):
guard
let recordIndex = self.subscriptions.index(where: { $0.requestId == requestId })
let recordIndex = self.subscriptions.firstIndex(where: { $0.requestId == requestId })
else {
break
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseLiveQuery/Internal/Operation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ enum ClientOperation {

enum ServerResponse {
case redirect(url: String)
case connected()
case connected

case subscribed(requestId: Client.RequestId)
case unsubscribed(requestId: Client.RequestId)
Expand Down Expand Up @@ -80,7 +80,7 @@ enum ServerResponse {
let rawOperation: String = try jsonValue(json, "op")
switch rawOperation {
case "connected":
self = .connected()
self = .connected

case "redirect":
self = .redirect(url: try jsonValue(json, "url"))
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseLiveQuery/Internal/QueryEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ extension PFGeoPoint {
}

fileprivate extension Formatter {
fileprivate static let iso8601: DateFormatter = {
static let iso8601: DateFormatter = {
let formatter = DateFormatter()
formatter.calendar = Calendar(identifier: .iso8601)
formatter.locale = Locale(identifier: "en_US_POSIX")
Expand All @@ -66,7 +66,7 @@ fileprivate extension Formatter {
}

fileprivate extension Date {
fileprivate var encodedString: String {
var encodedString: String {
return Formatter.iso8601.string(from: self)
}
}