Merge remote-tracking branch 'refs/remotes/origin/woka_dev'

Conflicts:
	WOKA/Authentication/Base.lproj/AuthenticationSB.storyboard
This commit is contained in:
2024-08-22 20:00:15 +05:30
12 changed files with 439 additions and 381 deletions

View File

@@ -148,7 +148,6 @@
52A6DCC92C4F906900F63C51 /* CartListingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCC82C4F906900F63C51 /* CartListingDM.swift */; };
52A6DCCC2C4F929B00F63C51 /* CartListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A6DCCA2C4F929B00F63C51 /* CartListCell.swift */; };
52A6DCCD2C4F929B00F63C51 /* CartListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 52A6DCCB2C4F929B00F63C51 /* CartListCell.xib */; };
52A8C9902C75B91F00AAE156 /* WOKA.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 52A8C98E2C75B91F00AAE156 /* WOKA.xcdatamodeld */; };
52A981CE2C1AFE66000E0BEC /* FavouriteListingDM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981CD2C1AFE66000E0BEC /* FavouriteListingDM.swift */; };
52A981D02C1AFEE8000E0BEC /* MyListVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981CF2C1AFEE8000E0BEC /* MyListVM.swift */; };
52A981D72C1B0E27000E0BEC /* FavouriteCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A981D52C1B0E27000E0BEC /* FavouriteCell.swift */; };
@@ -316,6 +315,7 @@
9C85A9EF2C5CE1060031C365 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 9C85A9EE2C5CE1060031C365 /* FirebaseAnalytics */; };
9C85A9F12C5CE1060031C365 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 9C85A9F02C5CE1060031C365 /* FirebaseCrashlytics */; };
9C85A9F32C5CE1060031C365 /* FirebasePerformance in Frameworks */ = {isa = PBXBuildFile; productRef = 9C85A9F22C5CE1060031C365 /* FirebasePerformance */; };
9C8A13122C7655570000058C /* WOKA.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 9C8A13102C7655570000058C /* WOKA.xcdatamodeld */; };
9C8C4FAE2C1315410017DD3B /* WebViewVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C8C4FAD2C1315410017DD3B /* WebViewVC.swift */; };
9C8C4FB02C1328060017DD3B /* Disclaimer.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9C8C4FAF2C1328060017DD3B /* Disclaimer.rtf */; };
9C9BE46E2C663B1600C48D6A /* JWKaraokePlayerVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BE46D2C663B1600C48D6A /* JWKaraokePlayerVM.swift */; };
@@ -545,7 +545,6 @@
52A6DCC82C4F906900F63C51 /* CartListingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartListingDM.swift; sourceTree = "<group>"; };
52A6DCCA2C4F929B00F63C51 /* CartListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartListCell.swift; sourceTree = "<group>"; };
52A6DCCB2C4F929B00F63C51 /* CartListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CartListCell.xib; sourceTree = "<group>"; };
52A8C98F2C75B91F00AAE156 /* WOKA.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = WOKA.xcdatamodel; sourceTree = "<group>"; };
52A981CD2C1AFE66000E0BEC /* FavouriteListingDM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavouriteListingDM.swift; sourceTree = "<group>"; };
52A981CF2C1AFEE8000E0BEC /* MyListVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyListVM.swift; sourceTree = "<group>"; };
52A981D52C1B0E27000E0BEC /* FavouriteCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavouriteCell.swift; sourceTree = "<group>"; };
@@ -703,6 +702,7 @@
9C834EDB2C1C26CD00B29A9C /* HtmlText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HtmlText.swift; sourceTree = "<group>"; };
9C8446862C40FC6E003E3E53 /* AVPlayerTesting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVPlayerTesting.swift; sourceTree = "<group>"; };
9C85A9EB2C5CD5CD0031C365 /* MyListDataTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyListDataTemp.swift; sourceTree = "<group>"; };
9C8A13112C7655570000058C /* WOKA.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = WOKA.xcdatamodel; sourceTree = "<group>"; };
9C8C4FAD2C1315410017DD3B /* WebViewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewVC.swift; sourceTree = "<group>"; };
9C8C4FAF2C1328060017DD3B /* Disclaimer.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Disclaimer.rtf; sourceTree = "<group>"; };
9C9BE46D2C663B1600C48D6A /* JWKaraokePlayerVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWKaraokePlayerVM.swift; sourceTree = "<group>"; };
@@ -944,7 +944,7 @@
9C535DC82C00C34000DA6DCD /* Theme */,
52DAC6462C21761700E2F85B /* WebSeries */,
9C834ED92C1C20EC00B29A9C /* WOKA.entitlements */,
52A8C98E2C75B91F00AAE156 /* WOKA.xcdatamodeld */,
9C8A13102C7655570000058C /* WOKA.xcdatamodeld */,
52ACC1292C610EC900791528 /* PersistentStorage.swift */,
);
path = WOKA;
@@ -2460,7 +2460,7 @@
52ACC1262C610CBC00791528 /* UserClicks+CoreDataProperties.swift in Sources */,
9CBCB29D2BE4D6BB007D7934 /* LoginVM.swift in Sources */,
52BBFCB42C5275E100F7D0D1 /* AddressListVM.swift in Sources */,
52A8C9902C75B91F00AAE156 /* WOKA.xcdatamodeld in Sources */,
9C8A13122C7655570000058C /* WOKA.xcdatamodeld in Sources */,
524C42312C0499560016A11C /* NotificationCenterReloads.swift in Sources */,
9C8C4FAE2C1315410017DD3B /* WebViewVC.swift in Sources */,
52BBFCB62C52764B00F7D0D1 /* AddressListDM.swift in Sources */,
@@ -2766,7 +2766,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;
@@ -2805,7 +2805,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;
@@ -3096,14 +3096,14 @@
/* End XCSwiftPackageProductDependency section */
/* Begin XCVersionGroup section */
52A8C98E2C75B91F00AAE156 /* WOKA.xcdatamodeld */ = {
9C8A13102C7655570000058C /* WOKA.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
52A8C98F2C75B91F00AAE156 /* WOKA.xcdatamodel */,
9C8A13112C7655570000058C /* WOKA.xcdatamodel */,
);
currentVersion = 52A8C98F2C75B91F00AAE156 /* WOKA.xcdatamodel */;
currentVersion = 9C8A13112C7655570000058C /* WOKA.xcdatamodel */;
name = WOKA.xcdatamodeld;
path = /Users/macbookpro/Desktop/WOKA/WOKA/WOKA.xcdatamodeld;
path = /Users/bilal/Desktop/woka_native_ios_swift/WOKA/WOKA.xcdatamodeld;
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
};

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,7 @@ class UserDetailsRegisterVC : UIViewController{
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
self.navigationController?.popToViewController(of: EmailVC.self, animated: true)
}
}

