4

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).

n.t
  • 103
  • 2
  • 10

1 Answers1

6

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.

miguel.de.icaza
  • 32,654
  • 6
  • 58
  • 76
  • Thank you very much for the precise and detailed answer. My goal for Swift was not only the language itself. The third party libraries would also be something that looks easier when working directly with Swift. – n.t Aug 14 '14 at 18:44