Required client entitlement required? - ios

I have a wkwebview and I selected the checkbox 'inline playback' which is suppose to make any video in the wkwebview to not autoplay and stay in the webpage and not go full screen.
This worked fine for me until my Xcode updated to 11!
I now get the following error but it lets the auto playing video to go full screen, when before it wouldn't.
2019-09-27 22:26:43.654625-0400 RPD[3848:126819] [assertion] Error acquiring assertion: <NSError: 0x600000c9c7b0; domain: RBSAssertionErrorDomain; code: 2; reason: "Required client entitlement is missing"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x7fe141f30d60; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
}
}
I added the capability 'Background Modes' but enabling Audio, Airplay, Picture in picture does not do anything.

Related

React Native app fails on launch on one iPhone only, bootstrapping failed

We've run into an unusual situation in which an ad-hoc build of our app crashes on one specific user's iPhone (iPhone 12 Pro Max). Other users with the same device have no issue. This device is running the iOS 15 Beta (8, I believe), but so are other devices that work.
The behavior is that the app launches, the splash screen is briefly shown, and then the app disappears. There are no crash logs for the event, but I do see entries in the log that indicate bootstrapping has failed. The error message is a bit inscrutable, so I'm not sure what to look at.
This is all complicated by it not being an actual native app, as it is written using React Native. So debugging is problematic.
Looking at the log below (see the 11:33:43.698190-0400 line), does anyone have a suggestion on what I should look for? Out of 60 testers, this is the only phone with the issue.
default 11:33:43.608231-0400 Spotlight [FBSSystemService][0xe7c9] Sending request to open "com.foo.mobile.thisapp"
default 11:33:43.608625-0400 SpringBoard [FBSystemService][0xe7c9] Received request to open "com.foo.mobile.thisapp" from Spotlight:406.
default 11:33:43.608738-0400 SpringBoard Received trusted open application request for "com.foo.mobile.thisapp" from <FBApplicationProcess: 0x1084c37e0; application<com.apple.Spotlight>:406(v468)>.
default 11:33:43.635600-0400 SpringBoard Executing request: <SBMainWorkspaceTransitionRequest: 0x28344de60; eventLabel: OpenApplication(sceneID:com.foo.mobile.thisapp-default)ForRequester(Spotlight.406); display: Main; source: Spotlight>
default 11:33:43.647737-0400 SpringBoard [FBWorkspaceEvent] Executing: <FBWorkspaceEvent: 0x284665a00; OpenApplication(sceneID:com.foo.mobile.thisapp-default)ForRequester(Spotlight.406)>
default 11:33:43.649306-0400 SpringBoard Asked to bootstrap a new process with identity: application<com.foo.mobile.thisapp>
default 11:33:43.649338-0400 SpringBoard Creating process (sync=true) with identity: application<com.foo.mobile.thisapp>
default 11:33:43.649426-0400 SpringBoard Created <FBWorkspace: 0x283194210; application<com.foo.mobile.thisapp>>
default 11:33:43.649518-0400 SpringBoard Bootstrapping application<com.foo.mobile.thisapp> with intent foreground-interactive
default 11:33:43.650264-0400 SpringBoard [Main] dispatch event:
<SBSceneReadySwitcherModifierEvent: 0x284698320; type: SceneReady; appLayout: <SBAppLayout: 0x281e6c080; primary: com.foo.mobile.thisapp:default; environment: main> {
configuration = full;
environment = main;
layoutItems = {
primary = <SBDisplayItem: 0x2849d13b0> {
type = App;
bundleIdentifier = com.foo.mobile.thisapp;
uniqueIdentifier = sceneID:com.foo.mobile.thisapp-default;
};
}
}>
default 11:33:43.654268-0400 runningboardd Acquiring assertion targeting application<com.foo.mobile.thisapp> from originator [daemon<com.apple.SpringBoard>:67] with description <RBSAssertionDescriptor| "FBApplicationProcess" ID:34-67-63886 target:application<com.foo.mobile.thisapp> attributes:[
<RBSDomainAttribute| domain:"com.apple.frontboard" name:"Bootstrap-Foreground" sourceEnvironment:"(null)">,
<RBSDomainAttribute| domain:"com.apple.frontboard" name:"Visibility" sourceEnvironment:"(null)">
]>
default 11:33:43.654411-0400 runningboardd Assertion 34-67-63886 (target:application<com.foo.mobile.thisapp>) will be created as active
default 11:33:43.654645-0400 runningboardd Executing launch request for application<com.foo.mobile.thisapp> (FBApplicationProcess)
default 11:33:43.654810-0400 runningboardd Creating and launching job for: application<com.foo.mobile.thisapp>
default 11:33:43.654988-0400 runningboardd _mutateContextIfNeeded called for com.foo.mobile.thisapp
default 11:33:43.671674-0400 mediaserverd <<<< FigCaptureDisplayLayoutMonitor >>>> -[FigCaptureDisplayLayoutMonitor _updateCurrentLayout:]: <FBSDisplayLayout: 0x1392c2630; displayIdentity: Main> { bounds = {{0, 0}, {428, 926}}; interfaceOrientation = "portrait (1)"; backlightLevel = 100; elements = { <SBSDisplayLayoutElement: 0x13922f140; com.apple.springboard.spotlight; frame: {{0, 0}, {428, 926}}; level: 0; role: embedded>; <SBSDisplayLayoutElement: 0x139270130; sceneID:com.foo.mobile.thisapp-default; bundleID: com.foo.mobile.thisapp; frame: {{0, 0}, {428, 926}}; level: 1; role: primary>; } timestamp = September 2, 2021 at 11:33:43 AM EDT;}
default 11:33:43.673667-0400 SpringBoard [Main] dispatch event:
<SBTransitionSwitcherModifierEvent: 0x283a3df00; type: MainTransition; transitionID: B611A8E7-B802-4298-8FB7-A9E960141B96; phase: Prepare; animated: YES; fromAppLayout: 0x0; toAppLayout: <SBAppLayout: 0x281e6c080; primary: com.foo.mobile.thisapp:default; environment: main>; fromEnvironmentMode: home-screen; toEnvironmentMode: application; pendingTermination: {(
)}; isSpotlightTransition: YES; dosidoTransitionDirection: 0>
default 11:33:43.697614-0400 runningboardd Invalidating assertion 34-67-63886 (target:application<com.foo.mobile.thisapp>) from originator [daemon<com.apple.SpringBoard>:67]
error 11:33:43.698190-0400 SpringBoard Bootstrapping failed for <FBApplicationProcess: 0x1084e9b50; application<com.foo.mobile.thisapp>:<invalid>> with error: <NSError: 0x28498d350; domain: RBSRequestErrorDomain; code: 5; reason: "Launch failed."> {
NSUnderlyingError = <NSError: 0x28498e2e0; domain: NSPOSIXErrorDomain; code: 85>;
}
default 11:33:43.698318-0400 SpringBoard [application<com.foo.mobile.thisapp>:-1] Now flagged as pending exit for reason: Bootstrap failed
default 11:33:43.698349-0400 SpringBoard [application<com.foo.mobile.thisapp>:-1] Connection to remote process was not established.
Interestingly enough, this appears to be some side effect of compiling with Fastlane and then using Fastlane to upload the artifact. If I archive the project manually and upload it to Firebase, the app works fine on the iPhone in question.

