You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a NuGet package that includes XCFrameworks and observed a NullReferenceException when I first tried to integrate it into an app. I identified the issue as the frameworks not being linked in the native binary (i.e., they don't appear when calling otool -L AppName.app/AppName). Cleaning and rebuilding fixes the issue, but it's a kind of change I'd expect to be automatically picked up.
Steps to Reproduce
mkdir MyApp
cd MyApp
dotnet new maui
dotnet build -p:TargetFramework=net8.0-ios
otool -L ./bin/Debug/net8.0-ios/iossimulator-arm64/MyApp.app/MyApp | grep rpath
# ✅ zero lines, as expected
dotnet add MyApp.csproj package HeapInc.Maui
dotnet build -p:TargetFramework=net8.0-ios
otool -L ./bin/Debug/net8.0-ios/iossimulator-arm64/MyApp.app/MyApp | grep rpath
# ❌ zero lines, unexpected
dotnet clean
dotnet build -p:TargetFramework=net8.0-ios
otool -L ./bin/Debug/net8.0-ios/iossimulator-arm64/MyApp.app/MyApp | grep rpath
# @rpath/HeapSwiftCore-Dynamic.framework/HeapSwiftCore-Dynamic (compatibility version 0.0.0, current version 0.0.0)# @rpath/HeapSwiftCoreInterfaces.framework/HeapSwiftCoreInterfaces (compatibility version 1.0.0, current version 1.0.0)# ✅ Frameworks from HeapInc.Maui
dotnet remove MyApp.csproj package HeapInc.Maui
dotnet build -p:TargetFramework=net8.0-ios
otool -L ./bin/Debug/net8.0-ios/iossimulator-arm64/MyApp.app/MyApp | grep rpath
# @rpath/HeapSwiftCore-Dynamic.framework/HeapSwiftCore-Dynamic (compatibility version 0.0.0, current version 0.0.0)# @rpath/HeapSwiftCoreInterfaces.framework/HeapSwiftCoreInterfaces (compatibility version 1.0.0, current version 1.0.0)# ❌ Frameworks should have been removed
dotnet clean
dotnet build -p:TargetFramework=net8.0-ios
otool -L ./bin/Debug/net8.0-ios/iossimulator-arm64/MyApp.app/MyApp | grep rpath
# ✅ zero lines, as expected
Did you find any workaround?
Running dotnet clean after dotnet add and dotnet remove.
Relevant logs
No response
The text was updated successfully, but these errors were encountered:
Apple platform
iOS
Framework version
net8.0-*
Affected platform version
.Net 8.0.401, Maui 8.0.82/8.0.100
Description
I have a NuGet package that includes XCFrameworks and observed a
NullReferenceException
when I first tried to integrate it into an app. I identified the issue as the frameworks not being linked in the native binary (i.e., they don't appear when callingotool -L AppName.app/AppName
). Cleaning and rebuilding fixes the issue, but it's a kind of change I'd expect to be automatically picked up.Steps to Reproduce
Did you find any workaround?
Running
dotnet clean
afterdotnet add
anddotnet remove
.Relevant logs
No response
The text was updated successfully, but these errors were encountered: