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 3498958
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:33:10+00:00 2026-05-18T12:33:10+00:00

I have a static lib project with targets for iPhone and for os x.

  • 0

I have a static lib project with targets for iPhone and for os x.
With Xcode 3.2.2 and earlier versions all worked just fine, but in 3.2.3 apple seems to have introduced changes in how to handle target settings.
In 3.2.2 I just could choose “base-sdk” from drop-down menu and set up a target for each, iPhone simulator, iPhone device and Mac and xcode would always automatically build for the correct platform and architecture for that target.
Now, with xcode 3.2.3 and later you can’t choose this option any more.
Switching between targets for simulator or device does not have influence on the platform, you build for, anymore. You always have to choose the platform separately and then all targets are build for that platform.
This issue is already described for simulator vs device here:
Targeting multiple platforms in iPhone SDK 4
For iPhone only projects I could live with it and just only have one target and choose the platform separately from the target.

The real issue with that change is with having an iPhone and a mac target in the project:
if the mac target is chosen, you do not have the option anymore, to switch between device and simulator, but they still affect the mac target.
If the platform has been set to device prior to switching active target from iPhone to mac, than xcode does not find the CoreServices for the mac target, because it is searching in iPhone device frameworks, where this isn’t existing. Xcode even builds for arm in this case, also the target settings clearly tell it to build for i386.
If switching back to iPhone target an setting the platform to simulator and then switching back again to mac target, CoreServices framework is found, but the simulator one is used, not the os x one, which leads into the issue of dozens of “error: expected declaration specifiers or ‘…’ before ‘CFXMLTreeRef'” errors in the iphone simulator core services framework, where this is not defined, although I do of course want to use the mac version of the framework for mac target.

As I already mentioned, this was all working fine before Xcode version 3.2.3. Projects only for iPhone or only for mac are still building fine.

Any ideas, how I can get projects with static libs targets for iPhone and for mac, to build with Xcode 3.2.3 and later versions?

  • 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-18T12:33:11+00:00Added an answer on May 18, 2026 at 12:33 pm

    this guy has the solution…
    http://blog.vucica.net/2010/09/single-xcode-project-for-ios-and-mac-os-x.html

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

Sidebar

Related Questions

I have an Xcode 4 project that has my iOS app and a static
I have a project with two targets, one is a Cocoa Static Library, the
I have a static library Xcode 4 project that includes a home-brewed rendering engine,
I have 3 files in a linux static lib project where I'm having a
I have simple static lib in xcode with the only class test.h: @interface TestClass
I have a collection of static libraries (.lib) files one of which may have
Why can we have static final members but cant have static method in an
I have a static library project that I inherited from another developer. I added
I have java project with building rpm by maven. Required create noarch packets, but
I am working on project in Linux which involves 1) Static Lib in C++

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.