Html5 Audio stop within a second when i play in IOS [IONIC 5]

this is really frustrating and i have an ionic app where we need to play audio and we used html5 audio to play the radio with url like this.
audio = new Audio();
audio.src = url;
audio.play();
it works on android and all ios simulators without any problem but when we use physical device it start and stopped within a second and in logs it give this error.
Error acquiring assertion: <NSError: 0x282cf67c0; domain: RBSAssertionErrorDomain; code: 2; reason:
"Required client entitlement is missing"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x1592432e0; requestedReason: MediaPlayback; reason:
MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown |
WantsForegroundResourcePriority>;
}
Weird thing is that sometime it works but i mean it happened like one or two occasions.
if anyone has any idea please help me out.
thanks

FBSOpenApplicationServiceErrorDomain

Got this strange error when running a unit test. It only appears when attaching to the process when testing the target by Xcode. Testing the target without attaching debugger works. Running the test by command line tool also works. Any idea about the reason? Thanks!
DetailsThe request to open "org.cocoapods.UnitTestHost" failed.
Domain: FBSOpenApplicationServiceErrorDomain
Code: 1
Failure Reason: The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified ("null").
User Info: {
BSErrorCodeDescription = RequestDenied;
FBSOpenApplicationRequestID = 0x2594;
}
--
The operation couldn't be completed. (null)
Domain: FBSOpenApplicationErrorDomain
Code: 1
Failure Reason: (null)
User Info: {
BSErrorCodeDescription = Unspecified;
}
--
Some related error messages from the console:
SpringBoard (SpotlightUI) Reply Error on 0x600000857000:Connection interrupted
runningboardd (RunningBoard) failed to get pid for label UIKitApplication:org.cocoapods.UnitTestHost[6d75][rb-legacy] : No such process (3)
runningboardd (RunningBoard) Failed to start job for application<org.cocoapods.UnitTestHost>: <NSError: 0x7fa02351ca80; domain: NSPOSIXErrorDomain; code: 3; reason: "No such process"> {
userInfo = {
RBLaunchdOperation = launch_get_running_pid_4SB;
RBLaunchdJobLabel = UIKitApplication:org.cocoapods.UnitTestHost[6d75][rb-legacy];
}
}
runningboardd (RunningBoard) Launchd says label UIKitApplication:org.cocoapods.UnitTestHost[6d75][rb-legacy] has never exited
runningboardd (RunningBoard) Removing job: <RBLaunchdJob: 0x7fa02491a110; UIKitApplication:org.cocoapods.UnitTestHost[6d75][rb-legacy]>
Check your scheme settings and make sure all empty settings are unchecked. After doing this restart Xcode and simulator. Product menu > Scheme > Edit Scheme > Run > Arguments > Environment Variables
If there is a checkmark there with an empty field next to it, then uncheck it.
Try resetting your simulator
sudo rm -rf /private/tmp/com.apple.CoreSimulator.SimDevice.*
If it doesn't work try to restart the system.
Check Mach-O Type of your app.
Usually this error appears when you try to run Mach-Object with inappropriate type like Dynamic Library/Bundle/Static Library/Relocatable Object File. To solve the issue select Project -> Build Settings. Search Mach-O Type, change type to Executable.

