Game audio doesn't work after reward ad.

629 views
Skip to first unread message

りいん

unread,
Jan 16, 2023, 7:49:47 AM1/16/23
to Google Mobile Ads SDK Developers
Hi

Game audio doesn't work after reward ad. This is on iOS.
I create game using swift.
iOS version:16.1.1 
Xcode version :14.2
CocoaPods version :1.11.3 
Test device: iPhoneXR
Google-Mobile-Ads-SDK: latest version

I want to resolve this issue.


This is Xcode log when game audio doesn't work after reward ad. 
2023-01-16 02:53:47.509992+0900 mv_to_ios[492:11977] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)}> 2023-01-16 02:53:47.510220+0900 mv_to_ios[492:11977] [ProcessSuspension] 0x10e000950 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=499, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)} 2023-01-16 02:53:47.511628+0900 mv_to_ios[492:11977] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)}> 2023-01-16 02:53:47.511699+0900 mv_to_ios[492:11977] [ProcessSuspension] 0x10e001580 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=492, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)} 2023-01-16 02:53:47.513956+0900 mv_to_ios[492:11977] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)}> 2023-01-16 02:53:47.514192+0900 mv_to_ios[492:11977] [ProcessSuspension] 0x10e0015d0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=500, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement http://com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement http://com.apple.multitasking.systemappassertions)} userContentController http://message.name showRewardedAd adWillPresentFullScreenContent rewardedAd 2023-01-16 02:54:03.786593+0900 mv_to_ios[492:12927] dnssd_clientstub write_all(20) DEFUNCT 2023-01-16 02:54:03.786623+0900 mv_to_ios[492:12927] dnssd_clientstub deliver_request ERROR: write_all(20, 92 bytes) failed 2023-01-16 02:54:03.786661+0900 mv_to_ios[492:12927] dnssd_clientstub write_all(20) DEFUNCT 2023-01-16 02:54:04.005134+0900 mv_to_ios[492:12927] [connection] nw_connection_copy_connected_local_endpoint_block_invoke [C26] Client called nw_connection_copy_connected_local_endpoint on unconnected nw_connection 2023-01-16 02:54:04.005171+0900 mv_to_ios[492:12927] [connection] nw_connection_copy_connected_remote_endpoint_block_invoke [C26] Client called nw_connection_copy_connected_remote_endpoint on unconnected nw_connection 2023-01-16 02:54:04.005190+0900 mv_to_ios[492:12927] [connection] nw_connection_copy_protocol_metadata_internal_block_invoke [C26] Client called nw_connection_copy_protocol_metadata_internal on unconnected nw_connection showRewardedAd Reward received with currency 10, amount 10.0 2023-01-16 02:54:18.814596+0900 mv_to_ios[492:8823] [View] First responder issue detected: non-key window attempting reload - allowing due to manual keyboard (first responder window is <UIWindow: 0x10ff284e0; frame = (0 0; 414 896); hidden = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x2808b9da0>; backgroundColor = <UIDynamicSystemColor: 0x281356e40; name = _windowBackgroundColor>; layer = <UIWindowLayer: 0x2808b9c20>>, key window is <UIWindow: 0x10ff0f560; frame = (0 0; 414 896); gestureRecognizers = <NSArray: 0x280858ed0>; layer = <UIWindowLayer: 0x280846490>>) viewDidAppear adDidDismissFullScreenContent rewardedAd loadRewardedAd onAdLoaded 2023-01-16 02:54:22.340776+0900 mv_to_ios[492:13249] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement http://com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement http://com.apple.runningboard.assertions.webkit}> 2023-01-16 02:54:22.340902+0900 mv_to_ios[492:13249] [ProcessSuspension] 0x10e07c120 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=524, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement http://com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement http://com.apple.runningboard.assertions.webkit} 2023-01-16 02:54:22.342027+0900 mv_to_ios[492:13249] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}> 2023-01-16 02:54:22.342122+0900 mv_to_ios[492:13249] [ProcessSuspension] 0x10e07c2a0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=524, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}

