Creating multi-platform application

EggWhite

macrumors member
Original poster
Aug 28, 2009
40
0
Hi, I am coming from a windows c# background using Visual Studios, and want to make an app for both iOS and Mac that will have a lot of shared code. In Visual Studios I would create a solution with a project for each interface (Web, console, windows app) and then one or more code libraries that would contain all the main logic that wasn't part of the interface and everything would work great.

I am trying to read up on how to do this with XCode and I am confused what is the best way to do this. I have been searching but haven't found much in the wait of guide or tutorials, but it may be I am searching for the wrong keywords since terminology may be very different.

Could anyone point me in the right direction of a guide that will help me get the project setup in the best way.
 

iSee

macrumors 68040
Oct 25, 2004
3,523
253

EggWhite

macrumors member
Original poster
Aug 28, 2009
40
0
Thank you, that will help me out. Is there an equivalent to class library that only holds code and can't be deployed separately and is just for the logic and data layer?

Take a look at "Xcode Concepts" documentation.

https://developer.apple.com/library/mac/featuredarticles/XcodeConcepts/Concept-Targets.html

Roughly:

Xcode Project corresponds to a VS Solution
Xcode Target corresponds to a VS Project

Like VS, Xcode has build configurations, to specify different options for, e.g., Debug and Release builds.

It's not entirely one-to-one, but I think for what you are talking about, these are the right equivalencies.
 

Senor Cuete

macrumors 6502
Nov 9, 2011
273
12
Correct Approach

Your idea of using the respective IDE's for the different applications and using shared code libraries for the core functionality is the correct one because you will get the best possible user experience for each platform. However people that I know had a terrible time doing this because the code libraries for the PC were developed in languages that are not supported by XCode, for example BASIC. This could be a problem.
 

theSeb

macrumors 604
Aug 10, 2010
6,963
83
Poole, England
Your idea of using the respective IDE's for the different applications and using shared code libraries for the core functionality is the correct one because you will get the best possible user experience for each platform. However people that I know had a terrible time doing this because the code libraries for the PC were developed in languages that are not supported by XCode, for example BASIC. This could be a problem.
I don't think you read the question. There are no libraries in Windows that were developed in BASIC. He is not trying to make an application that is cross-platform between OS X and Windows.
 
Last edited:

EggWhite

macrumors member
Original poster
Aug 28, 2009
40
0
Thank you everyone for your help, I have been doing some reading and it seems like what I am wanting to do is possible with a similar structure to what I am used to in VS.

And yes this would be a Mac and iOS app and planning to try out Swift. Just a side project for fun.