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

refactor: [FC-0072] migrate project to swift 6 #544

Merged
Merged
Show file tree
Hide file tree
Changes from 9 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
18 changes: 9 additions & 9 deletions Authorization/Authorization.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugStage;
Expand Down Expand Up @@ -829,7 +829,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseStage;
Expand Down Expand Up @@ -1054,7 +1054,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugDev;
Expand Down Expand Up @@ -1146,7 +1146,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseDev;
Expand Down Expand Up @@ -1245,7 +1245,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugProd;
Expand Down Expand Up @@ -1337,7 +1337,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseProd;
Expand Down Expand Up @@ -1494,7 +1494,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -1528,7 +1528,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down Expand Up @@ -1605,7 +1605,7 @@
repositoryURL = "https://github.com/openedx/openedx-app-foundation-ios/";
requirement = {
kind = exactVersion;
version = 1.0.0;
version = 1.0.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation
import Core

//sourcery: AutoMockable
@MainActor
public protocol AuthorizationRouter: BaseRouter {
func showUpdateRequiredView(showAccountLink: Bool)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public struct SignInView: View {
.transition(.move(edge: .top))
.onAppear {
doAfter(Theme.Timeout.snackbarMessageLongTimeout) {
viewModel.alertMessage = nil
viewModel.alertMessage = nil
}
}
}
Expand All @@ -271,7 +271,7 @@ public struct SignInView: View {
}.transition(.move(edge: .bottom))
.onAppear {
doAfter(Theme.Timeout.snackbarMessageLongTimeout) {
viewModel.errorMessage = nil
viewModel.errorMessage = nil
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import FacebookLogin
import GoogleSignIn
import MSAL

@MainActor
public class SignInViewModel: ObservableObject {

@Published private(set) var isShowProgress = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public struct SignUpView: View {
.ignoresSafeArea(.all, edges: .horizontal)
.background(Theme.Colors.background.ignoresSafeArea(.all))
.navigationBarHidden(true)
.onFirstAppear{
.onFirstAppear {
viewModel.trackScreenEvent()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import FacebookLogin
import GoogleSignIn
import MSAL

public class SignUpViewModel: ObservableObject {
@MainActor
public final class SignUpViewModel: ObservableObject {

@Published var isShowProgress = false
@Published var scrollTo: Int?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import SwiftUI
import Core
import OEXFoundation

public class ResetPasswordViewModel: ObservableObject {
@MainActor
public final class ResetPasswordViewModel: ObservableObject {

@Published private(set) var isShowProgress = false
@Published private(set) var showError: Bool = false
Expand Down
3 changes: 1 addition & 2 deletions Authorization/Authorization/Presentation/SSO/SSOHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import KeychainSwift
A Helper for some of the SSO preferences.
Keeps data under the UserDefaults.
*/
public class SSOHelper: NSObject {
public final class SSOHelper: NSObject {

private let keychain: KeychainSwift
public enum SSOHelperKeys: String, CaseIterable {
Expand Down Expand Up @@ -77,4 +77,3 @@ public class SSOHelper: NSObject {
cookieSignature = nil
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import FacebookLogin
import GoogleSignIn
import MSAL

@MainActor
public class SSOWebViewModel: ObservableObject {

@Published private(set) var isShowProgress = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ enum SocialAuthDetails {
}
}

@MainActor
final public class SocialAuthViewModel: ObservableObject {

// MARK: - Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import Core

@MainActor
public class StartupViewModel: ObservableObject {
let router: AuthorizationRouter
let analytics: CoreAnalytics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import OEXFoundation
import Alamofire
import SwiftUI

@MainActor
final class ResetPasswordViewModelTests: XCTestCase {

func testResetPasswordValidationEmailError() async throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import OEXFoundation
import Alamofire
import SwiftUI

@MainActor
final class SignInViewModelTests: XCTestCase {

override func setUpWithError() throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import OEXFoundation
import Alamofire
import SwiftUI

@MainActor
final class SignUpViewModelTests: XCTestCase {

override func setUpWithError() throws {
Expand Down
60 changes: 25 additions & 35 deletions Core/Core.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@
BAFB99902B14B377007D09F9 /* GoogleConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAFB998F2B14B377007D09F9 /* GoogleConfig.swift */; };
BAFB99922B14E23D007D09F9 /* AppleSignInConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAFB99912B14E23D007D09F9 /* AppleSignInConfig.swift */; };
C8C446EF233F81B9FABB77D2 /* Pods_App_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 349B90CD6579F7B8D257E515 /* Pods_App_Core.framework */; };
CE09B2B62CE796AE0090DB53 /* InvalidCoreDataContextError.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE09B2B52CE796AE0090DB53 /* InvalidCoreDataContextError.swift */; };
CE1D5B7D2CE65D360019CA34 /* Protected.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1D5B7C2CE65D360019CA34 /* Protected.swift */; };
CE54C2D22CC80D8500E529F9 /* DownloadManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE54C2D12CC80D8500E529F9 /* DownloadManagerTests.swift */; };
CE57127C2CD109DB00D4AB17 /* OEXFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = CE57127B2CD109DB00D4AB17 /* OEXFoundation */; };
CE7CAF392CC1561E00E0AC9D /* OEXFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = CE7CAF382CC1561E00E0AC9D /* OEXFoundation */; };
Expand Down Expand Up @@ -359,6 +361,8 @@
BAFB99912B14E23D007D09F9 /* AppleSignInConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleSignInConfig.swift; sourceTree = "<group>"; };
C28D4872BAB1276B9AD24A33 /* Pods-CoreTests.debugdev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreTests.debugdev.xcconfig"; path = "Target Support Files/Pods-CoreTests/Pods-CoreTests.debugdev.xcconfig"; sourceTree = "<group>"; };
C7E5BCE79CE297B20777B27A /* Pods-App-Core.debugprod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Core.debugprod.xcconfig"; path = "Target Support Files/Pods-App-Core/Pods-App-Core.debugprod.xcconfig"; sourceTree = "<group>"; };
CE09B2B52CE796AE0090DB53 /* InvalidCoreDataContextError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvalidCoreDataContextError.swift; sourceTree = "<group>"; };
CE1D5B7C2CE65D360019CA34 /* Protected.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Protected.swift; sourceTree = "<group>"; };
CE54C2D12CC80D8500E529F9 /* DownloadManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadManagerTests.swift; sourceTree = "<group>"; };
CE953A3A2CD0DA940023D667 /* CoreMock.generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreMock.generated.swift; sourceTree = "<group>"; };
CFC84951299F8B890055E497 /* Debounce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Debounce.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -496,6 +500,7 @@
02A4833629B8A8F800D33F33 /* CoreDataModel.xcdatamodeld */,
02A4833429B8A73400D33F33 /* CorePersistenceProtocol.swift */,
02CF46C729546AA200A698EE /* NoCachedDataError.swift */,
CE09B2B52CE796AE0090DB53 /* InvalidCoreDataContextError.swift */,
);
path = Persistence;
sourceTree = "<group>";
Expand Down Expand Up @@ -657,6 +662,7 @@
0727876E28D233EC002E9142 /* Configuration */,
0770DE2828D0928B006D8A5D /* Network */,
0770DE7628D0C491006D8A5D /* View */,
CE4AB5942CE2504500E27A00 /* System */,
0770DE5D28D0B209006D8A5D /* Localizable.strings */,
0770DE5128D0ADFF006D8A5D /* Assets.xcassets */,
071009CF28D1E3A600344290 /* Constants.swift */,
Expand Down Expand Up @@ -816,6 +822,14 @@
path = ../Pods;
sourceTree = "<group>";
};
CE4AB5942CE2504500E27A00 /* System */ = {
isa = PBXGroup;
children = (
CE1D5B7C2CE65D360019CA34 /* Protected.swift */,
);
path = System;
sourceTree = "<group>";
};
CE54C2CE2CC80B4A00E529F9 /* DownloadManager */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -926,7 +940,6 @@
0770DE0428D07831006D8A5D /* Sources */,
0770DE0528D07831006D8A5D /* Frameworks */,
0770DE0628D07831006D8A5D /* Resources */,
49BAD0663C27D73B9115401F /* [CP] Copy Pods Resources */,
CE57127E2CD109DB00D4AB17 /* Embed Frameworks */,
);
buildRules = (
Expand Down Expand Up @@ -1027,23 +1040,6 @@
shellPath = /bin/sh;
shellScript = "if [[ -f \"${PODS_ROOT}/SwiftGen/bin/swiftgen\" ]]; then\n \"${PODS_ROOT}/SwiftGen/bin/swiftgen\"\nelse\n echo \"warning: SwiftGen is not installed. Run 'pod install --repo-update' to install it.\"\nfi\n";
};
49BAD0663C27D73B9115401F /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-App-Core/Pods-App-Core-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-App-Core/Pods-App-Core-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App-Core/Pods-App-Core-resources.sh\"\n";
showEnvVarsInLog = 0;
};
C9AA9371F83D4B112F310DB8 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -1130,6 +1126,7 @@
DBF6F2462B01DAFE0098414B /* AgreementConfig.swift in Sources */,
027BD3AF2909475000392132 /* DismissKeyboardTapHandler.swift in Sources */,
027F1BF72C071C820001A24C /* NavigationTitle.swift in Sources */,
CE1D5B7D2CE65D360019CA34 /* Protected.swift in Sources */,
06619EAA2B8F2936001FAADE /* ReadabilityModifier.swift in Sources */,
BAFB99902B14B377007D09F9 /* GoogleConfig.swift in Sources */,
029A132C2C2471F8005FB830 /* OfflineSyncEndpoint.swift in Sources */,
Expand All @@ -1151,6 +1148,7 @@
027BD3B32909475900392132 /* Publishers+KeyboardState.swift in Sources */,
06DEA4A32BBD66A700110D20 /* BackNavigationButton.swift in Sources */,
0727877D28D25212002E9142 /* ProgressBar.swift in Sources */,
CE09B2B62CE796AE0090DB53 /* InvalidCoreDataContextError.swift in Sources */,
BA981BD02B91ED50005707C2 /* FullScreenProgressView.swift in Sources */,
0236961F28F9A2F600EEF206 /* AuthEndpoint.swift in Sources */,
BAD9CA332B28A8F300DE790A /* AjaxProvider.swift in Sources */,
Expand Down Expand Up @@ -1383,7 +1381,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugStage;
Expand Down Expand Up @@ -1498,7 +1496,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseStage;
Expand Down Expand Up @@ -1754,7 +1752,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugDev;
Expand Down Expand Up @@ -1846,7 +1844,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseDev;
Expand Down Expand Up @@ -1945,7 +1943,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugProd;
Expand Down Expand Up @@ -2037,7 +2035,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseProd;
Expand Down Expand Up @@ -2194,7 +2192,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -2228,7 +2226,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down Expand Up @@ -2297,15 +2295,7 @@
repositoryURL = "https://github.com/openedx/openedx-app-foundation-ios/";
requirement = {
kind = exactVersion;
version = 1.0.0;
};
};
BA8FA6712AD6ABA300EA029A /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/facebook/facebook-ios-sdk";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 16.3.1;
version = 1.0.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Loading
Loading