Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Swift 4.2 update + pod update (#310)
Browse files Browse the repository at this point in the history
* Swift 4.2 support

* Updated to xcode10

* Updated pods

* Changed Sweeft from TG908 fork back to nerdsupremacist master branch.
  • Loading branch information
TG908 committed Oct 19, 2018
1 parent 2824708 commit 81d9675
Show file tree
Hide file tree
Showing 31 changed files with 128 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,5 +1,5 @@
language: objective-c # [sic]. Travis uses objective-c just to determine it needs to use the xcode cli
osx_image: xcode9.3
osx_image: xcode10

# cache:
# directories:
Expand Down
12 changes: 4 additions & 8 deletions Podfile
Expand Up @@ -5,11 +5,11 @@ platform :ios, '10.2'
use_frameworks!

target 'Campus' do
pod 'Sweeft', :git => 'https://github.com/TG908/Sweeft.git', :branch => 'master'
pod 'Sweeft', :git => 'https://github.com/nerdsupremacist/Sweeft.git', :branch => 'master'
pod 'Fuzzi', '~> 0.1.1'
pod 'ASWeekSelectorView', '~> 1.0'
pod 'CalendarLib', '~> 2.0'
pod 'SWXMLHash', '~> 4.6.0'
pod 'SWXMLHash', '~> 4.7.4'
pod 'TKSubmitTransition', :git => 'https://github.com/entotsu/TKSubmitTransition.git', :branch => 'swift4'
pod 'Kanna', '~> 4.0.0'
pod 'Kingfisher', '~> 4.0'
Expand All @@ -29,14 +29,10 @@ end

post_install do |installer|

targets_swift_4 = ['Kanna','TKSubmitTransition','SWXMLHash','CalendarLib','ASWeekSelectorView','AYSlidingPickerView','Fuzzi']
targets_swift_3 = ['Sweeft', 'TKSubmitTransition']

installer.pods_project.targets.each do |target|
if targets_swift_4.include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
else
if targets_swift_3.include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.3'
end
Expand Down
113 changes: 71 additions & 42 deletions Podfile.lock
Expand Up @@ -3,40 +3,67 @@ PODS:
- CalendarLib (2.0):
- OrderedDictionary (~> 1.2)
- OSCache (~> 1.2)
- Crashlytics (3.10.2):
- Fabric (~> 1.7.7)
- Fabric (1.7.7)
- Firebase (5.2.0):
- Firebase/Core (= 5.2.0)
- Firebase/Core (5.2.0):
- Crashlytics (3.10.9):
- Fabric (~> 1.7.13)
- Fabric (1.7.13)
- Firebase (5.10.0):
- Firebase/Core (= 5.10.0)
- Firebase/Core (5.10.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.0.1)
- Firebase/CoreOnly (5.2.0):
- FirebaseCore (= 5.0.3)
- FirebaseAnalytics (5.0.1):
- FirebaseCore (~> 5.0)
- FirebaseInstanceID (~> 3.0)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- FirebaseAnalytics (= 5.2.0)
- Firebase/CoreOnly (5.10.0):
- FirebaseCore (= 5.1.5)
- FirebaseAnalytics (5.2.0):
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.2)
- GoogleAppMeasurement (~> 5.2)
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- FirebaseCore (5.0.3):
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- FirebaseInstanceID (3.1.0):
- FirebaseCore (~> 5.0)
- FirebaseCore (5.1.5):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseInstanceID (3.2.2):
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.3)
- GoogleUtilities/UserDefaults (~> 5.3)
- Fuzzi (0.1.1)
- GoogleToolboxForMac/Defines (2.1.4)
- "GoogleToolboxForMac/NSData+zlib (2.1.4)":
- GoogleToolboxForMac/Defines (= 2.1.4)
- Kanna (4.0.0)
- Kingfisher (4.8.0)
- GoogleAppMeasurement (5.2.0):
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- GoogleUtilities/AppDelegateSwizzler (5.3.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (5.3.2)
- GoogleUtilities/Logger (5.3.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (5.3.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (5.3.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (5.3.2)"
- GoogleUtilities/Reachability (5.3.2):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (5.3.2):
- GoogleUtilities/Logger
- Kanna (4.0.2)
- Kingfisher (4.10.0)
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
- nanopb/encode (= 0.3.8)
- nanopb/decode (0.3.8)
- nanopb/encode (0.3.8)
- OrderedDictionary (1.4)
- OSCache (1.2.1)
- Sweeft (0.15.3)
- SWXMLHash (4.6.0)
- Sweeft (0.15.2)
- SWXMLHash (4.7.4)
- TKSubmitTransition (2.0)

DEPENDENCIES:
Expand All @@ -48,8 +75,8 @@ DEPENDENCIES:
- Fuzzi (~> 0.1.1)
- Kanna (~> 4.0.0)
- Kingfisher (~> 4.0)
- Sweeft (from `https://github.com/TG908/Sweeft.git`, branch `master`)
- SWXMLHash (~> 4.6.0)
- Sweeft (from `https://github.com/nerdsupremacist/Sweeft.git`, branch `master`)
- SWXMLHash (~> 4.7.4)
- TKSubmitTransition (from `https://github.com/entotsu/TKSubmitTransition.git`, branch `swift4`)

SPEC REPOS:
Expand All @@ -63,7 +90,8 @@ SPEC REPOS:
- FirebaseCore
- FirebaseInstanceID
- Fuzzi
- GoogleToolboxForMac
- GoogleAppMeasurement
- GoogleUtilities
- Kanna
- Kingfisher
- nanopb
Expand All @@ -74,39 +102,40 @@ SPEC REPOS:
EXTERNAL SOURCES:
Sweeft:
:branch: master
:git: https://github.com/TG908/Sweeft.git
:git: https://github.com/nerdsupremacist/Sweeft.git
TKSubmitTransition:
:branch: swift4
:git: https://github.com/entotsu/TKSubmitTransition.git

CHECKOUT OPTIONS:
Sweeft:
:commit: b57b02d909c7540a077314216c13b6f85ef5ecb6
:git: https://github.com/TG908/Sweeft.git
:commit: d95af83a7abc27ffab66e076466e91f2a8f2ae49
:git: https://github.com/nerdsupremacist/Sweeft.git
TKSubmitTransition:
:commit: 29fac6072451a4def5cde567075bfc62a728bb1f
:git: https://github.com/entotsu/TKSubmitTransition.git

SPEC CHECKSUMS:
ASWeekSelectorView: 396acc65f14aa09441528fbd0b2ec46989d8cb4a
CalendarLib: 040a8a655376581d8dc7c3c63196ddcf5223f471
Crashlytics: 0360624eea1c978a743feddb2fb1ef8b37fb7a0d
Fabric: bda89e242bce1b7b8ab264248cf3407774ce0095
Firebase: 25ed0412036d7d008568d1fb4d2e9d81ea8a0a2c
FirebaseAnalytics: b3628aea54c50464c32c393fb2ea032566e7ecc2
FirebaseCore: a3c87242451633fff8490183898075ce77d168d2
FirebaseInstanceID: 05d779cbb97bd5bd5c51a38a903fc9cfe1b2454a
Crashlytics: 55e24fc23989680285a21cb1146578d9d18e432c
Fabric: 25d0963b691fc97be566392243ff0ecef5a68338
Firebase: 6691d47562a780c26281ce8464518faafc90c610
FirebaseAnalytics: 831f1f127f4a75698e9875a87bf7e2668730d953
FirebaseCore: c6079de64c1a87000e52e9b408dddcadc901177f
FirebaseInstanceID: 78ba376fcd5b94c001f9999b2cbd3d1f1e56e78d
Fuzzi: be301db91f05b4d3191756601e326f5b6d500932
GoogleToolboxForMac: 91c824d21e85b31c2aae9bb011c5027c9b4e738f
Kanna: d5ae2a26472f7e7a474e7f36a9cd8aa2c8c63ad3
Kingfisher: 976d828df2b24834c6a3f2fc4d82cdbd26552be1
GoogleAppMeasurement: 2b3a023a61239c8d002e6e4fcf4abce8eddce0e0
GoogleUtilities: 82f04aeff8426309dbdbc75f6c8accd1e584a5da
Kanna: c60b61d72554bf04ed1ee074f9b379855cab4892
Kingfisher: 43c4b802d8b5256cf1f4379e9cd10b329be6d3e2
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
OrderedDictionary: 138c8d2e358d3a0c9adda15c6c7db24e8e3b09e6
OSCache: 826996b68e8542a8a3d8af1ab0a0fc3070d8f357
Sweeft: 7421bac377e41a4678cdb711822536445e404091
SWXMLHash: 3c39a53723202800e9e1a87f14b2fe7ac1da98ec
Sweeft: 89d3d1b18635c862a6284483bae9b235a450f049
SWXMLHash: b35739a5cfd915c3b482977aa720d6708e260a90
TKSubmitTransition: 647b907508da58ba864141e3c4382442ec536d40

PODFILE CHECKSUM: a6f5636dd15a83683d41c36033e5697c2fcf19fa
PODFILE CHECKSUM: 226bb8c09114d5a789fb98e80c567472a1662462

COCOAPODS: 1.5.3
36 changes: 14 additions & 22 deletions TUM Campus App.xcodeproj/project.pbxproj
Expand Up @@ -1163,7 +1163,7 @@
0E424F441BE16DBD00B5DFCB = {
CreatedOnToolsVersion = 7.1;
DevelopmentTeam = LQ83GZ8GRK;
LastSwiftMigration = 0930;
LastSwiftMigration = 1010;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 1;
Expand All @@ -1173,18 +1173,18 @@
0E424F581BE16DBE00B5DFCB = {
CreatedOnToolsVersion = 7.1;
DevelopmentTeam = ZGV2PY25EN;
LastSwiftMigration = 0930;
LastSwiftMigration = 1010;
TestTargetID = 0E424F441BE16DBD00B5DFCB;
};
504C29281E2BBB9C007583E2 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0930;
LastSwiftMigration = 1010;
ProvisioningStyle = Automatic;
TestTargetID = 0E424F441BE16DBD00B5DFCB;
};
50F798DD1E71615400FA4E49 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0930;
LastSwiftMigration = 1010;
ProvisioningStyle = Automatic;
TestTargetID = 0E424F441BE16DBD00B5DFCB;
};
Expand Down Expand Up @@ -1309,7 +1309,7 @@
"${BUILT_PRODUCTS_DIR}/ASWeekSelectorView/ASWeekSelectorView.framework",
"${BUILT_PRODUCTS_DIR}/CalendarLib/CalendarLib.framework",
"${BUILT_PRODUCTS_DIR}/Fuzzi/Fuzzi.framework",
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/Kanna/Kanna.framework",
"${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework",
"${BUILT_PRODUCTS_DIR}/OSCache/OSCache.framework",
Expand All @@ -1324,7 +1324,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ASWeekSelectorView.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CalendarLib.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Fuzzi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kanna.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OSCache.framework",
Expand Down Expand Up @@ -1751,8 +1751,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "TUM Campus App/TUM Campus App-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -1773,8 +1772,7 @@
PRODUCT_BUNDLE_IDENTIFIER = de.tum.campusapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "TUM Campus App/TUM Campus App-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -1788,8 +1786,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "de.tum.in.www1.ios15.TUM-Campus-AppUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = "TUM Campus App";
USES_XCTRUNNER = YES;
};
Expand All @@ -1804,8 +1801,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "de.tum.in.www1.ios15.TUM-Campus-AppUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = "TUM Campus App";
USES_XCTRUNNER = YES;
};
Expand All @@ -1824,8 +1820,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "de.tum.in.www1.ios15.TUM-Campus-AppUnitTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Campus.app/Campus";
};
name = Debug;
Expand All @@ -1841,8 +1836,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "de.tum.in.www1.ios15.TUM-Campus-AppUnitTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Campus.app/Campus";
};
name = Release;
Expand All @@ -1859,8 +1853,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = Campus;
};
name = Debug;
Expand All @@ -1875,8 +1868,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "de.tum.in.www1.ios15.TUM-Campus-AutomatedScreenshots.AutomatedScreenshots";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = Campus;
};
name = Release;
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 2 additions & 2 deletions TUM Campus App/AppDelegate.swift
Expand Up @@ -16,7 +16,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 {
initFirebase()
setupAppearance()
conditionallyShowLoginViewController()
Expand All @@ -29,7 +29,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

private func setupAppearance() {
UINavigationBar.appearance().barTintColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)
UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor: Constants.tumBlue]
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor: Constants.tumBlue]
UINavigationBar.appearance().tintColor = Constants.tumBlue
}

Expand Down
2 changes: 1 addition & 1 deletion TUM Campus App/BookRentalHTML.swift
Expand Up @@ -43,7 +43,7 @@ extension BookRentalHTML {
return nil
}
if tableItems.count > 1 {
return stride(from: 0, to: tableItems.count, by: 2).flatMap { BookRental(td1: tableItems[$0], td2: tableItems[$0 + 1]) }
return stride(from: 0, to: tableItems.count, by: 2).compactMap { BookRental(td1: tableItems[$0], td2: tableItems[$0 + 1]) }
} else {
return .empty
}
Expand Down
2 changes: 1 addition & 1 deletion TUM Campus App/CafeteriaConstants.swift
Expand Up @@ -117,7 +117,7 @@ enum CafeteriaConstants {

let matches = regex.matches(in: output as String, options: [], range: NSMakeRange(0, output.length))

matchedAnnotations = matches.flatMap { output.substring(with: $0.range) }
matchedAnnotations = matches.compactMap { output.substring(with: $0.range) }

for match in matches {

Expand Down

0 comments on commit 81d9675

Please sign in to comment.