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:
#21223.
Store the non-file inputs to the trimmer and native linker in cache files, and if
these inputs change, then rerun the trimmer and native linker. This is implemented
by computing a hash of all these inputs (properties), store the hash to a file, and
overwrite the file if the hash changes. Then in a subsequent target, we force the
trimmer or native linekr to run if the file with the hash value changed.
This is a similar implementation of how the csc task (C# compiler) creates a hash
of the compiler input in order to know when to re-execute the C# compiler.
Also fix a bug in the Codesign task, where the task would always resign an app bundle
if it contained something inside that needed to be signed separately (it wouldn't
consider that the contained something could already be signed).
Fixes#21223.
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: