- updated google analytics key.
- added a check for live tv player, checking if its not playing for a long time. - fixed the apiversion check on splash - Fixed the guest user issue, if no internet connect and app is started. - fixed woka fm issue for google and normal ads.
This commit is contained in:
@@ -28,6 +28,7 @@ class SplashVM{
|
||||
if AuthFunc.shareInstance.adsData == nil{
|
||||
AuthFunc.shareInstance.getAds()
|
||||
}
|
||||
|
||||
vc.activityIndicator.hidesWhenStopped = true
|
||||
let color1 = #colorLiteral(red: 0.144693464, green: 0.1426281333, blue: 0.6686832905, alpha: 1)
|
||||
let color2 = #colorLiteral(red: 0.4862745098, green: 0.1960784314, blue: 0.7019607843, alpha: 1)
|
||||
@@ -75,9 +76,11 @@ class SplashVM{
|
||||
if AuthFunc.shareInstance.getUserType() == 3{
|
||||
//setusertype
|
||||
AuthFunc.shareInstance.userData = UserDataDM.ResultData(id: nil, genderData: nil, birthdate: nil, email: nil, avtar: nil, avtarURL: nil, userType: "3", languageMasterID: nil, lastLogin: nil, rememberToken: nil, childDetail: nil, language: nil, alreadyLoggedIn: nil, isDeactive: nil)
|
||||
|
||||
if AuthFunc.shareInstance.adsData == nil{
|
||||
AuthFunc.shareInstance.getAds()
|
||||
}
|
||||
|
||||
if AuthFunc.shareInstance.staticURLs == nil{
|
||||
AuthFunc.shareInstance.getStaticURLs { isDone in
|
||||
if isDone == true{
|
||||
@@ -95,10 +98,11 @@ class SplashVM{
|
||||
/*
|
||||
If user is guest then dont do the nw call
|
||||
*/
|
||||
if AuthFunc.shareInstance.getUserType() == 3{
|
||||
UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
|
||||
return
|
||||
}
|
||||
// if AuthFunc.shareInstance.getUserType() == 3{
|
||||
// UIApplication.setRootView(SideMenuController.instantiate(from: .Home))
|
||||
// return
|
||||
// }
|
||||
|
||||
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
|
||||
"access-token": AuthFunc.shareInstance.getAccessToken()]
|
||||
startStopIndicator(start: true)
|
||||
@@ -152,6 +156,7 @@ class SplashVM{
|
||||
guard let self else{return}
|
||||
switch data.success{
|
||||
case 0:
|
||||
startStopIndicator(start: false)
|
||||
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2)
|
||||
case 1:
|
||||
guard let data = data.data?.the0, let newVersionFromApi = data.newVersion, let forceUpdateVersion = data.forceUpdateVersion, let forceUpdate = data.forceUpdate, let forceUpdateApi = (forceUpdate == 1 ? true : false) else{return}
|
||||
@@ -165,6 +170,7 @@ class SplashVM{
|
||||
Check if user has skipped the force update version
|
||||
*/
|
||||
let skippedVer = UserDefaults.standard.string(forKey: K.UserDefaultsStruct.appUpdateSkipVer)
|
||||
print("Skipped Ver:- ", skippedVer)
|
||||
if skippedVer == forceUpdateVersion{
|
||||
// it means user has skipped this version.
|
||||
vc.animateForward()
|
||||
@@ -200,6 +206,7 @@ class SplashVM{
|
||||
}
|
||||
case .failure(let error):
|
||||
guard let self else{return}
|
||||
startStopIndicator(start: false)
|
||||
self.vc.toast(msg: error.localizedDescription , time: 2)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user