diff --git a/WOKA.xcodeproj/project.pbxproj b/WOKA.xcodeproj/project.pbxproj index 4f33547..d64ca83 100644 --- a/WOKA.xcodeproj/project.pbxproj +++ b/WOKA.xcodeproj/project.pbxproj @@ -2895,7 +2895,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = WOKA/WOKA.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 4S9A74ZB6H; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -2939,7 +2939,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = WOKA/WOKA.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 4S9A74ZB6H; ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; diff --git a/WOKA/Main/AuthFunc/AuthFunc.swift b/WOKA/Main/AuthFunc/AuthFunc.swift index 67fb4a8..403e8c5 100644 --- a/WOKA/Main/AuthFunc/AuthFunc.swift +++ b/WOKA/Main/AuthFunc/AuthFunc.swift @@ -128,7 +128,7 @@ class AuthFunc{ } /* - Logout PopUP Handling + Func to handle guest to do normal login */ func guestUserLoginPopUp() -> Bool{ if AuthFunc.shareInstance.getUserType() == 3{ diff --git a/WOKA/Network Adapter/APIEndPoints.swift b/WOKA/Network Adapter/APIEndPoints.swift index b632c60..636f22d 100644 --- a/WOKA/Network Adapter/APIEndPoints.swift +++ b/WOKA/Network Adapter/APIEndPoints.swift @@ -10,6 +10,7 @@ import Foundation // enum to check envirnments enum EnvironmentCheck{ case staging + case development case production } @@ -20,6 +21,7 @@ struct APIEndPoints { struct BaseURL { static let staging = "https://wokaland.com/secret-panel-10102023/hidden-admin-portal-20092023/api/" + static let development = "https://wokanative.betadelivery.com/api/" static let production = "" static let appUrl = "https://apps.apple.com/in/app/woka/id6465305185" @@ -170,7 +172,7 @@ struct APIEndPoints { // Helper method to get base URL based on current environment private static func baseURLForCurrentEnvironment() -> URL? { - // Determine environment (e.g., staging, production) and return appropriate base URL - return URL(string: BaseURL.staging) + // Determine environment (e.g., staging, production, development) and return appropriate base URL + return URL(string: BaseURL.development) } } diff --git a/WOKA/Shop/ViewModel/ShopCategoryVM.swift b/WOKA/Shop/ViewModel/ShopCategoryVM.swift index f484dd3..5d93dac 100644 --- a/WOKA/Shop/ViewModel/ShopCategoryVM.swift +++ b/WOKA/Shop/ViewModel/ShopCategoryVM.swift @@ -51,8 +51,6 @@ class ShopCategoryVM{ vc.view.applyGradient(colors: [color2, color1], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0)) } - - // MARK: - Get SuperCategory func getCategory(){ diff --git a/WOKA/TabBar & SideMenu/Controller/SideMenuVC.swift b/WOKA/TabBar & SideMenu/Controller/SideMenuVC.swift index edac57a..d516a98 100644 --- a/WOKA/TabBar & SideMenu/Controller/SideMenuVC.swift +++ b/WOKA/TabBar & SideMenu/Controller/SideMenuVC.swift @@ -6,6 +6,7 @@ // import UIKit +import Alamofire class SideMenuVC: UIViewController { @@ -95,7 +96,17 @@ class SideMenuVC: UIViewController { @IBAction func logoutBtnTapped(_ sender: LocalisedElementsButton) { PersistentStorage.shared.addOthersCount() + let reachability = NetworkReachabilityManager() + /* + do a network check + */ + if reachability?.isReachable == false{ + self.toast(msg: K.ConstantString.noInternet, time: 2) + return + } + + vm.deleteDataCount = 0 // if its guest user navigate him to login if AuthFunc.shareInstance.getUserType() == 3{ self.sideMenuController?.hideMenu() diff --git a/WOKA/TabBar & SideMenu/ViewModel/SideMenuVM.swift b/WOKA/TabBar & SideMenu/ViewModel/SideMenuVM.swift index 6bd0d04..5064545 100644 --- a/WOKA/TabBar & SideMenu/ViewModel/SideMenuVM.swift +++ b/WOKA/TabBar & SideMenu/ViewModel/SideMenuVM.swift @@ -12,7 +12,8 @@ class SideMenuVM{ weak var vc : SideMenuVC! var syncTimer : Timer? - + var deleteDataCount = 0 + func initView(){ /* @@ -201,6 +202,16 @@ class SideMenuVM{ UIApplication.setRootView(LoginNavVC.instantiate(from: .AuthenticationSB)) } }else{ + //directly logout if 4 attempts are made. + if self.deleteDataCount == 4{ + logoutUser { isDone in + self.vc.sideMenuController?.hideMenu() + AuthFunc.shareInstance.logout() + UIApplication.setRootView(LoginNavVC.instantiate(from: .AuthenticationSB)) + } + return + } + self.deleteDataCount += 1 startSyncTimer() } } diff --git a/WOKA/Theme/ViewModel/ThemeOneVM.swift b/WOKA/Theme/ViewModel/ThemeOneVM.swift index 35f653d..56c94bb 100644 --- a/WOKA/Theme/ViewModel/ThemeOneVM.swift +++ b/WOKA/Theme/ViewModel/ThemeOneVM.swift @@ -67,13 +67,15 @@ class ThemeOneVM{ // Set initial small scale in viewDidLoad self.vc.allIconView.transform = CGAffineTransform(scaleX: 0.5, y: 0.5) // Set initial scale to 50% of original size - DispatchQueue.main.async { - // Perform the animation after the view has been laid out - UIView.animate(withDuration: 0.7, delay: 0, options: [], animations: { - self.vc.allIconView.transform = CGAffineTransform.identity // Reset the transform to original size - }, completion: {_ in - }) - } + // Perform the animation after the view has been laid out + UIView.animate(withDuration: 0.7, delay: 0, options: [], animations: { + self.vc.allIconView.transform = CGAffineTransform.identity // Reset the transform to original size + }, completion: {_ in + }) + +// DispatchQueue.main.async { +// +// } if let adsData = AuthFunc.shareInstance.adsData{ // check if ads data contains ad for webseries