- made theme 2 banner dynamic, if ad loads then only it will be shown

- made radio ad dynamic, now ad will show up only if ad is received
- added a retry count to fm, it will try 4 times to connect to the server if not then showing the reload btn
This commit is contained in:
Bilal
2024-09-19 01:22:04 +05:30
parent 3a499281c2
commit dcbbfc3417
11 changed files with 306 additions and 172 deletions

View File

@@ -16,13 +16,12 @@ extension K{
static let karaoke = "ca-app-pub-3940256099942544/2934735716"
static let audioBooks = "ca-app-pub-3940256099942544/2934735716"
static let games = "ca-app-pub-3940256099942544/2934735716"
static let gamesDetailsInterStial = "ca-app-pub-5699008063638916/8126400123"
// static let themeTwo = "ca-app-pub-3940256099942544/2934735716"
static let themeTwo = "ca-app-pub-5699008063638916/1393141241"
static let splashBanner1 = "ca-app-pub-5699008063638916/1393141241"
static let splashBanner2 = "ca-app-pub-5699008063638916/1393141241"
static let splashBanner2 = "ca-app-pub-5699008063638916/1888514001"
}
}

View File

@@ -588,10 +588,10 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UBq-Ug-nVj">
<rect key="frame" x="0.0" y="0.0" width="414" height="776"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="796"/>
<subviews>
<wkWebView contentMode="scaleToFill" allowsLinkPreview="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k9t-dv-nhb">
<rect key="frame" x="0.0" y="0.0" width="414" height="774"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="794"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<wkWebViewConfiguration key="configuration" allowsAirPlayForMediaPlayback="NO" allowsPictureInPictureMediaPlayback="NO">
<dataDetectorTypes key="dataDetectorTypes" none="YES"/>
@@ -609,7 +609,7 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kme-E0-ysm">
<rect key="frame" x="0.0" y="776" width="414" height="120"/>
<rect key="frame" x="0.0" y="796" width="414" height="100"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
@@ -640,8 +640,8 @@
<constraint firstItem="Pb3-kR-MLR" firstAttribute="top" secondItem="8Dy-BS-4tC" secondAttribute="top" id="BrK-C3-wzM"/>
<constraint firstItem="Pb3-kR-MLR" firstAttribute="trailing" secondItem="UAe-my-8xP" secondAttribute="trailing" id="C3D-4e-fEs"/>
<constraint firstItem="7Qp-yb-i2l" firstAttribute="top" secondItem="UAe-my-8xP" secondAttribute="top" constant="10" id="Oxh-34-kbI"/>
<constraint firstItem="Kme-E0-ysm" firstAttribute="height" secondItem="8Dy-BS-4tC" secondAttribute="height" multiplier="0.111607" id="cKi-5N-mAP"/>
<constraint firstItem="Pb3-kR-MLR" firstAttribute="leading" secondItem="UAe-my-8xP" secondAttribute="leading" id="d3v-BG-rEx"/>
<constraint firstItem="Kme-E0-ysm" firstAttribute="height" secondItem="8Dy-BS-4tC" secondAttribute="height" multiplier="0.133929" id="icB-Y9-WUz"/>
<constraint firstItem="7Qp-yb-i2l" firstAttribute="leading" secondItem="UAe-my-8xP" secondAttribute="leading" constant="7" id="otO-uz-8gX"/>
<constraint firstAttribute="bottom" secondItem="Pb3-kR-MLR" secondAttribute="bottom" id="phu-wl-ju8"/>
</constraints>

View File

@@ -40,7 +40,7 @@ class AdReusable {
// If height is provided, add rounded corners
if let heightValue = height, heightValue > 0 {
bannerView.layer.cornerRadius = 2
bannerView.layer.cornerRadius = 4
bannerView.clipsToBounds = true
}
@@ -55,7 +55,7 @@ class AdReusable {
bannerView.load(GADRequest())
// Ensure the layout is updated
bannerView.layoutIfNeeded()
containerView.layoutIfNeeded()
}
}

View File

@@ -44,7 +44,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
IQKeyboardManager.shared.resignOnTouchOutside = true
// IQKeyboardManager.shared.enableAutoToolbar = false
// IQKeyboardManager.shared.layoutIfNeededOnUpdate = true
registerCustomFonts()
// registerCustomFonts()
// Set the authentication ID Pass after app starts
AuthFunc.shareInstance.setAuthIDPass()

View File

