Comments (3)
The problem is that your binding project says these two fields exist in the library:
[Static]
partial interface Constants
{
// extern double TURecipientBarVersionNumber;
[Field("TURecipientBarVersionNumber", "__Internal")]
double TURecipientBarVersionNumber { get; }
// extern const unsigned char [] TURecipientBarVersionString;
[Field("TURecipientBarVersionString", "__Internal")]
NSString TURecipientBarVersionString { get; }
}
but they don't:
$ nm RecipientBarBinding/Lib/libServiceRecipientBar.a | grep TURecipientBarVersionNumber
[no output]
$ nm RecipientBarBinding/Lib/libServiceRecipientBar.a | grep TURecipientBarVersionString
[no output]
it looks like they're in the framework though:
$ nm RecipientBarBinding/Lib/TURecipientBar.framework/TURecipientBar | grep TURecipientBarVersionString
0000000000010190 S _TURecipientBarVersionString
$ nm RecipientBarBinding/Lib/TURecipientBar.framework/TURecipientBar | grep TURecipientBarVersionNumber
00000000000101c8 S _TURecipientBarVersionNumber
So maybe try adding the framework instead of the static library to the binding project?
Also note that we recommend using an .xcframework instead of either a framework or a static library, because an .xcframework can contain native bits for all architectures (neither a framework nor a static library can contain arm64 bits for both the simulator and device, while an xcframework can).
from xamarin-macios.
Thanks for the reply @rolfbjarne But the same library works for net7.0
from xamarin-macios.
I see, this is the consequence of a bug fix we did in .NET 8.
In .NET 7 the library compiles, but the properties in question (Constants.TURecipientBarVersionNumber
and Constants.TURecipientBarVersionString
) do not. If you try to call them, you'll get 0
or null
back. This is because the native properties have been linked away by the native linker.
The fix we did was to ask the native linker to keep the native property for any such managed binding - with the downside that if the native property doesn't actually exist, you'll now get a build error.
The fix is to make sure the native library has everything you're binding in your binding project (in your case you could do that by removing the bindings for these properties).
from xamarin-macios.
Related Issues (20)
- GCVirtualControllerConfiguration missing iOS 17 hidden attribute HOT 1
- TextBox still has the focus when we put another app on foreground HOT 3
- Test1 HOT 1
- test HOT 1
- Issue binding iOS native library HOT 5
- Xamarin iOS Build Errors After Updating Mac to Sonoma and Xcode to 15.3 HOT 5
- Enabling the interpreter for macOS fails to build
- [macOS] Exception in NSControl.Activated event handler doesn't crash the app HOT 2
- Error publishing Net MAUI App VS Windows paired with Mac HOT 11
- UISegmentedControl.SetTitleTextAttributes throws System.ObjectDisposedException HOT 1
- App crash at startup after migrating from .Net7 to .Net8 and from VS For Mac to VS Code HOT 3
- SMTP Client fail on send mail with TSL 1.3
- MacCat Incremental builds show warning requiring "Open Anyway" button to be clicked HOT 3
- Question: Is it possible to attach NSWindow to OC NSWindow pointer? HOT 2
- Stream from GetStreamAsync stops writing to buffer after short period of time HOT 5
- Can’t launch the application from TestFlight after updates HOT 9
- Unexpected error (MT0000) in release mode xamarin forms in platform macos HOT 3
- ObjCRuntime.Runtime.IsNativeAOT allocates a lot of objects HOT 3
- Xamarin.Forms iOS Release Mode Crash after iOS 17 update HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamarin-macios.