In a WKWebView I am receiving this warning when I upload the image to our server using FormData via Ajax. The entire process completes successfully.
Can anyone suggest what is the missing entitlement. I have reviewed entitlements related to WKWebView
In the console I see that the pid is associated with "webkit.uploads"
"Required client entitlement is missing" requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>
// xcode debug console on submit
MyDomain[3002:428982] [ProcessSuspension] 0x104be68a0 - ProcessAssertion() PID 3002 Unable to acquire assertion for process with PID 3002
MyDomain[3002:427999] [ProcessSuspension] 0x104be68a0 - ProcessAssertion::processAssertionWasInvalidated()
MyDomain[3002:428982] [assertion] Error acquiring assertion: <NSError: 0x281b3b6f0; domain: RBSAssertionErrorDomain; code: 2; reason: "Required client entitlement is missing"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x100f2ee40; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}
// javascript upload code
var formData=new FormData();
formData.append("action", 'save');
var fileInput = document.getElementById('addImage');
if (fileInput.files && fileInput.files[0]) {
var file = fileInput.files[0
formData.append('messageImage', file);
hasFile = true;
}
if(hasFile){
$.ajax({
type: "POST",
url: "/images/save",
data: formData,
dataType: 'json',
contentType: false,
processData: false,
success: function(result){}
});
}