Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6109543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:24:59+00:00 2026-05-23T14:24:59+00:00

I am trying to build a couple of apps within an XCode workspace: One

  • 0

I am trying to build a couple of apps within an XCode workspace: One app will be an iOS app and another will be a Mac OS X app. I’d like to have a certain set of classes that get included in both versions of the app. I’m struggling to figure out what kind of project structure would best support some code that is shared, some that is specific to the iOS app, and some that is specific to the Mac app. Is there a best practice for doing this kind of thing in XCode in general or XCode 4 specifically?

Should I be creating a library project for the shared code and creating 2 different targets for the iOS and Mac OS X builds of the library? The build-in project templates seem to want me to pick either a Mac OS X library or an iOS library, and I’m not sure if it’s easy to make a project based on one of those templates work for both targets.

Should I instead be creating different projects for the iOS library, the Mac OS X library, the iOS app, and the Max OS X app? In this case, how can I easily have the library code shared between the iOS library and Mac OS X library projects?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:25:00+00:00Added an answer on May 23, 2026 at 2:25 pm

    You won’t be able to make a library in the sense of a shared library file that you can link against, because code for iOS is compiled for ARM processors whereas code for OS X is compiled for Intel processors (different machine code instruction sets).

    You should probably just make the code that will be shared in to a separate project and then add the project itself as a dependency.

    And here’s another SO question that’s similar to yours about porting from one platform to the other

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm stuck on a couple of points trying to build JS apps with ant.
I've been trying to build MailCore with Xcode 4 for the past couple of
I'm trying to build my own rpm package and have a couple of doubts.
I'm trying to build one of my CMake-based projects from a couple of years
I'm trying build a method which returns the shortest path from one node to
I'm trying build an App Engine connected Android application and am having some problems
Following a couple different tutorials, I've been trying to build a Silverlight Business Application
I am trying to build an app on my wife's phone that pranks her
I'm trying to build a class which will initalise its self either by passing
I'm trying to build a fairly complex form which as a couple of cascading

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.