View File

@@ -16,8 +16,6 @@ let appDelegate = UIApplication.shared.delegate as! AppDelegate
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var deviceOrientation = UIInterfaceOrientationMask.portrait

View File

@@ -12,6 +12,7 @@ class ShopProductsVC: UIViewController {
@IBOutlet weak var subCategoryCV: UICollectionView!
@IBOutlet weak var productCV: UICollectionView!
@IBOutlet weak var spinnerView: UIActivityIndicatorView!
@IBOutlet weak var noDataStack: UIStackView!
var vm = ShopProductsVM()
@@ -53,6 +54,9 @@ class ShopProductsVC: UIViewController {
self.navigationController?.setColor(color: .black)
}
@IBAction func retryBtnTapped(_ sender: UIButton) {
vm.getCategory()
}
}
// MARK: - CollectionView Delegate

View File

@@ -142,6 +142,32 @@
</collectionViewFlowLayout>
<cells/>
</collectionView>
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="fZ1-nH-ZAg">
<rect key="frame" x="113.66666666666669" y="318" width="166" height="241"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SupportGirlImage" translatesAutoresizingMaskIntoConstraints="NO" id="Ri6-KR-VYL">
<rect key="frame" x="0.0" y="0.0" width="166" height="166"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No Data Found!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mTY-wM-gmw" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="176" width="166" height="24"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
<color key="textColor" name="TextDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a9p-0d-Xbb">
<rect key="frame" x="0.0" y="210" width="166" height="31"/>
<color key="tintColor" name="TextDarkBlue"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Retry?">
<fontDescription key="titleFontDescription" name="Exo2-Bold" family="Exo 2" pointSize="14"/>
</buttonConfiguration>
<connections>
<action selector="retryBtnTapped:" destination="kU5-IV-9fW" eventType="touchUpInside" id="66A-Oc-nwA"/>
<action selector="retryBtnTapped:" destination="50W-Kn-pPe" eventType="touchUpInside" id="Sfk-Hg-Axg"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="EEU-2F-lPA"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
@@ -149,6 +175,7 @@
<constraint firstItem="03T-HE-97c" firstAttribute="leading" secondItem="EEU-2F-lPA" secondAttribute="leading" id="CpK-v3-Qcu"/>
<constraint firstItem="Q7V-p9-fqq" firstAttribute="top" secondItem="qrc-nF-3bM" secondAttribute="bottom" id="HWr-qX-XVw"/>
<constraint firstItem="EEU-2F-lPA" firstAttribute="bottom" secondItem="Q7V-p9-fqq" secondAttribute="bottom" id="PNe-VO-dMU"/>
<constraint firstItem="fZ1-nH-ZAg" firstAttribute="centerY" secondItem="EEU-2F-lPA" secondAttribute="centerY" id="Sel-0y-Uha"/>
<constraint firstItem="Fdg-SY-oNd" firstAttribute="top" secondItem="EEU-2F-lPA" secondAttribute="top" id="SpN-9a-czs"/>
<constraint firstItem="EEU-2F-lPA" firstAttribute="trailing" secondItem="Fdg-SY-oNd" secondAttribute="trailing" id="W91-7B-A8x"/>
<constraint firstItem="Q7V-p9-fqq" firstAttribute="centerX" secondItem="EEU-2F-lPA" secondAttribute="centerX" id="dxD-a5-NbF"/>
@@ -158,6 +185,7 @@
<constraint firstItem="EEU-2F-lPA" firstAttribute="trailing" secondItem="qrc-nF-3bM" secondAttribute="trailing" id="jAR-uY-cKV"/>
<constraint firstItem="qrc-nF-3bM" firstAttribute="top" secondItem="ibd-Ky-5QZ" secondAttribute="bottom" constant="15" id="jFK-oJ-8HO"/>
<constraint firstItem="Fdg-SY-oNd" firstAttribute="leading" secondItem="EEU-2F-lPA" secondAttribute="leading" id="q1i-Vc-6Pq"/>
<constraint firstItem="fZ1-nH-ZAg" firstAttribute="centerX" secondItem="EEU-2F-lPA" secondAttribute="centerX" id="ss4-2Y-yT0"/>
<constraint firstItem="03T-HE-97c" firstAttribute="trailing" secondItem="EEU-2F-lPA" secondAttribute="trailing" id="ttW-dy-Pb4"/>
<constraint firstItem="EEU-2F-lPA" firstAttribute="trailing" secondItem="ibd-Ky-5QZ" secondAttribute="trailing" id="uiq-HX-kWV"/>
<constraint firstItem="qrc-nF-3bM" firstAttribute="leading" secondItem="EEU-2F-lPA" secondAttribute="leading" id="uux-x1-sEU"/>
@@ -165,6 +193,7 @@
</constraints>
</view>
<connections>
<outlet property="noDataStack" destination="fZ1-nH-ZAg" id="f96-BI-pgI"/>
<outlet property="productCV" destination="qrc-nF-3bM" id="0dx-wj-O2z"/>
<outlet property="spinnerView" destination="Q7V-p9-fqq" id="34Z-yw-ohr"/>
<outlet property="subCategoryCV" destination="ibd-Ky-5QZ" id="0j8-y0-HeP"/>

