Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 4 migration #210

Merged
merged 37 commits into from
Jan 18, 2018
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
77610af
Moved to swift 4, compiles
Ostrenkiy Dec 12, 2017
3541f02
updated settings for targets
Ostrenkiy Dec 12, 2017
d9da0a7
fixed multiple warnings
Ostrenkiy Dec 20, 2017
0617851
fixed swiftlint broken rule
Ostrenkiy Dec 21, 2017
b2780dc
Merge branch 'dev' into feature/swift-4
Ostrenkiy Dec 21, 2017
2194a63
Removed #if swift(>=3.2)
Ostrenkiy Dec 22, 2017
ff62fd1
minor
Ostrenkiy Dec 23, 2017
9173d97
removed old unused files (#211)
Ostrenkiy Dec 25, 2017
eb4a83d
onboarding -> iPhone X
Ostrenkiy Dec 25, 2017
6822270
Notifications -> iPhone X & onboarding fix
Ostrenkiy Dec 25, 2017
9891aad
Certificates -> iPhone X
Ostrenkiy Dec 25, 2017
cbdec30
Video Player --> iPhone X & small redesign
Ostrenkiy Dec 25, 2017
36e54c9
Downloads to iPhone X
Ostrenkiy Dec 26, 2017
7154c59
Downloads iPhone X fix
Ostrenkiy Jan 9, 2018
eacc83f
Discussions -> iPhone X
Ostrenkiy Jan 9, 2018
969412a
Course Preview -> iPhone X & added auto layout support
Ostrenkiy Jan 9, 2018
a56da25
Profile -> iPhone X
Ostrenkiy Jan 9, 2018
3103ba6
Auth -> iPhone X
Ostrenkiy Jan 9, 2018
4910766
Sections -> iPhone X
Ostrenkiy Jan 9, 2018
2cbe577
Units -> iPhone X
Ostrenkiy Jan 9, 2018
cdcf5b3
Courses -> iPhone X
Ostrenkiy Jan 10, 2018
51e48d2
Step content -> iPhone X
Ostrenkiy Jan 10, 2018
8ae78d2
Fixed sorting cell height constant
Ostrenkiy Jan 10, 2018
8031daf
Quizzes -> iPhone X & multiple layout fixes
Ostrenkiy Jan 11, 2018
14bbb44
Fixed quiz resizing bugs
Ostrenkiy Jan 11, 2018
9b2abd5
Added iPhone X support for most quizzes
Ostrenkiy Jan 11, 2018
023384b
Fixed code quiz insets
Ostrenkiy Jan 14, 2018
9c22a6e
Some fixes for adaptive targets
Ostrenkiy Jan 16, 2018
a8af0a0
fixed CustomSearchBar margins
Ostrenkiy Jan 16, 2018
3f9c08f
PickerViewController margins fix
Ostrenkiy Jan 16, 2018
948c762
Search queries margins
Ostrenkiy Jan 16, 2018
bd2b5e8
Some fixes for ArtView on iPhone X
Ostrenkiy Jan 16, 2018
b1db0a8
fixed video step layouts
Ostrenkiy Jan 16, 2018
1fdeb8c
Merge pull request #215 from StepicOrg/feature/iphone-x-support
Ostrenkiy Jan 17, 2018
ccf57a0
fixed video step constraints
Ostrenkiy Jan 17, 2018
60cff92
Removed 'New' from Profile and Settings controllers class names
Ostrenkiy Jan 17, 2018
03047b0
Removed 'New' from SearchResultsController
Ostrenkiy Jan 17, 2018
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
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -40,6 +40,7 @@ disabled_rules:
- unneeded_break_in_switch
- unneeded_parentheses_in_closure_argument
- switch_case_alignment
- class_delegate_protocol

opt_in_rules:
- explicit_init
4 changes: 2 additions & 2 deletions JSQWebViewController.swift
Original file line number Diff line number Diff line change
@@ -200,11 +200,11 @@ class WebViewController: UIViewController {

// MARK: Actions

final func didTapDoneButton(_ sender: UIBarButtonItem) {
@objc final func didTapDoneButton(_ sender: UIBarButtonItem) {
onDismiss?()
}

final func didTapSafariButton(_ sender: UIBarButtonItem) {
@objc final func didTapSafariButton(_ sender: UIBarButtonItem) {
if let url = webView.url {
UIApplication.shared.openURL(url)
}
14 changes: 7 additions & 7 deletions Podfile
Original file line number Diff line number Diff line change
@@ -29,26 +29,26 @@ def all_pods
pod 'Firebase/Analytics'
pod 'Firebase/RemoteConfig'

pod 'Mixpanel-swift', '2.2.3'
pod 'Mixpanel-swift', '2.3.0'

pod 'BEMCheckBox'
pod 'IQKeyboardManagerSwift'
pod 'Kanna', '~> 2.0.0'
pod 'Kanna', :git => 'https://github.com/tid-kijyun/Kanna.git', :branch => 'master'
pod 'CRToast', :git => 'https://github.com/cruffenach/CRToast.git', :branch => 'master'
pod 'TUSafariActivity', '~> 1.0'

pod "VK-ios-sdk"
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'

pod 'Presentr', '1.2.3'
pod 'Presentr', '1.3.0'

pod 'Agrume', :git => 'https://github.com/Ostrenkiy/Agrume.git', :branch => 'feature/single-horizontal-dismiss'
pod 'Highlightr'
pod 'Highlightr', :git => 'https://github.com/raspu/Highlightr.git', :branch => 'master'
pod "RFKeyboardToolbar", "~> 1.3"
pod 'TTTAttributedLabel'
pod 'PromiseKit', '~> 4.4'
pod 'Atributika', '~> 3.0' # update after migration to Swift 4
pod 'Atributika', '~> 4.0'
pod 'DeviceKit', '~> 1.0'
pod 'lottie-ios'
end
@@ -61,8 +61,8 @@ end
def adaptive_pods
pod 'Koloda', '4.3.1'
pod 'SDWebImage/GIF'
pod 'Charts', '3.0.2'
pod 'NotificationBannerSwift', '1.4.1'
pod 'Charts', '3.0.4'
pod 'NotificationBannerSwift', '1.5.2'
end

target 'Stepic' do
2,277 changes: 1,067 additions & 1,210 deletions Stepic.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
9 changes: 5 additions & 4 deletions Stepic.xcodeproj/xcshareddata/xcschemes/Stepic.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -40,6 +40,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -69,14 +70,14 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = "ru"
region = "RU"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
language = "ru"
region = "RU">
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
2 changes: 1 addition & 1 deletion Stepic/APIEndpoint.swift
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ class APIEndpoint {
result += "ids[]=\(element)&"
}
if result != "" {
result.remove(at: result.characters.index(before: result.endIndex))
result.remove(at: result.index(before: result.endIndex))
}
return result
}
Loading