gpt4 book ai didi

ios - 将 Xamarin iOS 提交到 Apple AppStoreConnect TestFlight 后获取 'ITMS-90338: Non-public API usage' 和 'ITMS-90809: Deprecated API Usage'

转载 作者:行者123 更新时间:2023-12-03 05:29:57 37 4
gpt4 key购买 nike

将 Xamarin.Forms iOS 应用提交到 Apple 的 TestFlight 后,我​​们收到以下消息。

消息:

Dear Developer,

We identified one or more issues with a recent delivery for your app,"[bundle name]" [bundle version] ([bundle version]). Please correct the followingissues, then upload again.

ITMS-90338: Non-public API usage - The app references non-publicselectors in [project name]:applicationWillTerminate, fontWeight,newSocketQueueForConnectionFromAddress:onSocket:,setOrientation:animated:, socket:didConnectToHost:port:,socket:didReadPartialDataOfLength:tag:,socket:didReceiveTrust:completionHandler:,socket:didWritePartialDataOfLength:tag:,socket:shouldTimeoutReadWithTag:elapsed:bytesDone:,socket:shouldTimeoutWriteWithTag:elapsed:bytesDone:,socketDidCloseReadStream:, socketDidSecure:, terminateWithSuccess. Ifmethod names in your source code match the private Apple APIs listedabove, altering your method names will help prevent this app frombeing flagged in future submissions. In addition, note that one ormore of the above APIs may be located in a static library that wasincluded with your app. If so, they must be removed. For furtherinformation, visit the Technical Support Information athttp://developer.apple.com/support/technical/

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are nolonger accepted. Instead, use WKWebView for improved security andreliability. Learn more(https://developer.apple.com/documentation/uikit/uiwebview).

Best regards,

The App Store Team

我已经查看了消息并进行了多次尝试,但没有成功。如果有人可以帮助 Apple 接受我们提交的内容,我将不胜感激。

让我分享更多细节

环境:

这是一个 Xamarin.Forms 应用程序,我们使用 Azure DevOps 的构建管道(特别是 Xamarin.iOS task 版本 2.*)构建并使用 Azure DevOps 的发布管道进行发布。我们将其发布到 Microsoft AppCenter,然后从那里下载 *.ipa。我们使用 Transporter 将其提交给 Apple 的 AppStoreConnect TestFlight Mac 上的应用程序来自 Apple 的 AppStore。

XCode version used: 12.2
.Net Core SDK version used: 3.1.x
Mono Version used: 6.12.0
Xamarin iOS SDK version used: 14.6.0.15
NuGet tool version used: 5.8.0

已安装的 NuGet 包/第 3 方库:

<PackageReference Include="Abp">
<Version>5.14.0</Version>
</PackageReference>
<PackageReference Include="Abp.AutoMapper">
<Version>5.14.0</Version>
</PackageReference>
<PackageReference Include="Abp.Web.Common">
<Version>5.14.0</Version>
</PackageReference>
<PackageReference Include="Acr.Support">
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="Acr.UserDialogs">
<Version>7.1.0.475</Version>
</PackageReference>
<PackageReference Include="Castle.Core">
<Version>4.4.1</Version>
</PackageReference>
<PackageReference Include="Castle.LoggingFacility">
<Version>5.1.1</Version>
</PackageReference>
<PackageReference Include="Castle.Windsor">
<Version>5.1.1</Version>
</PackageReference>
<PackageReference Include="Flurl">
<Version>2.8.2</Version>
</PackageReference>
<PackageReference Include="Flurl.Http">
<Version>2.4.2</Version>
</PackageReference>
<PackageReference Include="JetBrains.Annotations">
<Version>2020.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Analytics">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Crashes">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CSharp">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Win32.Primitives">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="NETStandard.Library">
<Version>2.0.3</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="NUglify">
<Version>1.13.2</Version>
</PackageReference>
<PackageReference Include="Plugin.Permissions">
<Version>6.0.1</Version>
</PackageReference>
<PackageReference Include="Refractored.MvvmHelpers">
<Version>1.6.2</Version>
</PackageReference>
<PackageReference Include="Rg.Plugins.Popup">
<Version>2.0.0.10</Version>
</PackageReference>
<PackageReference Include="Splat">
<Version>10.0.1</Version>
</PackageReference>
<PackageReference Include="System.AppContext">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Collections">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Collections.Concurrent">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Collections.Specialized">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.ComponentModel">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.ComponentModel.Annotations">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.ComponentModel.TypeConverter">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Configuration.ConfigurationManager">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Console">
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Data.Common">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Diagnostics.Debug">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Diagnostics.Tools">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Diagnostics.TraceSource">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Diagnostics.Tracing">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Dynamic.Runtime">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Globalization">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Globalization.Calendars">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.IO">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.IO.Compression">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.IO.Compression.ZipFile">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.IO.FileSystem">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.IO.FileSystem.Primitives">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Linq">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Linq.Expressions">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Linq.Queryable">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Memory">
<Version>4.5.3</Version>
</PackageReference>
<PackageReference Include="System.Net.Http">
<Version>4.3.4</Version>
</PackageReference>
<PackageReference Include="System.Net.Primitives">
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Net.Sockets">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.ObjectModel">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Emit">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Emit.ILGeneration">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Emit.Lightweight">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Extensions">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Primitives">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.TypeExtensions">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Resources.ResourceManager">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime">
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Extensions">
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Handles">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.InteropServices">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Loader">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Numerics">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Serialization.Formatters">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Serialization.Primitives">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Security.AccessControl">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Security.Claims">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.Algorithms">
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.Encoding">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.Primitives">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.X509Certificates">
<Version>4.3.2</Version>
</PackageReference>
<PackageReference Include="System.Security.Permissions">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Security.Principal.Windows">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encoding">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encoding.CodePages">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encoding.Extensions">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encodings.Web">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Json">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Text.RegularExpressions">
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Threading">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Threading.Tasks">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Threading.Thread">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Threading.Timer">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.5.0</Version>
</PackageReference>
<PackageReference Include="System.Xml.ReaderWriter">
<Version>4.3.1</Version>
</PackageReference>
<PackageReference Include="System.Xml.XDocument">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Xml.XmlDocument">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Xml.XmlSerializer">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Xml.XPath.XmlDocument">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="TimeZoneConverter">
<Version>3.3.0</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Connectivity">
<Version>3.2.0</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Geolocator">
<Version>4.5.0.6</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Iconize.FontAwesome">
<Version>3.5.0.123</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Iconize.Material">
<Version>3.5.0.123</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Media">
<Version>5.0.1</Version>
</PackageReference>
<PackageReference Include="Xam.Plugins.Forms.ImageCircle">
<Version>3.0.0.5</Version>
</PackageReference>
<PackageReference Include="Xam.Plugins.ImageCropper">
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="Xam.Plugins.Settings">
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Azure.NotificationHubs.iOS">
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Build.Download">
<Version>0.10.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.FFImageLoading">
<Version>2.4.11.982</Version>
</PackageReference>
<PackageReference Include="Xamarin.FFImageLoading.Forms">
<Version>2.4.11.982</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>5.0.0.1931</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.Maps">
<Version>5.0.0.1931</Version>
</PackageReference>
<PackageReference Include="Xamarin.Google.iOS.Maps">
<Version>3.9.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.TestCloud.Agent">
<Version>0.22.1</Version>
</PackageReference>
<PackageReference Include="XamarinFastEntry.Behaviors">
<Version>1.1.1</Version>
</PackageReference>

显然,该应用程序正在使用 Xamarin.Forms 5,其中对 UIWebView has been removed 的引用.

在我们的项目中,我们仅在一个页面中使用 Web View ,即使 Xamarin 的默认渲染器已更改为 WkWebView,我们还是为其创建了一个自定义渲染器以使用 WkWebView 以防万一(当然我们确保使用新控件)。

跨平台控制:

public class CustomWebView : Xamarin.Forms.WebView
{
}

iOS 特定渲染器:

[assembly: Xamarin.Forms.ExportRenderer(typeof(Our.CrossPlatform.Project.CustomWebView), typeof(Our.Project.Renderer.CustomWebViewRenderer))]

namespace Our.Project.Renderer
{
public class CustomWebViewRenderer : Xamarin.Forms.Platform.iOS.WkWebViewRenderer
{
}
}

Azure 构建管道上使用的构建代理:macos-10.15 (代理的完整规范可以在 link 上找到)。

我们尝试过的:

关于第一条消息(ITMS-90338:非公共(public) API 使用),在处理 Stackoverflow 和 Xamarin 论坛上的大量帖子后,我们发现人们建议我们应该将链接行为设置为仅链接 SDK (我们已经对每个构建配置执行了此操作),但是为了确定起见,我们决定告诉 MSBuild 和 MTouch 以确保这是所使用的链接行为。

我们开始将 /p:MtouchLink="SdkOnly" 发送到 MSBuild the pipeline task的论证部分;我们向 MTouch 发送了 /p:MtouchExtraArgs="--linksdkonly"

这些都不起作用,所以我们开始研究已安装的软件包,并尝试卸载尽可能多的软件包,但仍然不起作用。

关于后一条消息(ITMS-90809:已弃用的 API 用法),我们知道 as of Xamarin Forms 4.5, a new flag was introduced确保 UIWebView 未被引用。此外,我们知道截至Xamarin.iOS 13.16 ,出于相关目的引入了更多标志:warn-on-type-ref=UIKit.UIWebView,用于在构建日志中警告我们是否有任何对 UIWebView 的引用,和 optimize=force-rejected-types-removal 强制删除所有对被拒绝类型(包括 UIWebView)的引用(如果发现)。

因此,这就是我们最终在 MTouch 参数中使用的内容: /p:MtouchExtraArgs="--warn-on-type-ref=UIKit.UIWebView --optimize=experimental-xforms-product-type -- optimize=force-rejected-types-removal --linksdkonly",但这不起作用,我们甚至没有收到构建日志中任何 UIWebView 引用的警告。

具有讽刺意味的是,相同的配置确实适用于我们提交的早期应用程序(使用早期的 Xamarin.Forms 版本),并且警告标志确实向我们显示了一条警告,表明在链接后不再存在的链接。

如果有人告诉我们如何解决这个问题或者在哪里查找这个问题,甚至我们应该在哪里开票,我们将不胜感激。

最佳答案

Apple 拒绝此提交的版本有两个原因。

ITMS-90338: Non-public API usage - The app references non-public selectors in [project name]: applicationWillTerminate, fontWeight, newSocketQueueForConnectionFromAddress:onSocket:, setOrientation:animated:, socket:didConnectToHost:port:, socket:didReadPartialDataOfLength:tag:, socket:didReceiveTrust:completionHandler:, socket:didWritePartialDataOfLength:tag:, socket:shouldTimeoutReadWithTag:elapsed:bytesDone:, socket:shouldTimeoutWriteWithTag:elapsed:bytesDone:, socketDidCloseReadStream:, socketDidSecure:, terminateWithSuccess.

这意味着你需要用其他名称修改方法列表名称,因为这些名称会与Apple系统的私有(private)方法名称冲突。您需要找到它们并将其替换为其他名称。

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

从 2020 年 4 月开始,Apple will reject apps仍然使用已弃用的 UIWebView API。虽然 Xamarin.Forms 已切换为默认的 WKWebView,但 Xamarin.Forms 二进制文件中仍然引用了旧版 SDK。当前的 iOS 链接器行为不会消除此问题,因此,当您提交到 App Store 时,已弃用的 UIWebView API 仍会显示为从您的应用中引用。

链接器的预览版本可以解决此问题。要启用预览,您需要向链接器提供附加参数 --optimize=experimental-xforms-product-type

详细步骤可以引用UIWebView Deprecation and Xamarin.Forms .

关于ios - 将 Xamarin iOS 提交到 Apple AppStoreConnect TestFlight 后获取 'ITMS-90338: Non-public API usage' 和 'ITMS-90809: Deprecated API Usage',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66119480/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com