遵循指南后,Xamarin iOS应用被UIWebView拒绝 [英] Xamarin iOS app being rejected for UIWebView after following guide

查看:116
本文介绍了遵循指南后,Xamarin iOS应用被UIWebView拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个新应用正在尝试提交到应用商店(使用TestFlight进行预发布Beta测试),但是由于引用了UIWebView,因此收到了无效的二进制消息:

We have a new app we are trying to submit to the app store (using TestFlight for pre-release beta testing) but are getting an Invalid binary message due to the reference of UIWebView:

TMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.

我们在这里遵循了Xamarin提供的指南:

We've followed the guide provide by Xamarin here: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/webview?tabs=macos#uiwebview-deprecation-and-app-store-rejection-itms-90809

我们有:

  1. 将Xamarin表单升级到4.6或更高版本-4.6.0.706
  2. 确保Xamarin.iOS 13.10.0.17或更高版本-13.16.0.13
  3. 删除对UIWebView的引用(最初没有)
  4. 将确保的IOS构建设置为仅限Link Framework SDK"(已经)
  5. 添加了必需的mtouch参数:-optimize = experimental-xforms-product-type"
  6. 更新了所有构建配置(发行版/iphone,发行版/模拟器,调试/iphone,调试/模拟器)

我还删除了我的软件包,bin和对象文件夹,以确保获得完整版本,但在上载时继续得到此响应.

I've also deleted my packages, bin, and object folders to ensure I get a full build, yet continue to get this response when uploading.

我在MTOUCH中添加了警告标志,以查看它的使用位置,现在我确实看到了警告,因此它在某处.

I added the warning flag to my MTOUCH to see where it's used as well, and I do now see a warning, so it's there... somewhere.

已添加警告代码: --warn-on-type-ref=UIKit.UIWebView

构建警告:

我该如何找到哪个包正在使用UIWebView而不随意更新所有包,并希望能做到这一点(没有其他意外后果)?

How can I go about finding which package is utilizing UIWebView without haphazardly updating them all and hoping that does the trick (without other unintended consequences)?

编辑#2: 我按照以下建议操作了GREP搜索-这是我的结果

EDIT #2: I got GREP search working as recommended below - here are my results

grep -r 'UIWebView' .
Binary file ./.vs/NorthernLights/xs/sqlite3/storage.ide matches
./iOS/NorthernLights.iOS.csproj:    <MtouchExtraArgs>--optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView</MtouchExtraArgs>
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/HockeySDK.Xamarin.5.2.0/lib/Xamarin.iOS10/HockeySDK.iOSBindings.dll matches

在我看来像HockeyApp可能是我的罪魁祸首之一.我已经更新了程序包,但是我确实知道HockeyApp已迁移到AppCenter,因此也许不再维护此代码.另请参见参考SQLite,这是一组不破坏应用程序其他部分而无法更新的软件包.

Looks to me like HockeyApp may be one of my culprits. I've already updated the package, but I do know HockeyApp's been migrated to AppCenter, so perhaps this code is no longer maintained. Also see a reference SQLite, which is one set of packages I can't get updated without breaking other parts of my app.

编辑#3

我们已经删除了HockeyApp,但仍然有两个参考警告.我删除了SQLIte PCL并将其重新添加到最新版本,但仍然看到对storage.ide文件的引用,我认为只是一个我可以忽略的本地数据库文件.看起来只剩下Xamarin.Forms引用了,但是所有这些都应该通过我的mtouch参数来处理:

We've removed HockeyApp but still have the two reference warnings. I've removed SQLIte PCL and re-added it to the most recent version but still see the reference to the storage.ide file, which I think is just a local database file I can ignore. It looks like all that's left is Xamarin.Forms references, but all of this should be dealt with via my mtouch arguments:

<MtouchExtraArgs>--optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView</MtouchExtraArg

找不到我想要的东西...

Can't figure out what I'm missing...

推荐答案

好的,我想出了自己的实例.一旦我知道要寻找什么和要忽略什么,grep工具就很棒:

Alright, I figured my own instance out. The grep tool was great, once I knew what to look for and what to ignore:

  1. 删除所有bin/obj文件夹以减少混乱.
  2. 打开终端,导航到项目文件夹,然后运行grep -r UIWebView .
  3. 查看结果,并查找引用该结果的第三方NuGet程序包.

由于MTOUCH规则,我可以放心地忽略Xamarin.Forms引用,尽管我不知道SQLLite引用是什么,但这不是问题.就我而言,唯一重要的是HockeyApp,它是我们使用的崩溃日志记录工具,但已过时,已被Microsoft AppCenter取代.该代码似乎没有得到维护(不足为奇),并且其中仍然包含该引用.删除HockeyApp和相关代码后,我们就可以提交而不会发出问题/警告.

I could safely ignore the Xamarin.Forms references because of the MTOUCH rule, and while I don't know what the SQLLite reference is, it wasn't the problem. In my case, the only one that mattered was HockeyApp, which is a crash logging tool we used but has been deprecated and replaced by Microsoft AppCenter. The code appears to not be maintained (no surprise) and it still had that reference in it. Once we removed HockeyApp and related code, we were able to submit without issue / warnings.

顺便说一句...我的开发环境仍然在Xamarin.Forms中显示引用...您只需要知道,如果您对原始文章有适当的MTOUCH参数,就可以忽略它们.

On a side note... my dev environment still shows the references in Xamarin.Forms... you just have to be aware that you can ignore them if you have the proper MTOUCH arguments in place per the original article.

这是我的grep结果,唯一重要的是HockeyApp参考.

Here are my grep results, the only thing that mattered was the HockeyApp reference.

Binary file ./.vs/NorthernLights/xs/sqlite3/storage.ide matches
./iOS/NorthernLights.iOS.csproj:    <MtouchExtraArgs>--optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView</MtouchExtraArgs>
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/HockeySDK.Xamarin.5.2.0/lib/Xamarin.iOS10/HockeySDK.iOSBindings.dll matches```

这篇关于遵循指南后,Xamarin iOS应用被UIWebView拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