- updated flow for username, made it selectable and move it to login screen

- Update scripts for firebase crashlytics.
- fixed bug for webseries, top ads, if internet not connected again checking it at retry
This commit is contained in:
Bilal
2024-09-06 20:50:25 +05:30
parent 9147be47a0
commit a810cfb511
12 changed files with 118 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ target 'WOKA' do
pod 'Alamofire' , '~> 5.9.1'
# Image Loading & Caching
pod 'SDWebImage' , '~> 5.19.4'
# pod 'SDWebImage' , '~> 5.19.4'
# Google Ads
pod 'Google-Mobile-Ads-SDK'

View File

@@ -361,6 +361,7 @@
9CDC343C2BDBBC6B00093089 /* SelectAgeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDC343B2BDBBC6B00093089 /* SelectAgeVC.swift */; };
9CDCE1452BDB9B9A003FEF11 /* OnBoardMainSound.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 9CDCE1442BDB9B9A003FEF11 /* OnBoardMainSound.m4a */; };
9CF6980B2C89A324006007EF /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = 9CF6980A2C89A324006007EF /* Lottie */; };
9CF6980F2C8AFFBF006007EF /* SDWebImage in Frameworks */ = {isa = PBXBuildFile; productRef = 9CF6980E2C8AFFBF006007EF /* SDWebImage */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -767,6 +768,7 @@
52C83E3F2C493FD700F27563 /* RSKPlaceholderTextView in Frameworks */,
9CF6980B2C89A324006007EF /* Lottie in Frameworks */,
9CBA530C2C89A2680046735C /* FirebaseAnalytics in Frameworks */,
9CF6980F2C8AFFBF006007EF /* SDWebImage in Frameworks */,
9CBA530E2C89A2680046735C /* FirebaseCrashlytics in Frameworks */,
528F26F02C6B7BD1003E4D99 /* OneSignalFramework in Frameworks */,
528F26F22C6B7BD1003E4D99 /* OneSignalInAppMessages in Frameworks */,
@@ -2015,6 +2017,7 @@
90182DDCD7EAE5F6DA5B4DFB /* [CP] Embed Pods Frameworks */,
528F26E72C6B7B30003E4D99 /* Embed Foundation Extensions */,
7E437097FFA5CD78E3590A44 /* [CP] Copy Pods Resources */,
9CF6980C2C8AE33E006007EF /* ShellScript */,
);
buildRules = (
);
@@ -2031,6 +2034,7 @@
9CBA530D2C89A2680046735C /* FirebaseCrashlytics */,
9CBA530F2C89A2680046735C /* FirebasePerformance */,
9CF6980A2C89A324006007EF /* Lottie */,
9CF6980E2C8AFFBF006007EF /* SDWebImage */,
);
productName = WOKA;
productReference = 523ED25A2BDA2BC700CFED02 /* WOKA.app */;
@@ -2134,6 +2138,7 @@
528F26EC2C6B7BD1003E4D99 /* XCRemoteSwiftPackageReference "OneSignal-XCFramework" */,
9CBA530A2C89A2680046735C /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
9CF698092C89A324006007EF /* XCRemoteSwiftPackageReference "lottie-spm" */,
9CF6980D2C8AFFBF006007EF /* XCRemoteSwiftPackageReference "SDWebImage" */,
);
productRefGroup = 523ED25B2BDA2BC700CFED02 /* Products */;
projectDirPath = "";
@@ -2301,6 +2306,28 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WOKA/Pods-WOKA-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9CF6980C2C8AE33E006007EF /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist",
"$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist",
"$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)",
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -2812,7 +2839,8 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = WOKA/WOKA.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 4S9A74ZB6H;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
@@ -2852,7 +2880,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = WOKA/WOKA.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 4S9A74ZB6H;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
@@ -3106,6 +3134,14 @@
minimumVersion = 4.5.0;
};
};
9CF6980D2C8AFFBF006007EF /* XCRemoteSwiftPackageReference "SDWebImage" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SDWebImage/SDWebImage.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.19.7;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -3154,6 +3190,11 @@
package = 9CF698092C89A324006007EF /* XCRemoteSwiftPackageReference "lottie-spm" */;
productName = Lottie;
};
9CF6980E2C8AFFBF006007EF /* SDWebImage */ = {
isa = XCSwiftPackageProductDependency;
package = 9CF6980D2C8AFFBF006007EF /* XCRemoteSwiftPackageReference "SDWebImage" */;
productName = SDWebImage;
};
/* End XCSwiftPackageProductDependency section */
/* Begin XCVersionGroup section */

View File

@@ -29,6 +29,16 @@ class LoginVC: UIViewController {
// self.passwordTF.text = "Admin@123"
}
override func viewDidAppear(_ animated: Bool) {
/*
if user has selected the username from forgot username screen update it here.
*/
if let username = K.GVar.selectedUsername{
self.userNameTF.text = username
K.GVar.selectedUsername = nil
}
}
@IBAction func loginBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
guard let userName = userNameTF.text?.trimmingCharacters(in: .whitespaces) , let pass = passwordTF.text?.trimmingCharacters(in: .whitespaces) else{return}

View File

@@ -38,6 +38,12 @@ class UsernameCheckVC: UIViewController {
@IBAction func goToLoginTapped(_ sender: LocalisedElementsButton) {
navigationController?.setNavigationBarHidden(true, animated: true)
/*
if user selects any user name add it to gvar
*/
if let selectedUserName = userData.filter({$0.isSelected == true}).first?.username{
K.GVar.selectedUsername = selectedUserName
}
self.navigationController?.popToViewController(of: LoginVC.self, animated: true)
}
}
@@ -59,4 +65,15 @@ extension UsernameCheckVC : TableViewSRC{
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 100
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if userData[indexPath.row].isSelected == true {
return
}
for i in 0..<userData.count {
userData[i].isSelected = false
}
userData[indexPath.row].isSelected = true
tableView.reloadData()
}
}

View File

@@ -10,4 +10,5 @@ import Foundation
// MARK: - UserNameDM
struct UserNameDM: Codable {
let username: String?
var isSelected : Bool? = false
}

View File

@@ -17,10 +17,13 @@ class LinkedChildCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
outerView.roundCorner(radius: 15)
imageSupportView.roundCorner()
outerView.backgroundColor = .white.withAlphaComponent(0.5)
}
override func layoutSubviews() {
imageSupportView.roundCorner()
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
@@ -37,5 +40,16 @@ class LinkedChildCell: UITableViewCell {
func setLinkedData(data : UserNameDM){
self.childName.text = data.username
self.childAvatarImage.image = UIImage(named: "DefaultAvatar")
if data.isSelected == true{
ViewButtonAnimation.sharedInstance.cellTapped(view: self.outerView) { [weak self] in
guard let self else{return}
outerView.backgroundColor = #colorLiteral(red: 0.368627451, green: 0.1215686275, blue: 0.768627451, alpha: 1)
childName.textColor = .white
}
}else{
outerView.backgroundColor = .white.withAlphaComponent(0.5)
childName.textColor = UIColor.appColor(.TextDarkBlue)
}
}
}

View File

@@ -28,5 +28,10 @@ extension K{
static var reloadContinueKaraoke = false
static var reloadContinueAudioBooks = false
static var reloadContinueWebSeries = false
/*
Username selected from forgot username shall be stored here
*/
static var selectedUsername : String? = nil
}
}

View File

@@ -24,4 +24,16 @@ class ViewButtonAnimation {
}
}
}
@objc func cellTapped(view: UIView, completionHandler : @escaping () -> Void) {
// Apply click effect animation
UIView.animate(withDuration: 0.05, animations: {
view.transform = CGAffineTransform(scaleX: 0.95, y: 0.95)
}) { _ in
UIView.animate(withDuration: 0.05) {
view.transform = .identity
completionHandler()
}
}
}
}

View File

@@ -13,6 +13,14 @@ class SideMenuVM{
weak var vc : SideMenuVC!
func initView(){
/*
its put in ver 25.1.7 build 7 for testing purpose
*/
vc.appVersion.addTapGesture {
fatalError()
}
AuthFunc.shareInstance.getDefaultLanguage() == .english ? (vc.languageControl.selectedSegmentIndex = 0) : (vc.languageControl.selectedSegmentIndex = 1)
vc.appVersion.text = "VER: \(Bundle.main.appVersionLong) (\(Bundle.main.appBuild))"
customizeSegmentControl()

View File

@@ -82,7 +82,7 @@ class ThemeTwoVC: UIViewController{
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
vm.setData()
if let playerLayer = vm.playerLayer{
if vm.playerLayer != nil{
vm.playerLayer.frame = liveTvView.bounds
}
}

View File

@@ -149,6 +149,7 @@ class WebSeriesVC: UIViewController {
noDataView.isHidden = true
// for the first load always send hindi as it is default category
vm.startShimmer()
vm.checkAds()
// showListingTableView.reloadData()
vm.getShowListing(categoryID: 18)
self.vm.getCategoryListing()

View File

@@ -65,6 +65,10 @@ class WebSeriesVM{
self.vc.expandBtn.setImage(UIImage(named: "SupportUpArrow"), for: .normal)
}
checkAds()
}
func checkAds(){
/*
MAke logic for ads
*/