Xamarin.ios integration with native ios sdk

Luis Bernardo 0 Reputation points
2024-04-09T13:45:47.11+00:00

Is it possible to integrate a native ios sdk (xcframework - swift) with xamarin.ios ?

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

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,531 Reputation points
    2024-04-09T15:27:02.6966667+00:00

    The library needs to support objective-c. Then you create a binding project. See thread

    https://github.com/xamarin/xamarin-macios/issues/17527

    currently c# can only call objective-c entry points. to call swift, the swift code needs to support an objective-c interface or an objective-c wrapper needs to be created
    https://developer.apple.com/documentation/swift/importing-swift-into-objective-c

    once you have the objective-c entry point, you then create a C# wrapper for the entry point. you may also be interested in binding tools for swift:

    https://github.com/xamarin/binding-tools-for-swift

    0 comments No comments