WKWebView with embedded iframe player causes bad access when trying to disconnect from airplay

I have a WKWebView which loads request with this url which is after loaded plays inline video and can be switched to full screen , when switched to full screen the native ios player appears, there is airplay button in that player letting user to stream video via airplay, there is no problem with connection to airplay and streaming play, pause etc.
The problem is that when i try to switch playback back to app from the airplay switch menu it causes bad access exception with log :
Error acquiring assertion: <NSError: 0x283cbe310; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement">
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x108054960; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
}
[ProcessSuspension] 0x1183e1018 - ProcessAssertion() PID 29725 Unable to acquire assertion for process with PID 29725[![enter image description here][1]][1]
The connection indicator also looks strange when connected to airplay
Finally solved the problem was in a third part lib which has categories on NSObject which where overriding copyWithZone method and were causing BAD_ACCESS, so removing the lib and implementing its functionality on project side solved the problem.

iOS 13 Closing App on Background: Audio Stream Issue

I'm stuck in playing audio on the background with Swift 5 and Xcode 11.
Enabling Background Mode and starting AVAudioSession no longer works and the app keeps closing after a few seconds when you leave the app.
First I get a entitlement warming, but the stream starts:
Error acquiring assertion: <NSError: 0x2829830f0; domain: RBSAssertionErrorDomain; code: 2; reason: "Required client entitlement is missing"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x1050a9040; requestedReason: MediaPlayback; reason: MediaPlayback; flags: PreventTaskSuspend | PreventTaskThrottleDown | WantsForegroundResourcePriority>;
}
When after a few seconds on the background it closes:
[ProcessSuspension] Background task expired while holding WebKit ProcessAssertion (isMainThread? 1).
If I keep the app open the audio stops anyway:
[ProcessSuspension] 0x10dfc8848 - ProcessAssertion::processAssertionWasInvalidated()
Apple loves to change this every year. Anyone got this working on iOS 13 and Xcode 11/Swift 5 so far?
Thanks!
UPDATE: I just found out this issue is affecting only audio played through WebViews. I'm not sure if this is a bug on iOS 13 or if Apple is really cutting WebViews from multitasking. So I changed my app and the audio is now being played through the AVPlayer. Background audio works again.
do you put code for resume play audio in you Appdelegate
func applicationDidEnterBackground(_ application: UIApplication) {
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [.mixWithOthers, .allowAirPlay])
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print(error)
}
}
addition make audio, airplay,and picture in picture on from your target capabilities

Resources