我们一直在开发一个应用程序,我使用的是最新的VS与. NET 7和最新的Xcode(14.1)的应用程序只能与ios 16或更高,但不与旧版本,如14.2或15.5。
我将Xcode降级到13.4.1,将VS降级到17.3(我在问题末尾添加了版本细节)
但我仍然使用Microsoft.ios16.1.229,我知道它是一个工作负载,但我不能降级它。我现在也使用.NET6.0
不幸的是,我甚至不能编译项目。我得到以下警告和错误。
/.../Platforms/iOS/Helpers/AppleDevicePermissions.cs(102,18): warning CA1416: This call site is
reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later.
'UIUserNotificationSettings.Types.get' is unsupported on: 'ios' 10.0 and
later, 'maccatalyst' 10.0 and later.
/...../Platforms/iOS/Helpers/AppleDevicePermissions.cs(102,18): warning CA1416: This call site is
reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later
'UIApplication.CurrentUserNotificationSettings.get' is unsupported on: 'ios' 10.0 and later,'maccatalyst'
10.0 and later. [/..../MyApp.csproj]
ILLINK : warning MT0079: The recommended Xcode version for Microsoft.iOS 16.1.229 is Xcode 14.1 or later.
The current Xcode version (found in /Applications/Xcode.app/Contents/Developer) is 13.4.1.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.1.229/targets/Xamarin.Shared.Sdk.targets(1007,3):
error : Failed to AOT compile Microsoft.Maui.dll, the AOT compiler exited with code 1 [/../MyApp.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.1.229/targets/Xamarin.Shared.Sdk.targets(1007,3):
error : Failed to AOT compile Microsoft.Maui.Controls.dll, the AOT compiler exited with code 1
[/....../MyApp.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.1.229/targets/Xamarin.Shared.Sdk.targets(1007,3):
error : Failed to AOT compile CommunityToolkit.Maui.Core.dll, the AOT compiler exited with code 1
[/...../MyApp.csproj]
Visual Studio Professional 2022 for Mac
Version 17.3 (build 2102)
Installation UUID: 29d662e6-697b-4c96-a0cc-d9c2773c0a95
Runtime
.NET 6.0.5 (64-bit)
Architecture: X64
Roslyn (Language Service)
4.3.0-3.22312.2+52adfb8b2dc71ed4278debcf13960f2116868608
NuGet
Version: 6.2.1.2
.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/6.0.400/Sdks
SDK Versions:
6.0.400
3.1.422
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks
.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
6.0.8
3.1.28
Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Xamarin.Android
Version: 13.0.0.0 (Visual Studio Professional)
Commit: xamarin-android/d17-3/030cd63
Android SDK: /Users/user/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
12.0 (API level 31)
11.0 (API level 30)
13.0 (API level 33)
SDK Command-line Tools Version: 7.0
SDK Platform Tools Version: 33.0.2
SDK Build Tools Version: 33.0.0
Build Information:
Mono: dffa5ab
Java.Interop: xamarin/java.interop/d17-3@7716ae53
SQLite: xamarin/sqlite/3.38.5@df4deab
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@14076a6
Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Android SDK Manager
Version: 17.3.0.23
Hash: 965bf40
Branch: remotes/origin/d17-3
Build date: 2022-08-03 21:18:42 UTC
Android Device Manager
Version: 0.0.0.1169
Hash: fafb1d5
Branch: fafb1d5
Build date: 2022-08-03 21:18:42 UTC
Apple Developer Tools
Xcode 13.4.1 (20504)
Build 13F100
Xamarin.Mac
Version: 8.12.0.2 (Visual Studio Professional)
Hash: 87f98a75e
Branch: d17-3
Build date: 2022-07-25 20:18:54-0400
Xamarin.iOS
Version: 15.12.0.2 (Visual Studio Professional)
Hash: 87f98a75e
Branch: d17-3
Build date: 2022-07-25 20:18:55-0400
Xamarin Designer
Version: 17.3.0.208
Hash: 0de472ea0
Branch: remotes/origin/d17-3
Build date: 2022-08-03 21:18:36 UTC
Build Information
Release ID: 1703002102
Git revision: 7a27f71b7aeb9b846940c9f8994c9ef7a694f0c2
Build date: 2022-08-03 21:16:13+00
Build branch: release-17.3
Build lane: release-17.3
Operating System
Mac OS X 12.6.0
Darwin 21.6.0 Darwin Kernel Version 21.6.0
Mon Aug 22 20:17:10 PDT 2022
root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64
- 更新:**我将VS和Xcode更新为最新版本,但出现此错误
/... ../我的应用程序/平台/iOS/信息列表:错误:信息列表中的最小OSVersion值(11)与支持的操作系统平台版本值不匹配(16.1)在项目文件中(如果在项目文件中没有SupportedOSPatformVersion值,则假定默认值)。或者改变Info.plist中的值以匹配SupportedOSPatformVersion值,或者删除Info.plist中的值(如果SupportedOSPplatformVersion值不存在,则将其添加到项目文件中)。
这是在thinginfo.plist中的相关设置
1条答案
按热度按时间am46iovg1#
问题解决了。感谢@ hidoaiderh和他的想法。我降级了所有的版本,但问题不在于版本。
因为他分享了一个链接https://learn.microsoft.com/en-us/dotnet/maui/supported-platforms?view=net-maui-7.0
maui支持ios 11和更高版本
所以我把我的VS和Xcode更新到了最新版本。
然后我创建了一个全新的maui应用程序,打开它的csproj文件,并将其与我的进行比较,删除了csproj文件中不必要的标签,然后我可以编译该项目并将其部署到旧的iPhone上。