Post

Replies

Boosts

Views

Activity

Javascript error: "Unable to run user agent scripts because this document has previously accessed Apple Pay"
Hi All - Very recently, we've begun seeing this exception coming from multiple versions of our App: Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=0, WKJavaScriptExceptionMessage=Unable to run user agent scripts because this document has previously accessed Apple Pay. Documents can be prevented from accessing Apple Pay by adding a WKUserScript to the WKWebView's WKUserContentController., WKJavaScriptExceptionColumnNumber=0, NSLocalizedDescription=A JavaScript exception occurred} we do not support Apple Pay on this site. This particular part of our app interacts with a web based chart hosted on our domain, via several javascript functions. we're using webView.evaluateJavascript(...) Other parts of the app that interact with other pages do NOT encounter this issue. As mentioned, this has worked perfectly fine in the past, and only recently started happening. While I quadruple check things on my end, is there any documentation on this error and where I can begin troubleshooting this? Thanks in advance.
5
0
2.5k
Dec ’21
iPadOS Picture-In-Picture automatically invoking when backgrounding App
We're currently seeing a new behavior in our iOS app (not fully iPadOS compatible yet, but does support basic pre-iOS 13 multitasking).We have a screen that has an autoplaying video on it - This video is intentionally not available for PiP mode (we manually disable the button for it)However, with the new iPadOS, even though we've disabled the direct interaction to enable PiP, when we background the app the video goes into PiP mode automatically.This was not occuring in iOS 12.Is this behavior change new to iPadOS? Is this something we can disable manually if it is?I'm concerned about this because of the note on AVPictureInPicture's documentation:"NotePicture in Picture (PiP) is a user feature that Apple intends to always be under user control. Invoke PiP only in response to a user’s explicit request to do so. If an app invokes PiP in a way that is not under the immediate direction of the user, it will be rejected by the App Store."Since there's no interaction on the user's part, this is unexpected behavior. We have not made any code changes around this feature.
4
0
3.5k
Sep ’19