Unknown Coder
Unknown Coder

Reputation: 6741

C# library on iOS

FAIR WARNING: I am a newbie to iOS and this may very well be a basic question.

I manage a PC desktop app that has a fairly comprehensive library written in C#. I want some of the library functionality to be available to a new iOS project that I am undertaking. So - what are some of the architectural possibilities for using my existing C# library with an iOS project?

I've done droid development and the answer there was to create some web services that use my C# library and then have the droid consume those services. I'm assuming that same approach would work with iOS (right???) but I'm wondering if there are other options out there?

Upvotes: 6

Views: 3822

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1063944

It depends what you mean to do:

  • if you "consume" the library via SOA with your library at the server, then it should work fine, and iOS will never know about the library (or care)
  • if, however, you mean to use the c# library on the iOS device, then you will have to use tools like MonoTouch - simply: iOS won't run a .NET dll without the supporting goo that tools like MonoTouch add (in particular, cross-compiling / AOT, and a different runtime)
  • or, you could port your code to XCode manually

Upvotes: 10

Related Questions