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

Feature/appstore upload #248

Merged
merged 4 commits into from
Aug 24, 2024
Merged
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: 4 additions & 2 deletions Services/Sources/Services/Location/LocationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ extension LocationService: ApplicationDelegateService {
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [AnyHashable: Any]?
) -> Bool {
locationManager.requestAuthorization(mode: .onlyInUse) {[weak self] status in
self?.logger.info("[LocationService] Current authorization status: \(status)")
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
self?.locationManager.requestAuthorization(mode: .onlyInUse) {[weak self] status in
self?.logger.info("[LocationService] Current authorization status: \(status)")
}
}
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public final class OnboardingView: UIView {
numberOfSteps: model.steps.count
)
)
stepperView.isHidden = true
}

// MARK: - Setup
Expand Down
4 changes: 2 additions & 2 deletions animeal.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development: Pran Kishore (CM95PV92ZY)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 20240505;
CURRENT_PROJECT_VERSION = 20240704;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 2JSLPH439W;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2JSLPH439W;
Expand Down Expand Up @@ -3127,7 +3127,7 @@
CODE_SIGN_IDENTITY = "Apple Distribution: Animals Project, NCLE (2JSLPH439W)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution: Animals Project, NCLE (2JSLPH439W)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 20240505;
CURRENT_PROJECT_VERSION = 20240704;
DEVELOPMENT_TEAM = 2JSLPH439W;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2JSLPH439W;
GENERATE_INFOPLIST_FILE = YES;
Expand Down
2 changes: 1 addition & 1 deletion animeal/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private extension AppDelegate {
try Amplify.add(plugin: AWSAPIPlugin(sessionFactory: AppDelegate.makeDefault()))
try Amplify.configure()
try Amplify.API.add(interceptor: UrlQueryPlusFixInterceptor(), for: "AdminQueries")
Amplify.Logging.logLevel = .verbose
Amplify.Logging.logLevel = .error
logInfo("[APP] Amplify configured")
} catch {
logError("[APP] Failed to initialize Amplify with \(error)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,14 @@ private extension CustomAuthViewController {
case .phone:
let inputView = PhoneInputView()
inputView.configure(item.phoneModel)
#if DEBUG
inputView.codeWasTapped = { [weak self] _ in
self?.view.endEditing(true)
self?.viewModel.handleActionEvent(
CustomAuthViewActionEvent.itemWasTapped(item.identifier)
)
}
#endif
inputView.didBeginEditing = { [weak self] textInput in
guard let self = self else { return }
let text = textInput.text
Expand Down
12 changes: 12 additions & 0 deletions animeal/src/Flows/Auth/Modules/Login/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import UIKit

// SDK
import UIComponents
import Services

final class LoginViewController: UIViewController, LoginViewable {
// MARK: - UI properties
Expand Down Expand Up @@ -53,6 +54,16 @@ final class LoginViewController: UIViewController, LoginViewable {
viewModel.load()
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
AppDelegate.shared.context.analyticsService.logEvent(
ScreenViewEvent(
screenName: AnalyticsScreen.screenForViewController(self).description,
trackablePolicy: .multipleTracking,
targets: [AnalyticsTargetType.firebase]
)
)
}
// MARK: - State
func applyOnboarding(_ onboardingSteps: [LoginViewOnboardingStep]) {
onboardingView.configure(
Expand All @@ -79,6 +90,7 @@ final class LoginViewController: UIViewController, LoginViewable {
).isActive = true
onboardingView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
onboardingView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
onboardingView.isUserInteractionEnabled = false

view.addSubview(buttonsView)
buttonsView.topAnchor.constraint(equalTo: onboardingView.bottomAnchor).isActive = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

// SDK
import UIComponents
import Services

final class VerificationViewController: BaseViewController, VerificationViewModelOutput {
// MARK: - UI properties
Expand Down Expand Up @@ -30,6 +31,17 @@
bind()
viewModel.load()
}

Check warning on line 34 in animeal/src/Flows/Auth/Modules/Verification/VerificationViewController.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Whitespace Violation: Lines should not have trailing whitespace (trailing_whitespace)
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
AppDelegate.shared.context.analyticsService.logEvent(
ScreenViewEvent(
screenName: AnalyticsScreen.screenForViewController(self).description,
trackablePolicy: .multipleTracking,
targets: [AnalyticsTargetType.firebase]
)
)
}

override func handleKeyboardNotification(keyboardData: KeyboardData) {
super.handleKeyboardNotification(keyboardData: keyboardData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import AVFoundation
import Style
import UIComponents
import Common
import Services
@_spi(Experimental) import MapboxMaps

class HomeViewController: UIViewController {
Expand Down Expand Up @@ -69,6 +70,17 @@ class HomeViewController: UIViewController {
viewModel.updateSelectionIfNeeded(for: itemIdentifier)
}
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
AppDelegate.shared.context.analyticsService.logEvent(
ScreenViewEvent(
screenName: AnalyticsScreen.screenForViewController(self).description,
trackablePolicy: .multipleTracking,
targets: [AnalyticsTargetType.firebase]
)
)
}
}

extension HomeViewController: HomeViewModelOutput {
Expand Down
2 changes: 2 additions & 0 deletions animeal/src/Flows/Profile/ProfileViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,13 @@
guard let model = (item as? ProfileTextFieldViewItem)?.phoneModel else { return }
let inputView = PhoneInputView()
inputView.configure(model)
#if DEBUG
inputView.codeWasTapped = { [weak self] _ in
self?.viewModel.handleActionEvent(
ProfileViewActionEvent.itemWasTapped(item.identifier)
)
}
#endif
inputView.didBeginEditing = { [weak self] textInput in
guard let self = self else { return }
let text = textInput.text
Expand Down Expand Up @@ -201,7 +203,7 @@
guard let model: AgeConsentView.AgeConsentViewModel = (item as? ProfileAgeConsentViewItem)?.ageConsentModel else { return }
let ageConsentView = AgeConsentView()
ageConsentView.onTap = { [weak self] selected in
self?.viewModel.handleItemEvent(.clickCheckBox(item.identifier ,selected))

Check warning on line 206 in animeal/src/Flows/Profile/ProfileViewController.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Comma Spacing Violation: There should be no space before and one after any comma (comma)
}
ageConsentView.configure(model)
inputsContentView.addArrangedSubview(ageConsentView)
Expand Down Expand Up @@ -249,13 +251,13 @@
switch viewItem.type {
case .phone:
guard let inputView = identifiedViewInputs[viewItem.identifier] as? PhoneInputView else { return }
inputView.configure((viewItem as! ProfileTextFieldViewItem).phoneModel)

Check warning on line 254 in animeal/src/Flows/Profile/ProfileViewController.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Force Cast Violation: Force casts should be avoided (force_cast)
case .birthday:
guard let inputView = ageConsentView, let model = (viewItem as? ProfileAgeConsentViewItem)?.ageConsentModel else { return }
inputView.configure(model)
default:
guard let inputView = identifiedViewInputs[viewItem.identifier] as? DefaultInputView else { return }
inputView.configure((viewItem as! ProfileTextFieldViewItem).model)

Check warning on line 260 in animeal/src/Flows/Profile/ProfileViewController.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Force Cast Violation: Force casts should be avoided (force_cast)
}
}

Expand Down
Loading