Supporting older iOS Version in MAUI
We have been developing an application and I was using the latest VS with .NET 7 and the latest Xcode (14.1)
but unfortunately when I do a release it was working only with 16 or higher as my colleagues told, but some people have old iphone and their system like 14.2, 15.5 etc.
I downgraded Xcode to 13.4.1 and I installed VS 2022 17.3 (macOS) I added details low below.
but unfortunately I see the Microsoft.iOS version is 16.1.229 and I cannot downgrade it (I read that it is regarding workload but don't know how to do that).
Now I downgraded also framework to .NET Core 6.0
The question is that, how can I make a release for older ios versions like 14.2, 15.5
For now I cannot even compile the app.
I get some warnings and errors as shown below.
/.../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. [/Users/user/Desktop/Projects/XXXApp/XXXApp/MyProj.csproj]
/.../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. [/Users/user/Desktop/Projects/XXXApp/XXXApp/MyProj.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. [/.../MyProj.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.dll, the AOT compiler exited with code 1 [//.../MyProj.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 [//...MyProj.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 [//.../MyProj.csproj]
Almost 1 week I am trying to make it work but I could not solve the problem .I would appreciate, if you could help me to solve this problem.
I know that the problem is about versioning but I don't know which is compatible with which one and how to downgrade.
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