binding swift libraries giving error " module 'RealmSwift' not found"

sheetal naik 1 Reputation point
2020-11-23T14:21:00.26+00:00

Hi All,

I am trying bind the native sdk framework to xamarin app. sdk is in swift language. i am following the link https://learn.microsoft.com/en-us/xamarin/ios/platform/binding-swift/walkthrough for same.

When i run the below code in terminal:
output % sharpie bind --sdk=iphoneos14.2 --output="XamarinApiDef" --namespace="SomeNativeSDK.iOS" --scope="SomeNativeSDK.framework/Headers/" "SomeNativeSDK.framework/Headers/SomeNativeSDK-Swift.h"

I get this error:

module 'RealmSwift' not found
@import RealmSwift;
~^~~~

Binding...
[write] ApiDefinitions.cs

Binding Analysis:
Automated binding is complete, but there are a few APIs which have been
flagged with [Verify] attributes. While the entire binding should be
audited for best API design practices, look more closely at APIs with the
following Verify attribute hints:

MethodToProperty (20 instances):
An Objective-C method was bound as a C# property due to convention such
as taking no parameters and returning a value (non-void return). Often
methods like these should be bound as properties to surface a nicer API,
but sometimes false-positives can occur and the binding should
actually be a method.

Once you have verified a Verify attribute, you should remove it from the
binding source code. The presence of Verify attributes intentionally
cause build failures.

For more information about the Verify attribute hints above, consult the
Objective Sharpie documentation by running 'sharpie docs' or visiting the
following URL:

http://xmn.io/sharpie-docs
1 error generated.
Error while processing /Users/xxx/Downloads/output/SomeNativeSDK.framework/Headers/SomeNativeSDK-Swift.h.

Could anyone please help me with the installation of RealmSwift into my mac? I am new to native iOS development and searching online about this issue was of no help.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,287 questions
{count} votes