View File

@@ -78,14 +78,14 @@ class ShopProductsVM{
Error
*/
Utilities.dismissProgressHUD()
Utilities.alertWithBtnCompletion(title: "Error", msgBody: data.message ?? K.ConstantString.unRecognised, okBtnStr: "Retry?", vc: self.vc) { isDone in
if isDone{
self.getCategory()
}
}
self.vc.toast(msg: data.message ?? K.ConstantString.unRecognised, time: 1.5)
self.vc.noDataStack.isHidden = false
case 1:
Utilities.dismissProgressHUD()
guard let data = data.data?.result else{return}
guard let data = data.data?.result else{
self.vc.noDataStack.isHidden = false
return
}
self.subCategoryData.append(ShopSubCategoryDM.ResultData(id: -1, categoryMasterID: 0, subCategoryName: " All ", subCategoryThumbnail: ""))
self.subCategoryData.append(contentsOf: data)
self.selectedSubCategory = -1
@@ -94,6 +94,7 @@ class ShopProductsVM{
Utilities.startProgressHUD()
self.getShopProducts(subCategoryID: subCatID)
}
self.vc.noDataStack.isHidden = true
default:
Utilities.dismissProgressHUD()
break
@@ -104,11 +105,8 @@ class ShopProductsVM{
return
}
Utilities.dismissProgressHUD()
Utilities.alertWithBtnCompletion(title: "Error", msgBody: error.localizedDescription, okBtnStr: "Retry?", vc: self.vc) { isDone in
if isDone{
self.getCategory()
}
}
self.vc.toast(msg: error.localizedDescription, time: 1.5)
self.vc.noDataStack.isHidden = false
}
}
}

View File

