n.t
n.t

Reputation: 103

Interoperability of Xamarin.iOS and Swift

For an existing App written in C# using Xamarin.iOS is there a way that Swift can take over and use the existing App as a library?

The App uses different frameworks like Vici CoolStorage, Google Maps, SQL Cipher and they are all included in the C# Solution, so I think that it will be very important that they stay in the C# Solution, but are accessible from the Swift part.

I ask this because Swift looks very good to me (I always liked scala) and it seems to me that Xcode has improved itself a lot, so I would like to try to get closer to the iOS, but I do not wish to lose the complete effort that was done for the App (months of development).

Upvotes: 4

Views: 3407

Answers (1)

miguel.de.icaza
miguel.de.icaza

Reputation: 32694

This is not currently possible.

What you could do is keep the main code in C#, and call into Swift from your C# code. You would have to do this by creating a Swift library and surfacing the result to Objective-C, and then provide a binding to the Objective-C code so that you can call it all from C#.

A simpler option is to try F# directly with your project, which is a complete functional language with pretty much all of the features of Swift and a few more.

Upvotes: 6

Related Questions