@@ -27,17 +27,17 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundSplash" translatesAutoresizingMaskIntoConstraints="NO" id="OYq-ie-PCX">
<rect key="frame" x="0.0" y="0.0" width="430" height="926"/>
<rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WokaLogo" translatesAutoresizingMaskIntoConstraints="NO" id="0T1-bR-Cvy">
<rect key="frame" x="145" y="449.33333333333331" width="140" height="52.333333333333314"/>
<rect key="frame" x="145" y="452.33333333333331" width="140" height="52.333333333333314"/>
<constraints>
<constraint firstAttribute="width" constant="140" id="5Om-xJ-yBC"/>
<constraint firstAttribute="width" secondItem="0T1-bR-Cvy" secondAttribute="height" multiplier="8:3" id="IPk-eZ-y1g"/>
</constraints>
</imageView>
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="KHl-9W-vAe">
<rect key="frame" x="30" y="581.66666666666663" width="370" height="60"/>
<rect key="frame" x="30" y="584.66666666666663" width="370" height="60"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XdB-NB-osA">
<rect key="frame" x="0.0" y="0.0" width="170" height="60"/>
@@ -65,10 +65,10 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b8h-6Z-OJr">
<rect key="frame" x="198.66666666666666" y="849.33333333333337" width="32.666666666666657" height="32.666666666666629"/>
<rect key="frame" x="197.66666666666666" y="853" width="35" height="35"/>
<subviews>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="WFZ-SB-V1t">
<rect key="frame" x="0.0" y="0.0" width="32.666666666666664" height="32.666666666666664"/>
<rect key="frame" x="0.0" y="0.0" width="35" height="35"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="Hy3-fe-fxq"/>
<constraint firstAttribute="width" secondItem="WFZ-SB-V1t" secondAttribute="height" multiplier="1:1" id="wIx-4l-tWy"/>
@@ -76,7 +76,7 @@
<color key="color" name="TextDarkBlue"/>
</activityIndicatorView>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="T63-z7-Ddb">
<rect key="frame" x="0.0" y="0.0" width="0.0" height="32.666666666666664"/>
<rect key="frame" x="0.0" y="0.0" width="0.0" height="35"/>
<color key="tintColor" name="TextDarkBlue"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain">
@@ -95,11 +95,11 @@
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g73-qy-DDl">
<rect key="frame" x="0.0" y="192.66666666666663" width="430" height="129.33333333333337"/>
<rect key="frame" x="0.0" y="195" width="430" height="130"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OED-kP-BRQ">
<rect key="frame" x="0.0" y="671" width="430" height="129.33333333333337"/>
<rect key="frame" x="0.0" y="674" width="430" height="130"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
@@ -121,7 +121,6 @@
<constraint firstItem="OED-kP-BRQ" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="gQN-yu-cfQ"/>
<constraint firstItem="g73-qy-DDl" firstAttribute="height" secondItem="8bC-Xf-vdC" secondAttribute="height" multiplier="0.139485" id="jWc-7L-yx1"/>
<constraint firstItem="KHl-9W-vAe" firstAttribute="top" secondItem="0T1-bR-Cvy" secondAttribute="bottom" constant="80" id="ld4-Um-qic"/>
<constraint firstItem="OED-kP-BRQ" firstAttribute="height" secondItem="8bC-Xf-vdC" secondAttribute="height" multiplier="0.139485" id="mfK-aX-ws9"/>
<constraint firstItem="0T1-bR-Cvy" firstAttribute="top" secondItem="g73-qy-DDl" secondAttribute="bottom" constant="127.33333333333331" id="nPO-Yx-ZpD"/>
<constraint firstItem="b8h-6Z-OJr" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="rKT-Yg-uOY"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="g73-qy-DDl" secondAttribute="trailing" id="vft-8T-uuc"/>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -961,7 +961,7 @@
<rect key="frame" x="0.0" y="348" width="414" height="514"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="1iA-oh-toI">
<rect key="frame" x="0.0" y="0.0" width="414" height="578"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="448"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Explore WOKA" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cla-Q5-K2m" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="10" y="10" width="394" height="24"/>
@@ -983,12 +983,9 @@
</collectionViewFlowLayout>
<cells/>
</collectionView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qyf-6K-qmR" customClass="GADBannerView">
<rect key="frame" x="10" y="194" width="394" height="120"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="N13-hk-WFw"/>
</constraints>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qyf-6K-qmR">
<rect key="frame" x="10" y="189" width="394" height="120"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
@@ -996,7 +993,7 @@
</userDefinedRuntimeAttributes>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="02e-rk-u9Q">
<rect key="frame" x="10" y="324" width="394" height="224"/>
<rect key="frame" x="10" y="194" width="394" height="224"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Coming Soon on WOKA" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vdt-pC-uNJ" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="10" y="10" width="374" height="24"/>
@@ -1070,7 +1067,7 @@
<edgeInsets key="layoutMargins" top="10" left="10" bottom="0.0" right="10"/>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K3K-3D-e9X">
<rect key="frame" x="10" y="558" width="394" height="20"/>
<rect key="frame" x="10" y="428" width="394" height="20"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Etm-uk-Fs9"/>
@@ -1098,6 +1095,7 @@
<constraint firstItem="QRd-bR-MwE" firstAttribute="bottom" secondItem="wIw-DO-ba0" secondAttribute="bottom" id="8aT-sg-dlZ"/>
<constraint firstItem="wIw-DO-ba0" firstAttribute="top" secondItem="Ksi-1c-xBG" secondAttribute="bottom" constant="5" id="9iK-1y-iUL"/>
<constraint firstItem="wIw-DO-ba0" firstAttribute="trailing" secondItem="QRd-bR-MwE" secondAttribute="trailing" id="B2f-vS-BlM"/>
<constraint firstItem="Qyf-6K-qmR" firstAttribute="height" secondItem="Y2R-2G-NBv" secondAttribute="height" multiplier="0.133929" id="DLo-Fr-AKa"/>
<constraint firstItem="03W-c9-Rk6" firstAttribute="top" secondItem="Ksi-1c-xBG" secondAttribute="top" id="Lbz-Fr-iIx"/>
<constraint firstAttribute="bottom" secondItem="1fD-0F-KMn" secondAttribute="bottom" constant="-70" id="Prn-39-0xD"/>
<constraint firstItem="dUF-uY-OBL" firstAttribute="centerY" secondItem="wHk-XC-Cqq" secondAttribute="centerY" id="VXh-QC-K3B"/>
@@ -1115,13 +1113,13 @@
</constraints>
</view>
<connections>
<outlet property="adView" destination="Qyf-6K-qmR" id="bRN-Dk-4ja"/>
<outlet property="avatarImage" destination="4xI-oX-ffb" id="CJN-fs-BUe"/>
<outlet property="collectionView" destination="4rq-xX-XRh" id="Z66-JF-bp2"/>
<outlet property="liveTVActivityIndicator" destination="3yT-Xz-Xmu" id="qBm-dV-10P"/>
<outlet property="liveTvView" destination="Ksi-1c-xBG" id="xcg-na-dB1"/>
<outlet property="nameLabel" destination="Qn2-Bb-Ud6" id="t3V-Kr-Tkh"/>
<outlet property="notificationBtn" destination="tl8-VA-AjQ" id="p7t-q6-5US"/>
<outlet property="testAdView" destination="Qyf-6K-qmR" id="rRh-Pk-nGq"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="AKa-H1-a6U" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>