Mobile Ads SDK Forum Advisor

unread,
Jan 16, 2023, 1:08:14 PM1/16/23
to riinwin.sec...@gmail.com, google-adm...@googlegroups.com
Hello,

Thank you for reporting this to us. Would you able to elaborate your use case and the reported behavior? Kindly provide the following via reply privately to author option.
  • AdMob App ID
  • Video recording 
  • Sample app

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002hytYFQAY&entry.80707362=00163702

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.



Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2hytYF:ref

b bk

unread,
Jan 16, 2023, 10:58:55 PM1/16/23
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Thank you.

I sent sample files by uploading.

AdMob App ID:ca-app-pub-3940256099942544~1458002511
(I used test ad)

Sample project is sampletest\mv_to_ios-master\mv_to_ios.xcworkspace.
Please open sampletest\mv_to_ios-master\mv_to_ios.xcworkspace by Xcode.
 



2023年1月17日(火) 3:07 Mobile Ads SDK Forum Advisor <mobile...@forumsupport.google>:

Mobile Ads SDK Forum Advisor

unread,
Jan 17, 2023, 3:24:12 AM1/17/23
to riinwin.sec...@gmail.com, google-adm...@googlegroups.com

Hello,

 

Michael here and I work along with Teejay.

 

Confirming that we have received the files you sent to us. However, upon testing the shared sample implementation, I was unable to test the behavior as I was constantly receiving an error on app build process. I have attached the screenshot of the error for your reference. With that, would you be able to share the steps to exactly replicate the reported behavior from building the app up to running it?

 

Can you also confirm if the issue is exclusively reproducible in iPhoneXR (simulator or real device) and/or iOS version:16.1.1?

Regards,

Google Logo
Michael Angelo
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2hytYF:ref
Screenshot 2023-01-17 at 2.07.36 PM.png

b bk

unread,
Jan 17, 2023, 3:58:00 AM1/17/23
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hi

I sent sample files and movie sharing the steps by uploading.
Step choosing team, please select your team name.

I confirmed only PhoneXR (real device) and iOS version:16.1.1.

2023年1月17日(火) 17:23 Mobile Ads SDK Forum Advisor <mobile...@forumsupport.google>:

Mobile Ads SDK Forum Advisor

unread,
Jan 17, 2023, 5:37:14 AM1/17/23
to riinwin.sec...@gmail.com, google-adm...@googlegroups.com

Hi,

 

Thank you for your response.

 

As mentioned by my colleague, we already received your sample app project as well as the video replication, however, we're unable to build your project to proceed for replication like the one on the video replication you've provided. Upon building your app, we're encountering an error "Command: PhaseScriptExecution failed with non zero exit code". Can you confirm if you're able to encounter this error in your end while building your app in the simulator? In addition to that, can you provide us privately a Charles log (see instruction here) capturing the ads?

 

You can provide the following details via reply privately to author option or directly provide it to the link below.

 

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002hytYFQAY&entry.80707362=00163702

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

 

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2hytYF:ref

b bk

unread,
Jan 17, 2023, 8:10:26 AM1/17/23
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hi

I sent charles logs (.chls and .chlsx).

Please do this step before building project.
1.Open terminal.
2.Execute these command.
$ cd /mv_to_ios # move to "mv_to_ios" folder
$ pod install



2023年1月17日(火) 19:36 Mobile Ads SDK Forum Advisor <mobile...@forumsupport.google>:

Mobile Ads SDK Forum Advisor

unread,
Jan 17, 2023, 1:00:54 PM1/17/23
to riinwin.sec...@gmail.com, google-adm...@googlegroups.com
Hello,

Thank you for getting back to us. I've raised this to a wider team for further investigation. I'll let you know the soonest I hear back from them.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2hytYF:ref

Mobile Ads SDK Forum Advisor

unread,
Jan 31, 2023, 3:47:52 PM1/31/23
to riinwin.sec...@gmail.com, google-adm...@googlegroups.com

Hi,

 

Thank you for patiently waiting.

 

With regard to your concern for audio that wasn't working after the rewarded ad, can you confirm if you're using AudioVideoManager to manage your audio states?

b bk

unread,
Mar 8, 2023, 12:20:13 AM3/8/23
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hi,

Thank you for replying.

I used AudioVideoManager to manage my audio states, but I could not implement well.
In order to implement  AudioVideoManager, tell me where I am wrong.

//

//  ViewController.swift

//  mv_to_ios

//

//  Created by mac-user on 2020/06/21.

//  Copyright © 2020 developer. All rights reserved.

//


import UIKit

import WebKit

import GoogleMobileAds

import AppTrackingTransparency

import AdSupport



class ViewController: UIViewController {

    

    private var webView: WKWebView!

    private var scriptHandler: ScriptHandler!

    private var bannerView: GADBannerView!

    private var isLoadedBanner = false

    private var isLoadedWebView = false

    weak var delegate: (GADAudioVideoManagerDelegate)?


    

    override func viewDidLoad() {

        super.viewDidLoad()

        print("viewDidLoad")

        // Do any additional setup after loading the view.

    }

    

    override func viewDidAppear(_ animated: Bool) {

        print("viewDidAppear")

        if (isLoadedWebView) {

            return

        }

        

        createBannerView()

        createWebview()

        let url = URL(string: "rpgmv:///index.html")!

        webView.load(URLRequest(url:url))

        isLoadedWebView = true

        

        checkTrackingAuthorization()

        

        Advertisement.shared.loadRewardedAd(onLoaded: nil, onFailed: nil)

        Advertisement.shared.loadInterstitialAd()

        

        if !Constants.handleAdBannerDisplay {

            loadBanner()

        }

    }

        

    //MARK: - WebView

    

    func getWebviewFrame() -> CGRect {

        let screenWidth:CGFloat = view.frame.size.width

        var screenHeight:CGFloat = view.frame.size.height

        var window = UIWindow()

        for win in UIApplication.shared.windows {

            if win.isKeyWindow {

                window = win

            }

        }

        let topPadding = window.safeAreaInsets.top

        let bottomPadding = window.safeAreaInsets.bottom

        

        screenHeight = screenHeight - topPadding - bottomPadding

        var y:CGFloat = topPadding

        let bannerViewSize = getAdSize()

        if bannerView != nil {

            screenHeight -= bannerViewSize.size.height

            if Constants.adBannerPosition == "top" {

                y += bannerViewSize.size.height

            }

        }

        

        let rect = CGRect(x: 0, y: y, width: screenWidth, height: screenHeight)

        

        return rect

    }

    

    func createWebview() {

        if webView != nil {

            webView.removeFromSuperview()

        }

        let config = WKWebViewConfiguration()

        config.setURLSchemeHandler(MVCustomSchemeHandler(), forURLScheme: "rpgmv")

        

        // scriptHandler

        scriptHandler = ScriptHandler()

        config.userContentController = scriptHandler.setUserContentController()

        

        self.webView = WKWebView(frame: getWebviewFrame(), configuration: config)

        self.view.addSubview(self.webView)

        self.webView.translatesAutoresizingMaskIntoConstraints = true

        self.webView.scrollView.bounces = false

        scriptHandler.setWebView(_webView: self.webView)

        scriptHandler.setViewController(_viewController: self)

    }

    

    //MARK: - BannerView

    

    func getAdSize() -> GADAdSize {

        let frame = { () -> CGRect in

            if #available(iOS 11.0, *) {

                return view.frame.inset(by: view.safeAreaInsets)

            } else {

                return view.frame

            }

        }()

        let viewWidth = frame.size.width

        let adSize:GADAdSize = GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(viewWidth)

        return adSize

    }

    

    func createBannerView() {

        if bannerView != nil {

            bannerView.removeFromSuperview()

        }

        if Constants.adBannerUnitId.isEmpty {

            bannerView = nil

            return

        }

        bannerView = GADBannerView(adSize: GADAdSizeBanner)

        bannerView.adUnitID = Constants.adBannerUnitId

        bannerView.rootViewController = self

        bannerView.adSize = getAdSize()

        bannerView.translatesAutoresizingMaskIntoConstraints = false

        view.addSubview(bannerView)

        

        let attribute = (Constants.adBannerPosition == "top") ? NSLayoutConstraint.Attribute.top : NSLayoutConstraint.Attribute.bottom

        

        view.addConstraints([

            NSLayoutConstraint(item: bannerView!,

                               attribute: attribute,

                               relatedBy: .equal,

                               toItem: view.safeAreaLayoutGuide,

                               attribute: attribute,

                               multiplier: 1,

                               constant: 0),

            NSLayoutConstraint(item: bannerView!,

                               attribute: .centerX,

                               relatedBy: .equal,

                               toItem: view,

                               attribute: .centerX,

                               multiplier: 1,

                               constant: 0),

        ])

    }

    

    func loadBanner() {

        if bannerView == nil || isLoadedBanner {

            return

        }

        bannerView.load(GADRequest())

        isLoadedBanner = true

    }

    

    func checkTrackingAuthorization() {

        if #available(iOS 14, *) {

            ATTrackingManager.requestTrackingAuthorization( completionHandler: { status in

                switch status {

                case .authorized:

                    GADMobileAds.sharedInstance().start(completionHandler: nil)

                    print("requestTrackingAuthorization = authorized")

                case .notDetermined:

                    print("requestTrackingAuthorization = notDetermined")

                case .restricted:

                    print("requestTrackingAuthorization = restricted")

                case .denied:

                    print("requestTrackingAuthorization = denied")

                @unknown default:

                    fatalError()

                }

            })

        } else {

            GADMobileAds.sharedInstance().start(completionHandler: nil)

        }

    }

    

    func setUp() {

        GADMobileAds.sharedInstance().audioVideoManager.delegate = self

        GADMobileAds.sharedInstance().audioVideoManager.audioSessionIsApplicationManaged = false

    }

    func myAppWillStartPlayingMusic() {

        // Mutes all Google video ads.

        GADMobileAds.sharedInstance().audioVideoManager.audioSessionIsApplicationManaged = true

        GADMobileAds.sharedInstance().applicationMuted = true

    }

    func myAppDidStopPlayingMusic() {

        // Un-mutes all of our video ads.

        GADMobileAds.sharedInstance().audioVideoManager.audioSessionIsApplicationManaged = false

        GADMobileAds.sharedInstance().applicationMuted = false

    }


    // MARK: - GADAudioVideoManagerDelegate

    func audioVideoManagerWillPlayAudio(_ audioVideoManager: GADAudioVideoManager) {

        // The mobile ads SDK is notifying your app that it will play audio. You

        // could optionally pause music depending on your apps design.

        MyAppObject.sharedInstance().pauseAllMusic()

    }


    func audioVideoManagerDidStopPlayingAudio(_ audioVideoManager: GADAudioVideoManager) {

        // The mobile ads SDK is notifying your app that it has stopped playing

        // audio. Depending on your design, you could resume music here.

        MyAppObject.sharedInstance().resumeAllMusic()

    }

    

}


2023年2月1日(水) 5:47 Mobile Ads SDK Forum Advisor <mobile...@forumsupport.google>:

Mobile Ads SDK Forum Advisor

unread,
Mar 8, 2023, 4:53:08 AM3/8/23
to riinwin.sec...@gmail.com, google-adm...@googlegroups.com
Hello,

Thank you for the information. I've forwarded this to the wider team. We will update you once we have any developments on this.

Regards,
Google Logo Mobile Ads SDK Team


ref:_00D1U1174p._5004Q2hytYF:ref

Mobile Ads SDK Forum Advisor

unread,
Mar 31, 2023, 7:19:34 AM3/31/23
to google-adm...@googlegroups.com, riinwin.sec...@gmail.com
Hello,

I hope you're safe and doing fine. Thank you for your patience

Please be informed that the reported behavior here has been fixed. 
Reply all
Reply to author
Forward
0 new messages