Apple platform
iOS
Framework version
net10.0-*
Affected platform version
VS 2026 18,4.2, .NET10
Description
We have opened up a issue (#24767) for an included third party iOS library not able to run MAUI application.
Now we got a new build of that library containing also arm64 builds for Simulator, but we still not able to call the functions.
We have tried the workaround,
$(AppBundleExtraOptions) --dlsym=true
, but facing the same exception.
I have uploaded the project again with the updated library. I tried referencing the .a file directly and also with the xcframework static reference. It can build and run the app in both cases, but the exception occurs the same.
UltraLiteTest.zip
Analysis of Github Copilot Chat:
Perfect! Now I have the full picture. The issue is clear - the CFunctions class declares ULStaticInit() and ULStaticFini() with [DllImport("__Internal")], meaning these native functions should be found in the main executable. However, the exception indicates the native library isn't properly linked.
Analysis
What the value represents:
The exception value {"__Internal"} is a System.DllNotFoundException where:
• Message: "__Internal"
• Type: DllNotFoundException
The exception indicates that the .NET runtime cannot find the native library __Internal that contains the ULStaticInit() function.
Why you're getting this value:
In iOS, "__Internal" is a special DllImport library name that tells the runtime to look for native functions in the main application executable itself, rather than an external library. The DllNotFoundException occurs because:
The native UltraLite library functions (ULStaticInit(), ULStaticFini()) are not properly linked/embedded into your iOS application bundle
The native .a static library or framework containing these functions hasn't been added to your iOS project's native references
The P/Invoke marshaling cannot find these symbols at runtime
To fix this, you need to:
• Add the UltraLite native static library (.a file) or framework to your iOS project's Native References
• Ensure the library is configured to link with your app during the build process
• Verify the native library contains the symbols ULStaticInit() and ULStaticFini() using nm tool
• Check your MauiiOSUltraLiteBindingApp.csproj for proper entries with correct linking flags
Many thanks in advance!.
Steps to Reproduce
I have attached a repro project for verifying.
Did you find any workaround?
No.
Build logs
No response
Apple platform
iOS
Framework version
net10.0-*
Affected platform version
VS 2026 18,4.2, .NET10
Description
We have opened up a issue (#24767) for an included third party iOS library not able to run MAUI application.
Now we got a new build of that library containing also arm64 builds for Simulator, but we still not able to call the functions.
We have tried the workaround,
$(AppBundleExtraOptions) --dlsym=true, but facing the same exception.
I have uploaded the project again with the updated library. I tried referencing the .a file directly and also with the xcframework static reference. It can build and run the app in both cases, but the exception occurs the same.
UltraLiteTest.zip
Analysis of Github Copilot Chat:
Perfect! Now I have the full picture. The issue is clear - the CFunctions class declares ULStaticInit() and ULStaticFini() with [DllImport("__Internal")], meaning these native functions should be found in the main executable. However, the exception indicates the native library isn't properly linked.
Analysis
What the value represents:
The exception value {"__Internal"} is a System.DllNotFoundException where:
• Message: "__Internal"
• Type: DllNotFoundException
The exception indicates that the .NET runtime cannot find the native library __Internal that contains the ULStaticInit() function.
Why you're getting this value:
In iOS, "__Internal" is a special DllImport library name that tells the runtime to look for native functions in the main application executable itself, rather than an external library. The DllNotFoundException occurs because:
The native UltraLite library functions (ULStaticInit(), ULStaticFini()) are not properly linked/embedded into your iOS application bundle
The native .a static library or framework containing these functions hasn't been added to your iOS project's native references
The P/Invoke marshaling cannot find these symbols at runtime
To fix this, you need to:
• Add the UltraLite native static library (.a file) or framework to your iOS project's Native References
• Ensure the library is configured to link with your app during the build process
• Verify the native library contains the symbols ULStaticInit() and ULStaticFini() using nm tool
• Check your MauiiOSUltraLiteBindingApp.csproj for proper entries with correct linking flags
Many thanks in advance!.
Steps to Reproduce
I have attached a repro project for verifying.
Did you find any workaround?
No.
Build logs
No response