View File

@@ -20,7 +20,7 @@ class ThemeTwoVC: UIViewController{
@IBOutlet weak var notificationBtn: UIButton!
@IBOutlet weak var liveTVActivityIndicator: UIActivityIndicatorView!
@IBOutlet weak var testAdView: GADBannerView!
@IBOutlet weak var adView: UIView!
var vm = ThemeTwoVM()
@@ -55,13 +55,6 @@ class ThemeTwoVC: UIViewController{
if MyListDataTemp.shareInstance.favListingData?.showData == nil {
MyListDataTemp.shareInstance.favListingData = FavouriteListingDM.ResultData(totalRecords: nil, showData: FavouriteListingDM.ResultData.ShowData(hindi: [],english: []),videoData: [],gameData: [],singKaraokeData: [],audioData: [])
}
/*
This is test ad.
*/
testAdView.adUnitID = K.GoogleAdIDs.themeTwo
testAdView.rootViewController = self
testAdView.load(GADRequest())
}
override func viewWillAppear(_ animated: Bool) {
@@ -274,3 +267,41 @@ extension ThemeTwoVC : UICollectionViewDelegateFlowLayout{
}
// MARK: - Google Ad Banner Delegate
extension ThemeTwoVC : GADBannerViewDelegate{
func bannerViewDidReceiveAd(_ bannerView: GADBannerView) {
print("bannerViewDidReceiveAd")
adView.isHidden = false
bannerView.backgroundColor = #colorLiteral(red: 0.01960784314, green: 0, blue: 0.2196078431, alpha: 1)
bannerView.alpha = 0
UIView.animate(withDuration: 0.3, animations: {
bannerView.alpha = 1
})
}
func bannerView(_ bannerView: GADBannerView, didFailToReceiveAdWithError error: Error) {
self.adView.isHidden = true
print("bannerView:didFailToReceiveAdWithError: \(error.localizedDescription)")
}
func bannerViewDidRecordImpression(_ bannerView: GADBannerView) {
print("bannerViewDidRecordImpression")
}
func bannerViewWillPresentScreen(_ bannerView: GADBannerView) {
print("bannerViewWillPresentScreen")
}
func bannerViewDidRecordClick(_ bannerView: GADBannerView) {
print("bannerViewDidRecordClick")
}
func bannerViewWillDismissScreen(_ bannerView: GADBannerView) {
print("bannerViewWillDIsmissScreen")
}
func bannerViewDidDismissScreen(_ bannerView: GADBannerView) {
print("bannerViewDidDismissScreen")
}
}

View File

@@ -9,6 +9,7 @@ import UIKit
import AVFoundation
import JWPlayerKit
import Alamofire
import GoogleMobileAds
struct Theme2Struct{
let imageName : String
@@ -27,6 +28,7 @@ class ThemeTwoVM{
let monitor = NWPathMonitor()
let queue = DispatchQueue.global(qos: .background)
var isNetworkMonitored = false
var bannerView = GADBannerView()
/*
Static cell data
@@ -50,6 +52,12 @@ class ThemeTwoVM{
guard let self else{return}
self.playLiveTV()
}
// configuring the google ads.
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3, execute: { [weak self] in
guard let self else{return}
AdReusable.sharedInstance.setupBannerAd(bannerView: bannerView, in: vc.adView, adUnitID: K.GoogleAdIDs.splashBanner1, viewController: self.vc, height: 8, width: 15)
})
}
private func handleNotificationCenter(){
@@ -58,7 +66,6 @@ class ThemeTwoVM{
NotificationCenter.default.addObserver(self, selector: #selector(appWillEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(self.viewPush(notification:)), name: NSNotification.Name(rawValue: K.NotificationCenterReloads.themeTwoPush), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(handleRouteChange(_:)), name: AVAudioSession.routeChangeNotification, object: nil)
}
// MARK: - This will handle all clicks for modules

View File

@@ -31,6 +31,7 @@ class WokaFMVC: UIViewController {
vm.player?.pause()
NotificationCenter.default.removeObserver(self,name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.removeObserver(self,name: UIApplication.willEnterForegroundNotification, object: nil)
// Deactivate the audio session if needed
do {
@@ -45,11 +46,14 @@ class WokaFMVC: UIViewController {
vm.vc = self
vm.initView()
NotificationCenter.default.addObserver(self,selector: #selector(appDidEnterBackground),name: UIApplication.didEnterBackgroundNotification,object: nil)
NotificationCenter.default.addObserver(self,selector: #selector(appWillEnterForeground),name: UIApplication.willEnterForegroundNotification,object: nil)
}
// MARK: - App LifeCycle HAndler
@objc func appDidEnterBackground() {
vm.setupNowPlayingInfo()
vm.setupRemoteCommandCenter()
if let postID = AuthFunc.shareInstance.staticURLs?.liveFmData?.id {
let duration = DateFormatterLib.dateDifferenceINT(date1: vm.startTimeStamp, date2: Date())
AuthFunc.shareInstance.userVideoView(postID: postID, postType: PostType.FM.rawValue, duration: duration, catID: 0) { [weak self] isDone in
@@ -61,6 +65,10 @@ class WokaFMVC: UIViewController {
}
}
@objc func appWillEnterForeground(){
vm.stopMPNowPlayin()
}
@IBAction func playBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addRadioCount()
if sender == playBtn{
@@ -151,6 +159,12 @@ class WokaFMVC: UIViewController {
print("FM is ready to play")
vm.player.play()
} else if vm.playerItem.status == .failed {
if vm.retryCount < 4{
vm.retryCount += 1
vm.retryConnect()
print("retry fm connect :-", vm.retryCount)
return
}
print("FM failed to load")
activityIndicator.stopAnimating()
playBtn.setImage(UIImage(named: "Reload"), for: .normal)
@@ -225,9 +239,10 @@ extension UIButton {
extension WokaFMVC : GADBannerViewDelegate{
func bannerViewDidReceiveAd(_ bannerView: GADBannerView) {
print("bannerViewDidReceiveAd")
adView.isHidden = false
bannerView.alpha = 0
bannerView.backgroundColor = #colorLiteral(red: 0.01960784314, green: 0, blue: 0.2196078431, alpha: 1)
UIView.animate(withDuration: 0.3, animations: {
UIView.animate(withDuration: 0.2, animations: {
bannerView.alpha = 1
})
}

View File

@@ -8,6 +8,7 @@
import UIKit
import AVFoundation
import GoogleMobileAds
import MediaPlayer
class WokaFMVM{
@@ -18,7 +19,10 @@ class WokaFMVM{
var startTimeStamp = Date()
var bottomBannerView = GADBannerView()
// if retry count is 4 reset it to 0
var retryCount = 0
func initView(){
startTimeStamp = Date()
vc.mainView.roundCorners(radius: 10, corners: [.topLeft, .topRight])
@@ -43,18 +47,94 @@ class WokaFMVM{
}
self.vc.dismiss(animated: true)
}
setGoogleAd()
// updateNowPlayingInfo()
}
// MARK: - SetupAd
func stopMPNowPlayin(){
MPNowPlayingInfoCenter.default().nowPlayingInfo = nil
}
func setupNowPlayingInfo() {
let nowPlayingInfoCenter = MPNowPlayingInfoCenter.default()
var nowPlayingInfo: [String: Any] = [:]
// Set the media title, artist, and album name
nowPlayingInfo[MPMediaItemPropertyTitle] = "Live FM"
nowPlayingInfo[MPMediaItemPropertyArtist] = "WOKA"
nowPlayingInfo[MPMediaItemPropertyAlbumTitle] = "Album Name"
// Optional: Set the artwork
if let artworkImage = UIImage(named: "WokaLogo") {
let artwork = MPMediaItemArtwork(boundsSize: artworkImage.size) { size in
return artworkImage
}
nowPlayingInfo[MPMediaItemPropertyArtwork] = artwork
}
// Set the duration and current playback position
if let currentItem = player.currentItem {
nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = currentItem.asset.duration.seconds
nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = player.currentTime().seconds
nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = player.rate
}
// Assign the nowPlayingInfo to the center
nowPlayingInfoCenter.nowPlayingInfo = nowPlayingInfo
}
func setupRemoteCommandCenter() {
let commandCenter = MPRemoteCommandCenter.shared()
// Enable play command
commandCenter.playCommand.addTarget { [unowned self] event in
if player.rate == 0.0 {
player.play()
return .success
}
return .commandFailed
}
// Enable pause command
commandCenter.pauseCommand.addTarget { [unowned self] event in
if player.rate == 1.0 {
player.pause()
return .success
}
return .commandFailed
}
// Enable next and previous track commands if needed
commandCenter.nextTrackCommand.isEnabled = false
commandCenter.previousTrackCommand.isEnabled = false
}
func updateNowPlayingInfo() {
if let currentItem = player.currentItem {
var nowPlayingInfo = MPNowPlayingInfoCenter.default().nowPlayingInfo ?? [:]
nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = player.currentTime().seconds
nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = player.rate
MPNowPlayingInfoCenter.default().nowPlayingInfo = nowPlayingInfo
}
}
func setGoogleAd(){
/*
Show google ads with dispatch queue.
*/
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: { [weak self] in
DispatchQueue.main.asyncAfter(deadline: .now() + 0.8, execute: { [weak self] in
guard let self else{return}
AdReusable.sharedInstance.setupBannerAd(bannerView: self.bottomBannerView, in: vc.adView, adUnitID: K.GoogleAdIDs.themeTwo, viewController: self.vc)
vc.adView.isHidden = false
// vc.adView.isHidden = false
})
}
// MARK: - Setup AV & Player
func setupAudioSession() {
@@ -79,6 +159,7 @@ class WokaFMVM{
playerItem = AVPlayerItem(url: url)
player = AVPlayer(playerItem: playerItem)
player.play()
// setGoogleAd()
}
func retryConnect(){

View File

@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -22,7 +21,7 @@
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tru-CU-GHH">
<rect key="frame" x="358" y="437" width="30" height="30"/>
<rect key="frame" x="358" y="527" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" secondItem="tru-CU-GHH" secondAttribute="height" multiplier="1:1" id="oBL-JT-l4l"/>
</constraints>
@@ -33,150 +32,158 @@
<action selector="closeBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="qEj-0u-joR"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5fM-ca-UBK">
<rect key="frame" x="0.0" y="472" width="393" height="380"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundCloud" translatesAutoresizingMaskIntoConstraints="NO" id="jzM-eu-OKw">
<rect key="frame" x="0.0" y="562" width="393" height="290"/>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="WMk-dN-J34">
<rect key="frame" x="0.0" y="562" width="393" height="290"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundCloud" translatesAutoresizingMaskIntoConstraints="NO" id="jzM-eu-OKw">
<rect key="frame" x="0.0" y="0.0" width="393" height="380"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MasilaLogo" translatesAutoresizingMaskIntoConstraints="NO" id="zge-fr-Eo7">
<rect key="frame" x="0.0" y="0.0" width="393" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="zkY-tp-WGf"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MasilaCharacter" translatesAutoresizingMaskIntoConstraints="NO" id="erp-13-s4m">
<rect key="frame" x="0.0" y="30" width="393" height="150"/>
<constraints>
<constraint firstAttribute="height" constant="150" id="1Ot-Jr-tNF"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" image="ComingSoonMasila" translatesAutoresizingMaskIntoConstraints="NO" id="RH0-xQ-zUi">
<rect key="frame" x="0.0" y="240" width="393" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="2Gp-Xz-ex4"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hI6-1V-MUR">
<rect key="frame" x="0.0" y="180" width="393" height="50"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5fM-ca-UBK">
<rect key="frame" x="0.0" y="0.0" width="393" height="290"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V0i-Kx-TXO">
<rect key="frame" x="100" y="0.0" width="193" height="50"/>
<color key="backgroundColor" red="0.36862745099999999" green="0.1215686275" blue="0.76862745099999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MasilaLogo" translatesAutoresizingMaskIntoConstraints="NO" id="zge-fr-Eo7">
<rect key="frame" x="0.0" y="0.0" width="393" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="zkY-tp-WGf"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MasilaCharacter" translatesAutoresizingMaskIntoConstraints="NO" id="erp-13-s4m">
<rect key="frame" x="0.0" y="30" width="393" height="150"/>
<constraints>
<constraint firstAttribute="height" constant="150" id="1Ot-Jr-tNF"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" image="ComingSoonMasila" translatesAutoresizingMaskIntoConstraints="NO" id="RH0-xQ-zUi">
<rect key="frame" x="0.0" y="240" width="393" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="2Gp-Xz-ex4"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hI6-1V-MUR">
<rect key="frame" x="0.0" y="180" width="393" height="50"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V0i-Kx-TXO">
<rect key="frame" x="100" y="0.0" width="193" height="50"/>
<color key="backgroundColor" red="0.36862745099999999" green="0.1215686275" blue="0.76862745099999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sGT-62-neK" userLabel="Vol-">
<rect key="frame" x="110.00000000000001" y="4" width="50.666666666666671" height="42"/>
<constraints>
<constraint firstAttribute="width" secondItem="sGT-62-neK" secondAttribute="height" multiplier="1.2:1" id="mCV-bc-UnD"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="speaker.wave.1.fill" catalog="system"/>
<connections>
<action selector="volumeBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="bZA-9P-p0X"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QCY-ib-bFw" userLabel="Vol+">
<rect key="frame" x="232.66666666666666" y="4" width="50.333333333333343" height="42"/>
<constraints>
<constraint firstAttribute="width" secondItem="QCY-ib-bFw" secondAttribute="height" multiplier="1.2:1" id="OCb-nI-KkI"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="speaker.wave.3.fill" catalog="system"/>
<connections>
<action selector="volumeBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="Eyb-hO-aXs"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JBl-cN-PnX">
<rect key="frame" x="165.66666666666666" y="-6" width="62" height="62"/>
<color key="backgroundColor" red="0.36862745098039218" green="0.12156862745098039" blue="0.76862745098039209" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="JBl-cN-PnX" secondAttribute="height" multiplier="1:1" id="OiK-qQ-wk0"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="PlayButton"/>
<connections>
<action selector="playBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="4u5-dB-Ief"/>
</connections>
</button>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="cnz-PV-85Z">
<rect key="frame" x="186.66666666666666" y="-6" width="20" height="62"/>
<color key="color" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="QCY-ib-bFw" firstAttribute="leading" secondItem="JBl-cN-PnX" secondAttribute="trailing" constant="5" id="1q3-uP-XFR"/>
<constraint firstAttribute="bottom" secondItem="QCY-ib-bFw" secondAttribute="bottom" constant="4" id="3na-Jl-Mir"/>
<constraint firstAttribute="bottom" secondItem="JBl-cN-PnX" secondAttribute="bottom" constant="-6" id="CAg-4X-ZEf"/>
<constraint firstItem="V0i-Kx-TXO" firstAttribute="trailing" secondItem="QCY-ib-bFw" secondAttribute="trailing" constant="10" id="DFl-LC-YaF"/>
<constraint firstItem="V0i-Kx-TXO" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" id="DIF-bB-nkc"/>
<constraint firstItem="V0i-Kx-TXO" firstAttribute="leading" secondItem="sGT-62-neK" secondAttribute="leading" constant="-10" id="DuH-FP-2PQ"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="height" secondItem="JBl-cN-PnX" secondAttribute="height" id="QZw-Xw-8iF"/>
<constraint firstAttribute="bottom" secondItem="V0i-Kx-TXO" secondAttribute="bottom" id="Syc-Zc-u10"/>
<constraint firstItem="JBl-cN-PnX" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" constant="-6" id="WOi-6K-hbI"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="centerY" secondItem="JBl-cN-PnX" secondAttribute="centerY" id="a7t-X2-Rmc"/>
<constraint firstAttribute="bottom" secondItem="sGT-62-neK" secondAttribute="bottom" constant="4" id="as0-w3-1mC"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="centerX" secondItem="JBl-cN-PnX" secondAttribute="centerX" id="b1V-dm-PVx"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="width" secondItem="JBl-cN-PnX" secondAttribute="width" multiplier="0.322581" id="fEs-qd-SsB"/>
<constraint firstItem="sGT-62-neK" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" constant="4" id="i92-so-DwA"/>
<constraint firstItem="JBl-cN-PnX" firstAttribute="centerX" secondItem="hI6-1V-MUR" secondAttribute="centerX" id="nKc-hb-aUI"/>
<constraint firstItem="JBl-cN-PnX" firstAttribute="leading" secondItem="sGT-62-neK" secondAttribute="trailing" constant="5" id="ugE-e5-LuP"/>
<constraint firstAttribute="height" constant="50" id="w5o-m1-tFn"/>
<constraint firstItem="QCY-ib-bFw" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" constant="4" id="xPq-57-EFe"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sGT-62-neK" userLabel="Vol-">
<rect key="frame" x="110.00000000000001" y="4" width="50.666666666666671" height="42"/>
<constraints>
<constraint firstAttribute="width" secondItem="sGT-62-neK" secondAttribute="height" multiplier="1.2:1" id="mCV-bc-UnD"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="speaker.wave.1.fill" catalog="system"/>
<connections>
<action selector="volumeBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="bZA-9P-p0X"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QCY-ib-bFw" userLabel="Vol+">
<rect key="frame" x="232.66666666666666" y="4" width="50.333333333333343" height="42"/>
<constraints>
<constraint firstAttribute="width" secondItem="QCY-ib-bFw" secondAttribute="height" multiplier="1.2:1" id="OCb-nI-KkI"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="speaker.wave.3.fill" catalog="system"/>
<connections>
<action selector="volumeBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="Eyb-hO-aXs"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JBl-cN-PnX">
<rect key="frame" x="165.66666666666666" y="-6" width="62" height="62"/>
<color key="backgroundColor" red="0.36862745098039218" green="0.12156862745098039" blue="0.76862745098039209" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="JBl-cN-PnX" secondAttribute="height" multiplier="1:1" id="OiK-qQ-wk0"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="PlayButton"/>
<connections>
<action selector="playBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="4u5-dB-Ief"/>
</connections>
</button>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="cnz-PV-85Z">
<rect key="frame" x="186.66666666666666" y="-6" width="20" height="62"/>
<color key="color" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="QCY-ib-bFw" firstAttribute="leading" secondItem="JBl-cN-PnX" secondAttribute="trailing" constant="5" id="1q3-uP-XFR"/>
<constraint firstAttribute="bottom" secondItem="QCY-ib-bFw" secondAttribute="bottom" constant="4" id="3na-Jl-Mir"/>
<constraint firstAttribute="bottom" secondItem="JBl-cN-PnX" secondAttribute="bottom" constant="-6" id="CAg-4X-ZEf"/>
<constraint firstItem="V0i-Kx-TXO" firstAttribute="trailing" secondItem="QCY-ib-bFw" secondAttribute="trailing" constant="10" id="DFl-LC-YaF"/>
<constraint firstItem="V0i-Kx-TXO" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" id="DIF-bB-nkc"/>
<constraint firstItem="V0i-Kx-TXO" firstAttribute="leading" secondItem="sGT-62-neK" secondAttribute="leading" constant="-10" id="DuH-FP-2PQ"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="height" secondItem="JBl-cN-PnX" secondAttribute="height" id="QZw-Xw-8iF"/>
<constraint firstAttribute="bottom" secondItem="V0i-Kx-TXO" secondAttribute="bottom" id="Syc-Zc-u10"/>
<constraint firstItem="JBl-cN-PnX" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" constant="-6" id="WOi-6K-hbI"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="centerY" secondItem="JBl-cN-PnX" secondAttribute="centerY" id="a7t-X2-Rmc"/>
<constraint firstAttribute="bottom" secondItem="sGT-62-neK" secondAttribute="bottom" constant="4" id="as0-w3-1mC"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="centerX" secondItem="JBl-cN-PnX" secondAttribute="centerX" id="b1V-dm-PVx"/>
<constraint firstItem="cnz-PV-85Z" firstAttribute="width" secondItem="JBl-cN-PnX" secondAttribute="width" multiplier="0.322581" id="fEs-qd-SsB"/>
<constraint firstItem="sGT-62-neK" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" constant="4" id="i92-so-DwA"/>
<constraint firstItem="JBl-cN-PnX" firstAttribute="centerX" secondItem="hI6-1V-MUR" secondAttribute="centerX" id="nKc-hb-aUI"/>
<constraint firstItem="JBl-cN-PnX" firstAttribute="leading" secondItem="sGT-62-neK" secondAttribute="trailing" constant="5" id="ugE-e5-LuP"/>
<constraint firstAttribute="height" constant="50" id="w5o-m1-tFn"/>
<constraint firstItem="QCY-ib-bFw" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="top" constant="4" id="xPq-57-EFe"/>
<constraint firstAttribute="trailing" secondItem="hI6-1V-MUR" secondAttribute="trailing" id="0HY-Ut-7vJ"/>
<constraint firstItem="RH0-xQ-zUi" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="2OQ-XF-dHi"/>
<constraint firstItem="erp-13-s4m" firstAttribute="top" secondItem="zge-fr-Eo7" secondAttribute="bottom" constant="-30" id="49c-35-bOB"/>
<constraint firstItem="erp-13-s4m" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="6Ef-fm-os1"/>
<constraint firstItem="hI6-1V-MUR" firstAttribute="top" secondItem="erp-13-s4m" secondAttribute="bottom" id="92j-Yc-yFG"/>
<constraint firstItem="zge-fr-Eo7" firstAttribute="top" secondItem="5fM-ca-UBK" secondAttribute="top" id="QJQ-cF-Mdz"/>
<constraint firstItem="hI6-1V-MUR" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="TDX-uI-H7Y"/>
<constraint firstAttribute="bottom" secondItem="RH0-xQ-zUi" secondAttribute="bottom" constant="20" id="TSS-a7-w9J"/>
<constraint firstItem="zge-fr-Eo7" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="U2h-lQ-CVw"/>
<constraint firstItem="RH0-xQ-zUi" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="bottom" constant="10" id="Xyg-xc-QO3"/>
<constraint firstAttribute="trailing" secondItem="erp-13-s4m" secondAttribute="trailing" id="shc-vX-eeD"/>
<constraint firstAttribute="trailing" secondItem="zge-fr-Eo7" secondAttribute="trailing" id="vn4-mh-GIN"/>
<constraint firstAttribute="trailing" secondItem="RH0-xQ-zUi" secondAttribute="trailing" id="xbH-kE-W5r"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IEh-tF-XpP">
<rect key="frame" x="0.0" y="280" width="393" height="100"/>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IEh-tF-XpP">
<rect key="frame" x="0.0" y="0.0" width="393" height="100"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="qDR-Bj-46Y"/>
<constraint firstAttribute="height" constant="100" id="e7j-5I-ing"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="hI6-1V-MUR" secondAttribute="trailing" id="0HY-Ut-7vJ"/>
<constraint firstItem="RH0-xQ-zUi" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="2OQ-XF-dHi"/>
<constraint firstItem="erp-13-s4m" firstAttribute="top" secondItem="zge-fr-Eo7" secondAttribute="bottom" constant="-30" id="49c-35-bOB"/>
<constraint firstAttribute="trailing" secondItem="jzM-eu-OKw" secondAttribute="trailing" id="4bH-FA-5z2"/>
<constraint firstItem="jzM-eu-OKw" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="5cU-9F-DUz"/>
<constraint firstItem="erp-13-s4m" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="6Ef-fm-os1"/>
<constraint firstItem="hI6-1V-MUR" firstAttribute="top" secondItem="erp-13-s4m" secondAttribute="bottom" id="92j-Yc-yFG"/>
<constraint firstAttribute="bottom" secondItem="IEh-tF-XpP" secondAttribute="bottom" id="JW7-KE-JzZ"/>
<constraint firstAttribute="trailing" secondItem="IEh-tF-XpP" secondAttribute="trailing" id="NEl-Op-BxQ"/>
<constraint firstItem="zge-fr-Eo7" firstAttribute="top" secondItem="5fM-ca-UBK" secondAttribute="top" id="QJQ-cF-Mdz"/>
<constraint firstItem="jzM-eu-OKw" firstAttribute="top" secondItem="5fM-ca-UBK" secondAttribute="top" id="SIn-TI-JeI"/>
<constraint firstItem="hI6-1V-MUR" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="TDX-uI-H7Y"/>
<constraint firstItem="zge-fr-Eo7" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="U2h-lQ-CVw"/>
<constraint firstItem="RH0-xQ-zUi" firstAttribute="top" secondItem="hI6-1V-MUR" secondAttribute="bottom" constant="10" id="Xyg-xc-QO3"/>
<constraint firstItem="IEh-tF-XpP" firstAttribute="top" secondItem="RH0-xQ-zUi" secondAttribute="bottom" constant="10" id="gak-Wd-ty2"/>
<constraint firstItem="IEh-tF-XpP" firstAttribute="leading" secondItem="5fM-ca-UBK" secondAttribute="leading" id="nww-1h-oRH"/>
<constraint firstAttribute="trailing" secondItem="erp-13-s4m" secondAttribute="trailing" id="shc-vX-eeD"/>
<constraint firstAttribute="trailing" secondItem="zge-fr-Eo7" secondAttribute="trailing" id="vn4-mh-GIN"/>
<constraint firstAttribute="bottom" secondItem="jzM-eu-OKw" secondAttribute="bottom" id="xHg-ht-8vd"/>
<constraint firstAttribute="trailing" secondItem="RH0-xQ-zUi" secondAttribute="trailing" id="xbH-kE-W5r"/>
<constraint firstAttribute="trailing" secondItem="5fM-ca-UBK" secondAttribute="trailing" id="FgH-U0-3Jj"/>
<constraint firstItem="5fM-ca-UBK" firstAttribute="top" secondItem="WMk-dN-J34" secondAttribute="top" id="L5i-Iv-1Ti"/>
<constraint firstItem="5fM-ca-UBK" firstAttribute="leading" secondItem="WMk-dN-J34" secondAttribute="leading" id="g1i-a3-Q43"/>
</constraints>
</view>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<constraints>
<constraint firstItem="5fM-ca-UBK" firstAttribute="trailing" secondItem="vDu-zF-Fre" secondAttribute="trailing" id="2Bi-iH-QlI"/>
<constraint firstItem="jzM-eu-OKw" firstAttribute="leading" secondItem="WMk-dN-J34" secondAttribute="leading" id="55P-RC-j6r"/>
<constraint firstItem="WMk-dN-J34" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="A1e-R2-ShV"/>
<constraint firstItem="jzM-eu-OKw" firstAttribute="bottom" secondItem="WMk-dN-J34" secondAttribute="bottom" id="BGX-WH-oJv"/>
<constraint firstItem="WMk-dN-J34" firstAttribute="top" secondItem="tru-CU-GHH" secondAttribute="bottom" constant="5" id="Hjg-vR-dHY"/>
<constraint firstItem="ezz-dQ-HXQ" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="Kbz-3U-DoA"/>
<constraint firstItem="5fM-ca-UBK" firstAttribute="top" secondItem="tru-CU-GHH" secondAttribute="bottom" constant="5" id="Ni3-dV-zLu"/>
<constraint firstAttribute="trailing" secondItem="WMk-dN-J34" secondAttribute="trailing" id="Vb9-s1-Cff"/>
<constraint firstAttribute="bottom" secondItem="ezz-dQ-HXQ" secondAttribute="bottom" id="YUf-EY-nOr"/>
<constraint firstItem="jzM-eu-OKw" firstAttribute="top" secondItem="WMk-dN-J34" secondAttribute="top" id="ayN-LM-SJi"/>
<constraint firstItem="ezz-dQ-HXQ" firstAttribute="top" secondItem="5EZ-qb-Rvc" secondAttribute="top" id="bP0-hF-9jU"/>
<constraint firstItem="5fM-ca-UBK" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="coi-Hy-zVY"/>
<constraint firstAttribute="bottom" secondItem="5fM-ca-UBK" secondAttribute="bottom" id="dGM-e4-c0F"/>
<constraint firstAttribute="bottom" secondItem="WMk-dN-J34" secondAttribute="bottom" id="cHL-cD-Fge"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="tru-CU-GHH" secondAttribute="trailing" constant="5" id="k10-NI-GMP"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="ezz-dQ-HXQ" secondAttribute="trailing" id="rIn-7I-mUP"/>
<constraint firstItem="jzM-eu-OKw" firstAttribute="trailing" secondItem="WMk-dN-J34" secondAttribute="trailing" id="zcH-Le-X3T"/>
</constraints>
</view>
<connections>
@@ -204,8 +211,5 @@
<image name="PlayButton" width="42.666667938232422" height="42.666667938232422"/>
<image name="speaker.wave.1.fill" catalog="system" width="128" height="104"/>
<image name="speaker.wave.3.fill" catalog="system" width="128" height="84"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>