I’m having a huge problem with audio in iOS 14.5.1 and 14.6 which is making both the current app store version of my game built in 2016, and the new version I’ve been building to replace this unplayable. In the console on Xcode, this is the error I receive whenever any audio plays:
[ProcessSuspension] 0x101cdf060 - ProcessAssertion: Failed to acquire RBS MediaPlayback assertion 'WebKit Media Playback' for process with PID 1126, error: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}
The important clues seem to be 'WebKit Media Playback' , "Required client entitlement is missing", "com.apple.webkit" and :"MediaPlayback"
The audio still plays but crackles with every sound effect, then half way through the second scene as a song is playing the sound deteriorates completely, crackling more and more until it is pure white noise. When I exit back to the main menu, and start a new game, or even click the options which plays a small sound effect, the sound is still crackling, and has not reset itself after getting progressively worse as the errors piled up.
The current App store version of my game built in 2016 still works perfectly on iOS 12.5.1 on my iPad mini, and so does the new version I’m testing.
iOS 14.5.1 and 14.6 also create audio bugs on the 2016 version: whenever a sound plays the game lags big time – I imagine because of the entitlement error. The 2016 version also displays some strange behaviour in the second scene of my game, whereby a “Touch to Start” screen (I put at the start of each scene back when iOS needed a touch input to start audio) stays on the screen after you touch, making the entire scene play out beneath a black layer. This is how I became aware that anything was even wrong – a customer emailed me to tell me they were stuck at this point, and sure enough the same thing happened to me. I can tell the scene is playing out as the music and sounds play out once you touch, and after a couple of minutes, the next scene starts.
This is obviously a new thing as people have been playing this build for 5 years and this is the first time it’s been reported, and any google search to do with this error on other engines that use webkit date only from last year. I've seen reports of it in both the apple developer forums and webkit bug reports. I've tried creating a new project with just a button that plays a sound, and the error still appears.
Here's everything I've tried
- Building the old Construct 2 project with the C3 export manager
- Building with C3 and C2 runtime
- Using only .m4a audio
- Using only .mp3 audio
- Using only .webmd audio
- Adding entitlements/capabilities that seem like they might include this in both xcode and the provisioning profile
- Preloading/not preloading sound
- Putting music in sounds folder to preload all sounds
- Using/not using worker
- Setting audio to Play in Background
- Searching high and low all over forums where there is any mention of this bug for solutions.
- I purchased an iPod Touch 7th gen so I could test on the latest iOS.
- This occurs on both a physical iPod Touch and Apple simulated devices
So my best guess is that this is a problem with at least iOS 14.5.1 and 14.6 and webkit. I’m guessing that iOS 14 requires this entitlement to play any kind of audio or media, and that this has been affecting projects since it was released. I’m not sure it has anything to do with the new version of Cordova, as my old app still has trouble on the new iOS.
I’ve been working solidly to fix this for 4 days now and am at my wits end, I’m not one to ask for help as you can see by how long it’s taken, but I’m not sure what else to do. My game is currently #78 in Role Playing in the UK and I hate the thought of people trying to play it and being disappointed, so working around the clock to fix it.
Ashley your help would be highly appreciated, I imagine this is affecting all iOS releases.