Xamarin 到 MAUI 转换发布不适用于 iOs

问题描述 投票:0回答:1

我已将 Xamarin.Forms 中的一个应用程序转换为 Net MAUI(尝试了 dot net 7 和 8)

我的应用程序在 Android 和 iOs 的 Xamarin.Forms 中成功发布

但是在 Dot Net Maui 中我只能为 Android 进行编译

我已按照 Microsoft 网站上定义的确切步骤进行操作(https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-app-store?view=net-maui-8.0&tabs =vs),我可以在我的 iPhone 上以调试模式运行该应用程序

但是当涉及到发布时,它就会陷入困境

  --skip-unresolved true  --notrimwarn --custom-data "LinkerOptionsFile=obj/Release/net8.0-ios/ios-arm64/custom-linker- options.txt" --verbose -b --disable-opt unusedtypechecks --enable-opt sealer --enable-serialization-discovery

大约 10-15 分钟后出现以下错误

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1214,3): error : Messaging Exception: An error occurred while executing the operation and the connection could not be reestablished [B:\Projects\S ocialBean\SocialBean.App\SocialBean.App.csproj::TargetFramework=net8.0-ios] C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1214,3): error : ClientDis connectedException: The client build2787627876Donal has been disconnected while waiting a post response to topic xvs/bu ild/1.11.0.2/execute-task/SocialBean.App/2d13ffe002fAOTCompile [B:\Projects\SocialBean\SocialBean.App\SocialBean.App.cs proj::TargetFramework=net8.0-ios] C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1214,3): error :  [B:\Proj ects\SocialBean\SocialBean.App\SocialBean.App.csproj::TargetFramework=net8.0-ios]

我尝试过清理和构建。 我尝试过在VS2022中发布

我尝试通过cmd发布

dotnet publish -f net8.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey="iPhone Distribution: Peach Software Solutions (Pty) ltd. (3PWMH82R6R)" -p:CodesignProvision="SocialBean Deploy"

经过另一次测试,根据liqun Shen-Msft的评论,它以发布模式部署,或者至少接近以下错误

严重性代码描述项目文件行抑制状态 错误错误 MT1006:无法安装应用程序'/Users/donaldjansen/Library/Caches/Xamarin/mtbs/builds/SocialBean.App/2d13ffef70bd6915ab8d382b7897e1ec3ab815ae362adda36248c0d874bad713/bin/Release/net8.0-ios/ios-arm64/ SocialBean.App.app ' 在设备“Donald???s iPhone”上:AMDeviceSecureInstallApplicationBundle 返回:0xe8008015。 0

xamarin.forms maui
1个回答
0
投票

注意:这不是问题的解决方案,而是一种解决方法。

选择你的发行版配置文件,然后选择发布模式,CPU 必须在 iPhone 上,然后像调试时一样在你的 iPhone 上运行它。

当编译超时或取消操作时,您可以在Mac上转到您的存档,您将找到可以上传的ipa文件。

看起来一切都成功了,但它没有正确通知 VS 它成功了

© www.soinside.com 2019 - 2024. All rights reserved.