ReactiveUI: [BUG] AOT compile fails for iOS MAUI
Describe the bug
I’m unable to build an AOT release build for iOS MAUI with ReactiveUI v17.1.17. Building with verbose gives me this
Failed to load method 0x6000472 from '[...]/obj/iPhone/Release/net6.0-ios/ios-arm64/linked/ReactiveUI.dll' due to Could not resolve signature of method ReactiveUI.ReactiveCollectionViewSource`1[TSource]:NumberOfSections.
Mono Ahead of Time compiler - compiling assembly [...]/obj/iPhone/Release/net6.0-ios/ios-arm64/linked/ReactiveUI.dll
Run with MONO_LOG_LEVEL=debug for more information.
AOTID 765DC80D-F50C-E335-7D3F-74B08B59D889
AOT of image [...]/obj/iPhone/Release/net6.0-ios/ios-arm64/linked/ReactiveUI.dll failed.
Could not load signature of ReactiveUI.ReactiveCollectionViewSource`1[TSource]:NumberOfSections due to: Could not resolve type with token 010000b4 from typeref (expected class 'System.nint' in assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065') assembly:Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065 type:System.nint member:(null)
Steps To Reproduce
Not sure on a repro just yet, but it fails for me when doing the following build:
dotnet build MyApp -t:Build -c:Release -f:net6.0-ios -p:Platform=iPhone -p:RuntimeIdentifier=ios-arm64 \
-p:BuildIpa=True -p:OutputPath='bin/Simulator/' -p:TreatWarningsAsErrors=True
Expected behaviour
AOT compile works
Environment
- OS: macOS
- Version 12.2
- Device: intel-chip macbook pro
- ReactiveUI Version: 17.7.17
Additional context
dotnet version: 6.0.200 (installed via daily https://aka.ms/dotnet/6.0.2xx/daily/dotnet-sdk-osx-x64.pkg)
xcode version: 13.2.1
MAUI version: preview 12
I installed the MAUI workload like this
sudo dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/preview.12.json \
--source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 27 (6 by maintainers)
@glennawatson brief update here: initial testing of the latest (v18.0.7) with Maui RC1 looks to fix the issues. I haven’t fully tested but I’m optimistic.
P13 for .NET MAUI landed today
It might be worth getting latest RxUI bits compiled against that and then install P13 .NET MAUI
And see if life improves?