From 6b928fc747c0facc11d84374798c2846e70719b3 Mon Sep 17 00:00:00 2001 From: Aaron McTavish Date: Wed, 12 Oct 2016 07:52:31 +0100 Subject: [PATCH 1/4] Update to CocoaPods 1.1.0 RC3 --- Brunel.xcodeproj/project.pbxproj | 40 +++++++++---------- Gemfile | 2 +- Gemfile.lock | 66 ++++++++++++++++---------------- Podfile.lock | 2 +- README.md | 2 +- 5 files changed, 57 insertions(+), 55 deletions(-) diff --git a/Brunel.xcodeproj/project.pbxproj b/Brunel.xcodeproj/project.pbxproj index 94d7cc1..6b900c8 100644 --- a/Brunel.xcodeproj/project.pbxproj +++ b/Brunel.xcodeproj/project.pbxproj @@ -499,13 +499,13 @@ isa = PBXNativeTarget; buildConfigurationList = 008280FF1C4CFE6600186513 /* Build configuration list for PBXNativeTarget "Brunel tvOS" */; buildPhases = ( - 901D4B45F1EA19BDEAEF945C /* Check Pods Manifest.lock */, + 901D4B45F1EA19BDEAEF945C /* [CP] Check Pods Manifest.lock */, 008280EF1C4CFE6500186513 /* Sources */, 008280F01C4CFE6500186513 /* Frameworks */, 008280F11C4CFE6500186513 /* Resources */, 001F5DA21C5757F100E3C520 /* ShellScript */, - B9EBD1D4B7934481D4323394 /* Embed Pods Frameworks */, - 272A4F4D00929962C50B37AE /* Copy Pods Resources */, + B9EBD1D4B7934481D4323394 /* [CP] Embed Pods Frameworks */, + 272A4F4D00929962C50B37AE /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -520,13 +520,13 @@ isa = PBXNativeTarget; buildConfigurationList = 00FED0A41C4CF10C00756A37 /* Build configuration list for PBXNativeTarget "Brunel iOS" */; buildPhases = ( - 59BD87CA2992D3C4F07105D3 /* Check Pods Manifest.lock */, + 59BD87CA2992D3C4F07105D3 /* [CP] Check Pods Manifest.lock */, 00FED08C1C4CF10C00756A37 /* Sources */, 00FED08D1C4CF10C00756A37 /* Frameworks */, 00FED08E1C4CF10C00756A37 /* Resources */, 00ACDB751C52656800C210F1 /* ShellScript */, - 13F9CA5BB0A752C60015E15E /* Embed Pods Frameworks */, - 0A1DAF4C2AC8C032275FB2C7 /* Copy Pods Resources */, + 13F9CA5BB0A752C60015E15E /* [CP] Embed Pods Frameworks */, + 0A1DAF4C2AC8C032275FB2C7 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -623,14 +623,14 @@ shellPath = /bin/sh; shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"SwiftLint does not exist, download from https://github.com/realm/SwiftLint\"\nfi"; }; - 0A1DAF4C2AC8C032275FB2C7 /* Copy Pods Resources */ = { + 0A1DAF4C2AC8C032275FB2C7 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -638,14 +638,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Brunel iOS/Pods-Brunel iOS-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 13F9CA5BB0A752C60015E15E /* Embed Pods Frameworks */ = { + 13F9CA5BB0A752C60015E15E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -653,14 +653,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Brunel iOS/Pods-Brunel iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 272A4F4D00929962C50B37AE /* Copy Pods Resources */ = { + 272A4F4D00929962C50B37AE /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -668,44 +668,44 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Brunel tvOS/Pods-Brunel tvOS-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 59BD87CA2992D3C4F07105D3 /* Check Pods Manifest.lock */ = { + 59BD87CA2992D3C4F07105D3 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_ROOT}/../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"; showEnvVarsInLog = 0; }; - 901D4B45F1EA19BDEAEF945C /* Check Pods Manifest.lock */ = { + 901D4B45F1EA19BDEAEF945C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_ROOT}/../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"; showEnvVarsInLog = 0; }; - B9EBD1D4B7934481D4323394 /* Embed Pods Frameworks */ = { + B9EBD1D4B7934481D4323394 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Gemfile b/Gemfile index ccf6cca..40231fb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'cocoapods', '1.0.0.beta.2' +gem 'cocoapods', '1.1.0.rc.3' diff --git a/Gemfile.lock b/Gemfile.lock index 9e41c0c..5a38efd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,67 +1,69 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.5.1) + activesupport (4.2.7.1) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - claide (1.0.0.beta.1) - cocoapods (1.0.0.beta.2) - activesupport (>= 4.0.2) - claide (>= 1.0.0.beta.1, < 2.0) - cocoapods-core (= 1.0.0.beta.2) - cocoapods-deintegrate (>= 1.0.0.beta.1, < 2.0) - cocoapods-downloader (>= 1.0.0.beta.1, < 2.0) - cocoapods-plugins (>= 1.0.0.beta.1, < 2.0) - cocoapods-search (>= 1.0.0.beta.1, < 2.0) - cocoapods-stats (>= 1.0.0.beta.2, < 2.0) - cocoapods-trunk (>= 1.0.0.beta.1, < 2.0) - cocoapods-try (>= 1.0.0.beta.2, < 2.0) + claide (1.0.1) + cocoapods (1.1.0.rc.3) + activesupport (>= 4.0.2, < 5) + claide (>= 1.0.1, < 2.0) + cocoapods-core (= 1.1.0.rc.3) + cocoapods-deintegrate (>= 1.0.1, < 2.0) + cocoapods-downloader (>= 1.1.1, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-stats (>= 1.0.0, < 2.0) + cocoapods-trunk (= 1.1.0.beta.1) + cocoapods-try (>= 1.1.0, < 2.0) colored (~> 1.2) escape (~> 0.0.4) - fourflusher (~> 0.3.0) - molinillo (~> 0.4.1) + fourflusher (~> 2.0) + gh_inspector (~> 1.0) + molinillo (~> 0.5.1) nap (~> 1.0) - xcodeproj (>= 1.0.0.beta.1, < 2.0) - cocoapods-core (1.0.0.beta.2) - activesupport (>= 4.0.2) + xcodeproj (>= 1.3.2, < 2.0) + cocoapods-core (1.1.0.rc.3) + activesupport (>= 4.0.2, < 5) fuzzy_match (~> 2.0.4) nap (~> 1.0) - cocoapods-deintegrate (1.0.0.beta.1) - cocoapods-downloader (1.0.0.beta.1) - cocoapods-plugins (1.0.0.beta.1) + cocoapods-deintegrate (1.0.1) + cocoapods-downloader (1.1.1) + cocoapods-plugins (1.0.0) nap - cocoapods-search (1.0.0.beta.1) - cocoapods-stats (1.0.0.beta.3) - cocoapods-trunk (1.0.0.beta.1) + cocoapods-search (1.0.0) + cocoapods-stats (1.0.0) + cocoapods-trunk (1.1.0.beta.1) nap (>= 0.8, < 2.0) netrc (= 0.7.8) - cocoapods-try (1.0.0.beta.2) + cocoapods-try (1.1.0) colored (1.2) escape (0.0.4) - fourflusher (0.3.0) + fourflusher (2.0.0) fuzzy_match (2.0.4) + gh_inspector (1.0.2) i18n (0.7.0) json (1.8.3) - minitest (5.8.4) - molinillo (0.4.2) + minitest (5.9.1) + molinillo (0.5.1) nap (1.1.0) netrc (0.7.8) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) - xcodeproj (1.0.0.beta.2) + xcodeproj (1.3.2) activesupport (>= 3) - claide (>= 1.0.0.beta.1, < 2.0) + claide (>= 1.0.1, < 2.0) colored (~> 1.2) PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.0.0.beta.2) + cocoapods (= 1.1.0.rc.3) BUNDLED WITH - 1.11.2 + 1.13.3 diff --git a/Podfile.lock b/Podfile.lock index b51de7f..afaf951 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -23,4 +23,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: a78be8bb6567caf1d2a6358edd99932f48f67ad8 -COCOAPODS: 1.0.0.beta.2 +COCOAPODS: 1.1.0.rc.3 diff --git a/README.md b/README.md index c744bf8..f8e2655 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ In the demo, the user can access live feeds of the current status of different l - Ruby - [Xcode 7.2](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#) -- [CocoaPods 1.0.0.beta.2](https://github.com/CocoaPods/CocoaPods/releases/tag/1.0.0.beta.2) +- [CocoaPods 1.1.0.rc.3](https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.rc.3) - [Alamofire](https://github.com/Alamofire/Alamofire) - [Moya](https://github.com/Moya/Moya) - [Result](https://github.com/antitypical/Result) From 33be9ccc87fee0ae05baa3c5a89e81fee7f739a2 Mon Sep 17 00:00:00 2001 From: Aaron McTavish Date: Wed, 12 Oct 2016 08:17:49 +0100 Subject: [PATCH 2/4] Update for Xcode 8 for iOS (Swift 2.3) - Update Xcode 8 for iOS Scheme - Update to Swift 2.3 - Update pods to Swift 2.3 compatible versions - Fix errors in TFLLine deserialisation --- Brunel.xcodeproj/project.pbxproj | 14 +++++++- .../xcschemes/Brunel iOS.xcscheme | 2 +- .../xcschemes/Brunel tvOS.xcscheme | 2 +- Podfile | 6 ++-- Podfile.lock | 36 +++++++++---------- README.md | 4 +-- Sources/API/TFLLineAPI.swift | 4 +++ Sources/API/TFLRestAPI.swift | 2 +- Sources/API/TFLStopPointAPI.swift | 4 +++ Sources/API/WikipediaAPI.swift | 4 +++ .../DashboardTableViewController.swift | 2 +- Sources/Model/TFLLine.swift | 21 ++++++----- Sources/Model/TFLModes.swift | 2 +- Sources/View/ClockView.swift | 2 +- 14 files changed, 67 insertions(+), 38 deletions(-) diff --git a/Brunel.xcodeproj/project.pbxproj b/Brunel.xcodeproj/project.pbxproj index 6b900c8..d4f7067 100644 --- a/Brunel.xcodeproj/project.pbxproj +++ b/Brunel.xcodeproj/project.pbxproj @@ -544,7 +544,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = ustwo; TargetAttributes = { 008280F21C4CFE6500186513 = { @@ -552,6 +552,7 @@ }; 00FED08F1C4CF10C00756A37 = { CreatedOnToolsVersion = 7.2; + LastSwiftMigration = 0800; }; }; }; @@ -840,6 +841,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = B483C3ADF7C7B3D290CCBB5C /* Pods-Brunel tvOS.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; INFOPLIST_FILE = "$(SRCROOT)/Sources-tvOS/Supporting Files/Info.plist"; @@ -856,6 +858,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7BE80DD8A3EE047F6CD52AE7 /* Pods-Brunel tvOS.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; INFOPLIST_FILE = "$(SRCROOT)/Sources-tvOS/Supporting Files/Info.plist"; @@ -881,8 +884,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -927,8 +932,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -948,6 +955,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -957,6 +965,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = FE0F06C94605BEFBDA1444D8 /* Pods-Brunel iOS.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; @@ -968,6 +977,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.Brunel; PRODUCT_NAME = Brunel; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 2.3; }; name = Debug; }; @@ -975,6 +985,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 48B4321B3A8401F018B6E793 /* Pods-Brunel iOS.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; @@ -985,6 +996,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.Brunel; PRODUCT_NAME = Brunel; + SWIFT_VERSION = 2.3; }; name = Release; }; diff --git a/Brunel.xcodeproj/xcshareddata/xcschemes/Brunel iOS.xcscheme b/Brunel.xcodeproj/xcshareddata/xcschemes/Brunel iOS.xcscheme index aec35f3..b88e404 100644 --- a/Brunel.xcodeproj/xcshareddata/xcschemes/Brunel iOS.xcscheme +++ b/Brunel.xcodeproj/xcshareddata/xcschemes/Brunel iOS.xcscheme @@ -1,6 +1,6 @@ 6.0' - pod 'SVProgressHUD', '2.0-beta3' - pod 'SwiftyJSON', '~> 2.3' + pod 'Moya', '~> 7.0.2' + pod 'SVProgressHUD', '~> 2.0' + pod 'SwiftyJSON', '~> 2.4' end target 'Brunel iOS' do diff --git a/Podfile.lock b/Podfile.lock index afaf951..21a80ea 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,26 +1,26 @@ PODS: - - Alamofire (3.1.5) - - Moya (6.1.3): - - Moya/Core (= 6.1.3) - - Moya/Core (6.1.3): - - Alamofire (~> 3.0) - - Result (~> 1.0) - - Result (1.0.1) - - SVProgressHUD (2.0-beta3) - - SwiftyJSON (2.3.2) + - Alamofire (3.5.1) + - Moya (7.0.2): + - Moya/Core (= 7.0.2) + - Moya/Core (7.0.2): + - Alamofire (~> 3.5) + - Result (~> 2.0) + - Result (2.1.3) + - SVProgressHUD (2.0.3) + - SwiftyJSON (2.4.0) DEPENDENCIES: - - Moya (~> 6.0) - - SVProgressHUD (= 2.0-beta3) - - SwiftyJSON (~> 2.3) + - Moya (~> 7.0.2) + - SVProgressHUD (~> 2.0) + - SwiftyJSON (~> 2.4) SPEC CHECKSUMS: - Alamofire: 5f730ba29fd113b7ddd71c1e65d0c630acf5d7b0 - Moya: 26b290a8d675c167ea6229ba08e07dce562265a5 - Result: caef80340451e1f07492fa1e89117f83613bce24 - SVProgressHUD: 7c27dc7cd60b62124155e7aca085c165a2c75e54 - SwiftyJSON: 04ccea08915aa0109039157c7974cf0298da292a + Alamofire: 0dfba1184a543e2aa160f4e39cac4e8aba48d223 + Moya: 430be684a6a53d5ad8c0b8222c4232d4f1810848 + Result: 18e1a7597fbcca5923c565b40a25a98afafdee02 + SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4 + SwiftyJSON: 96918c1bf505efa50c4f72957018dd3452090c9c -PODFILE CHECKSUM: a78be8bb6567caf1d2a6358edd99932f48f67ad8 +PODFILE CHECKSUM: 2b1ea1bfdbb44885ab138886605d57f33fd27172 COCOAPODS: 1.1.0.rc.3 diff --git a/README.md b/README.md index f8e2655..b96a582 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Twitter](https://img.shields.io/badge/twitter-@ustwo-blue.svg?style=flat)](http://twitter.com/ustwo) -This project is a demonstration of organisation for an app that runs on both iOS and tvOS platforms using a unified code base. It is built using Swift 2.1 by iOS developers at [ustwo](https://ustwo.com/). +This project is a demonstration of organisation for an app that runs on both iOS and tvOS platforms using a unified code base. It is built using Swift 2.3 by iOS developers at [ustwo](https://ustwo.com/). In the demo, the user can access live feeds of the current status of different lines across Transport for London's network. @@ -11,7 +11,7 @@ In the demo, the user can access live feeds of the current status of different l ## Dependencies - Ruby -- [Xcode 7.2](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#) +- [Xcode 8.0](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#) - [CocoaPods 1.1.0.rc.3](https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.rc.3) - [Alamofire](https://github.com/Alamofire/Alamofire) - [Moya](https://github.com/Moya/Moya) diff --git a/Sources/API/TFLLineAPI.swift b/Sources/API/TFLLineAPI.swift index 27752be..8fb5c36 100644 --- a/Sources/API/TFLLineAPI.swift +++ b/Sources/API/TFLLineAPI.swift @@ -66,6 +66,10 @@ extension TFLLineAPI: TargetType { return emptyStringData } + var multipartBody: [MultipartFormData]? { + return nil + } + // MARK: - Convenience private func csvFromArray(value: [String]) -> String { diff --git a/Sources/API/TFLRestAPI.swift b/Sources/API/TFLRestAPI.swift index b25f8cf..fc1bf75 100644 --- a/Sources/API/TFLRestAPI.swift +++ b/Sources/API/TFLRestAPI.swift @@ -112,5 +112,5 @@ struct TFLRestAPI { - returns: URL string for endpoint. */ func url(route: TargetType) -> String { - return route.baseURL.URLByAppendingPathComponent(route.path).absoluteString + return route.baseURL.URLByAppendingPathComponent(route.path)!.absoluteString! } diff --git a/Sources/API/TFLStopPointAPI.swift b/Sources/API/TFLStopPointAPI.swift index a3f822a..5829ea9 100644 --- a/Sources/API/TFLStopPointAPI.swift +++ b/Sources/API/TFLStopPointAPI.swift @@ -52,6 +52,10 @@ extension TFLStopPointAPI: TargetType { return emptyStringData } + var multipartBody: [MultipartFormData]? { + return nil + } + // MARK: - Convenience private func csvFromArray(value: [String]) -> String { diff --git a/Sources/API/WikipediaAPI.swift b/Sources/API/WikipediaAPI.swift index 17b0366..aaec309 100644 --- a/Sources/API/WikipediaAPI.swift +++ b/Sources/API/WikipediaAPI.swift @@ -50,4 +50,8 @@ extension WikipediaAPI: TargetType { return emptyStringData } + var multipartBody: [MultipartFormData]? { + return nil + } + } diff --git a/Sources/Controller/DashboardTableViewController.swift b/Sources/Controller/DashboardTableViewController.swift index 0e6a03b..4411022 100644 --- a/Sources/Controller/DashboardTableViewController.swift +++ b/Sources/Controller/DashboardTableViewController.swift @@ -38,7 +38,7 @@ final class DashboardTableViewController: LinesBaseTableViewController { } override func viewWillAppear(animated: Bool) { - scrollingTimer = NSTimer.scheduledTimerWithTimeInterval(Constants.Animation.Scrolling, target: self, selector: Selector("scrollingTimerFired:"), userInfo: nil, repeats: true) + scrollingTimer = NSTimer.scheduledTimerWithTimeInterval(Constants.Animation.Scrolling, target: self, selector: #selector(DashboardTableViewController.scrollingTimerFired(_:)), userInfo: nil, repeats: true) super.viewWillAppear(animated) } diff --git a/Sources/Model/TFLLine.swift b/Sources/Model/TFLLine.swift index 546f075..71ee888 100644 --- a/Sources/Model/TFLLine.swift +++ b/Sources/Model/TFLLine.swift @@ -17,12 +17,12 @@ import SwiftyJSON struct TFLLine { let color: UIColor - let created: NSDate + let created: NSDate? let identifier: String let lineStatuses: [TFLLineStatus] let mode: TFLModes let modeName: String - let modified: NSDate + let modified: NSDate? let name: String let serviceTypes: [TFLLineServiceType] @@ -40,24 +40,21 @@ struct TFLLine { guard let jsonIdentifier = jsonObject[JSONKeys.identifier].string, jsonModeName = jsonObject[JSONKeys.modeName].string, jsonMode = TFLModes(rawValue: jsonModeName), - jsonCreatedString = jsonObject[JSONKeys.created].string, - jsonCreated = TFLDateFormatter.sharedInstance.dateFromString(jsonCreatedString), jsonLineStatuses = jsonObject[JSONKeys.lineStatuses].array, - jsonModifiedString = jsonObject[JSONKeys.created].string, - jsonModified = TFLDateFormatter.sharedInstance.dateFromString(jsonModifiedString), jsonName = jsonObject[JSONKeys.name].string, jsonServiceTypes = jsonObject[JSONKeys.serviceTypes].array else { return nil } - created = jsonCreated identifier = jsonIdentifier mode = jsonMode modeName = jsonModeName - modified = jsonModified name = jsonName + created = TFLLine.dateFromJSON(jsonObject, key: JSONKeys.created) + modified = TFLLine.dateFromJSON(jsonObject, key: JSONKeys.modified) + var lineStatusesArray = [TFLLineStatus]() for jsonLineStatus in jsonLineStatuses { guard let lineStatus = TFLLineStatus(jsonObject: jsonLineStatus) else { @@ -96,4 +93,12 @@ struct TFLLine { } + private static func dateFromJSON(jsonObject: JSON, key: String) -> NSDate? { + guard let jsonDateString = jsonObject[key].string else { + return nil + } + + return TFLDateFormatter.sharedInstance.dateFromString(jsonDateString) + } + } diff --git a/Sources/Model/TFLModes.swift b/Sources/Model/TFLModes.swift index eb55e93..02454de 100644 --- a/Sources/Model/TFLModes.swift +++ b/Sources/Model/TFLModes.swift @@ -21,7 +21,7 @@ enum TFLModes: String, CustomStringConvertible { case Tram = "tram" case Underground = "tube" - static let allValues = [Bus, CableCar, DLR, NationalRail, Overground, River, TFLRail, Tram, Underground] + static let allValues = [Bus, CableCar, DLR, NationalRail, Overground, River, TFLRail, Tram, Underground] var description: String { switch self { diff --git a/Sources/View/ClockView.swift b/Sources/View/ClockView.swift index dee4453..1bc66fa 100644 --- a/Sources/View/ClockView.swift +++ b/Sources/View/ClockView.swift @@ -17,7 +17,7 @@ final class ClockLabel: UILabel { var on: Bool = false { didSet { if on { - updateTimer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: Selector("updateClock:"), userInfo: nil, repeats: true) + updateTimer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: #selector(ClockLabel.updateClock(_:)), userInfo: nil, repeats: true) } else { updateTimer?.invalidate() } From d7b1e2bff18fabe3ee83081c282035f927412178 Mon Sep 17 00:00:00 2001 From: Aaron McTavish Date: Wed, 12 Oct 2016 08:21:57 +0100 Subject: [PATCH 3/4] Update for Xcode 8 for tvOS (Swift 2.3) --- Brunel.xcodeproj/project.pbxproj | 2 ++ .../Classes/Controller/LineDetailViewController-TV.swift | 2 +- Sources-tvOS/Classes/Controller/LineWikiViewController.swift | 2 +- Sources/Controller/Abstract/SearchBaseTableViewController.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Brunel.xcodeproj/project.pbxproj b/Brunel.xcodeproj/project.pbxproj index d4f7067..83d89a0 100644 --- a/Brunel.xcodeproj/project.pbxproj +++ b/Brunel.xcodeproj/project.pbxproj @@ -849,6 +849,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.Brunel; PRODUCT_NAME = Brunel; SDKROOT = appletvos; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.1; }; @@ -866,6 +867,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.Brunel; PRODUCT_NAME = Brunel; SDKROOT = appletvos; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.1; }; diff --git a/Sources-tvOS/Classes/Controller/LineDetailViewController-TV.swift b/Sources-tvOS/Classes/Controller/LineDetailViewController-TV.swift index 29de22c..727e586 100644 --- a/Sources-tvOS/Classes/Controller/LineDetailViewController-TV.swift +++ b/Sources-tvOS/Classes/Controller/LineDetailViewController-TV.swift @@ -20,7 +20,7 @@ extension LineDetailViewController { return } - aboutButton.addTarget(self, action: Selector("aboutButtonPressed:"), forControlEvents: .PrimaryActionTriggered) + aboutButton.addTarget(self, action: #selector(LineDetailViewController.aboutButtonPressed(_:)), forControlEvents: .PrimaryActionTriggered) } diff --git a/Sources-tvOS/Classes/Controller/LineWikiViewController.swift b/Sources-tvOS/Classes/Controller/LineWikiViewController.swift index 7873f44..281eb1b 100644 --- a/Sources-tvOS/Classes/Controller/LineWikiViewController.swift +++ b/Sources-tvOS/Classes/Controller/LineWikiViewController.swift @@ -44,7 +44,7 @@ final class LineWikiViewController: BaseViewController { override func setupView() { super.setupView() - underlyingView.backButton.addTarget(self, action: Selector("backButtonPressed:"), forControlEvents: .PrimaryActionTriggered) + underlyingView.backButton.addTarget(self, action: #selector(LineWikiViewController.backButtonPressed(_:)), forControlEvents: .PrimaryActionTriggered) } override func viewWillDisappear(animated: Bool) { diff --git a/Sources/Controller/Abstract/SearchBaseTableViewController.swift b/Sources/Controller/Abstract/SearchBaseTableViewController.swift index 2e063e2..7664dbf 100644 --- a/Sources/Controller/Abstract/SearchBaseTableViewController.swift +++ b/Sources/Controller/Abstract/SearchBaseTableViewController.swift @@ -99,7 +99,7 @@ class SearchTableViewController: UITableViewController, searchController.dimsBackgroundDuringPresentation = false #else - let searchButton = UIBarButtonItem(title: "Search", style: .Plain, target: self, action: Selector("searchButtonPressed:")) + let searchButton = UIBarButtonItem(title: "Search", style: .Plain, target: self, action: #selector(SearchTableViewController.searchButtonPressed(_:))) searchButton.accessibilityIdentifier = AccessibilityIdentifiers.Buttons.SearchButton navigationItem.rightBarButtonItem = searchButton From ed0f7211d47a590447c60dde90ec41b114c43cd6 Mon Sep 17 00:00:00 2001 From: Aaron McTavish Date: Wed, 12 Oct 2016 08:30:21 +0100 Subject: [PATCH 4/4] Update Changelog for v1.1.0 - Added notes about v1.1.0 - Bumped project version to v1.1.0 --- CHANGELOG.md | 10 +++++++++- Sources-iOS/Supporting Files/Info.plist | 2 +- Sources-tvOS/Supporting Files/Info.plist | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ddce7..4598080 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,20 @@ All notable changes to this project will be documented in this file. `Brunel` adheres to [Semantic Versioning](http://semver.org/). #### 1.x Releases +- `1.1.x` Releases - [1.1.0](#110) - `1.0.x` Releases - [1.0.0](#100) --- +## [1.1.0](https://github.com/ustwo/brunel/releases/tag/1.1.0) + +#### Updated +- Migrated to Xcode 8 and Swift 2.3. +- Updated CocoaPods dependency to v1.1.0 RC3. +- Updated pods to versions that support Swift 2.3. + + ## [1.0.0](https://github.com/ustwo/brunel/releases/tag/1.0.0) -Released on some future date. #### Added - Initial release of `Brunel`. diff --git a/Sources-iOS/Supporting Files/Info.plist b/Sources-iOS/Supporting Files/Info.plist index 1166768..b1b717f 100644 --- a/Sources-iOS/Supporting Files/Info.plist +++ b/Sources-iOS/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0.0 + 1.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/Sources-tvOS/Supporting Files/Info.plist b/Sources-tvOS/Supporting Files/Info.plist index a3faa52..2d59781 100644 --- a/Sources-tvOS/Supporting Files/Info.plist +++ b/Sources-tvOS/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0.0 + 1.1.0 CFBundleSignature ???? CFBundleVersion