如何在我的应用程序中搜索已弃用的UIWebView?

When uploading my iOS app I get an error that it implements UIWebView which is now deprecated. I'd gladly remove it, except it doesn't exist in my app.

这是我尝试过的:

  1. Turning linking off to see if it's in one of the assemblies. I still get the error when uploading, so that's not it. not. (And I'm using the latest Xamarin.Forms package which is supposed to be OK anyway).
  2. Searching for UIWebView in the files. It's nowhere.
  3. And last but not least, UIWebView is in the UIKit framework (see link). So I searched for every occurrence of UIKit in the solution. It appears twice in using statements, once in Application's Main as in every new Xamarin.iOS project, for UIApplication.Main(args, null, "AppDelegate");, and once in ButtonRenderer, used only once for UILineBreakMode.WordWrap.

So it seems like my app does not use UIWebView in any way. But according to Apple it does.

在哪如何继续搜索?

评论
  • 深海里的鱼
    深海里的鱼 回复

    您的某些框架可能引用了UIWebView。您可以在* .app目录中使用该bash脚本进行检查:

    for framework in Frameworks/*.framework; do
      fname=$(basename $framework .framework)
      echo $fname
      nm $framework/$fname | grep UIWebView
    done
    

    然后,您需要更新该依赖性。 如果在项目中使用静态库,则还需要使用该脚本:

    grep -r UIWebView .
    

    因为静态库将不在Framework文件夹内。