@@ -38,6 +38,17 @@ class PlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate{
override var shouldAutorotate: Bool {
return true
}
override var prefersStatusBarHidden: Bool {
if #available(iOS 16.0, *) {
// Code for iOS 16.0 and above
return false
} else {
// Fallback code for earlier iOS versions
return true
}
}
override func viewDidLoad() {
super.viewDidLoad()
@@ -45,25 +56,32 @@ class PlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate{
self.delegate = self
vm.vc = self
vm.initView()
// rotateView(to: .pi / 2) // Example: 90 degrees rotation
//bring back button to the front
self.view.bringSubviewToFront(backButton)
NotificationCenter.default.addObserver(self, selector: #selector(appDidEnterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(appWillEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
}
// func rotateView(to angle: CGFloat) {
// // Apply rotation to the view's transform
// view.transform = CGAffineTransform(rotationAngle: angle)
// }
// for ios 15 and below
func rotateView(to angle: CGFloat) {
// Apply rotation to the view's transform
view.transform = CGAffineTransform(rotationAngle: angle)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
appDelegate.deviceOrientation = .landscapeRight
let value = UIInterfaceOrientation.landscapeRight.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
if #available(iOS 16.0, *) {
// Code for iOS 15.0 and above
print("Running on iOS 15.0 or later")
appDelegate.deviceOrientation = .landscapeRight
let value = UIInterfaceOrientation.landscapeRight.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
} else {
// Fallback code for earlier iOS versions
rotateView(to: .pi / 2) // Example: 90 degrees rotation
print("Running on a version earlier than iOS 15.0")
}
//Disable Picture in Picture
playerView.allowsPictureInPicturePlayback = false
@@ -388,11 +406,19 @@ extension PlayerVC {
func playerViewControllerDidDismissFullScreen(_ controller: JWPlayerViewController) {
print("playerViewControllerDidDismissFullScreen")
appDelegate.deviceOrientation = .portrait
vm.updateClicks()
let value = UIInterfaceOrientation.portrait.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
UIViewController.attemptRotationToDeviceOrientation()
if #available(iOS 16.0, *) {
// Code for iOS 16.0 and above
appDelegate.deviceOrientation = .portrait
let value = UIInterfaceOrientation.portrait.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
UIViewController.attemptRotationToDeviceOrientation()
} else {
// Fallback code for earlier iOS versions
self.dismiss(animated: true)
}
}
}

View File

@@ -85,7 +85,6 @@ class ThemeOneVC: UIViewController {
// PersistentStorage.shared.deleteData()
// PersistentStorage.shared.retrieveData()
vm.setupAvPlayer()
}
override func viewWillAppear(_ animated: Bool) {
@@ -101,9 +100,13 @@ class ThemeOneVC: UIViewController {
}
override func viewDidAppear(_ animated: Bool) {
vm.shouldAnimate = true
K.GVar.topView = .theme1
vm.moveLiveTVView()
vm.shouldAnimate = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { [weak self] in
guard let self else{return}
vm.moveLiveTVView()
}
if let player = vm.avPlayer{
player.play()
}

View File

@@ -49,6 +49,8 @@ class UserNotificationVC: UIViewController {
@IBAction func retryBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
Utilities.startProgressHUD()
vm.getUserNotification()
}
}

View File

@@ -117,12 +117,19 @@ class PlayerVM{
if vc.contentType == .liveStream{
self.vc.dismissTapped?()
}
appDelegate.deviceOrientation = .portrait
updateClicks()
if #available(iOS 16.0, *) {
// Code for iOS 15.0 and above
appDelegate.deviceOrientation = .portrait
let value = UIInterfaceOrientation.portrait.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
UIViewController.attemptRotationToDeviceOrientation()
} else {
// Fallback code for earlier iOS versions
self.vc.dismiss(animated: true)
}
let value = UIInterfaceOrientation.portrait.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
UIViewController.attemptRotationToDeviceOrientation()
}
func updateClicks(){

View File

@@ -338,12 +338,15 @@ class ThemeOneVM{
}
func moveLiveTVView() {
guard shouldAnimate else {
self.centerLiveTVViewHorizontally()
return
} // Stop animating if shouldAnimate is false
}
// Stop animating if shouldAnimate is false
guard let vc = self.vc else { return } // Ensure the view controller is available
UIView.animate(withDuration: 6, delay: 0, options: [.allowUserInteraction], animations: { [weak self] in
UIView.animate(withDuration: 8, delay: 0, options: [.allowUserInteraction], animations: { [weak self] in
guard let self = self else { return }
let margin: CGFloat = 30
let screenWidth = vc.view.frame.width
@@ -473,12 +476,14 @@ class ThemeOneVM{
}
func tapped(){
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { _ in
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { [weak self] in
guard let self else{return}
isMovingRight = false
self.avPlayer.play()
self.moveLiveTVView()
self.vc.liveTvPlayer.layoutIfNeeded()
}
print("Sadasd")
print("Player Will Exit")
}
func startLiveStream(){