iosswiftwebviewvisionkit

Request to remove background on an unsupported device. Error Domain=com.apple.VisionKit.RemoveBackground Code=-8 "(null)"


I was trying to create an app by wrapping a web app as webView for iOS and after running that app, when I am in the app testing it after a while getting this error. Also, I am getting this error as well as a white screen when trying to access a mui dropdown menu :

2023-07-18 11:54:15.672093+0530 Demo[9326:166450] Simulator user has requested new graphics quality: 100
2023-07-18 11:55:15.582790+0530 Demo[9326:166450] [com.apple.VisionKit.processing] Analysis not completed because device does not support Image Analysis. This will only be logged once.
2023-07-18 11:55:15.814158+0530 Demo[9326:166450] [com.apple.VisionKit.RemoveBackground] Request to remove background on an unsupported device. Error Domain=com.apple.VisionKit.RemoveBackground Code=-8 "(null)"
2023-07-18 11:55:15.815166+0530 Demo[9326:166450] [UILog] Called -[UIContextMenuInteraction updateVisibleMenuWithBlock:] while no context menu is visible. This won't do anything.

Did the same thing for Android and it was working fine there. I thought it would be the same case for iOS app as well but no... I stumbled into this error frankly I am very new to this Xcode and Swift and have not idea what to do or how to get this solved.


Solution

  • I am using Cordova iOS as a part of wraping web view app into ios app. I was also facing this issue.

    I fixed it by add following line in config.xml file in root directory of my cordova project:

    <preference name="WKWebViewOnly" value="true" />