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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:00:05+00:00 2026-05-15T21:00:05+00:00

I have an iPhone SDK project that is supposed to build a static library

  • 0

I have an iPhone SDK project that is supposed to build a static library for both the simulator and the ARM processor and then combine the two into a universal library.

Heretofore, I was using iPhone SDK 3+ and accomplished this by creating a separate target for each, one simulator and one ARM, and then making a third target that combines them using a shell script. The deployment targets/build settings for each of the constituent targets are set to their respective architectures, etc. Also, iPhone SDK 3+ allowed me to select “Base SDK” from the drop down menu in the upper-left corner of the main XCode window.

Everything worked famously–then I upgraded to SDK 4.

Now, there is no “Base SDK” listing in the drop down menu in the upper-left. Also, the compiler seems to ignore the target deployment settings entirely. Even though one of the targets is set to “iPhone Device” and the other is set to “iPhone Simulator”, they still build as whatever is set in the drop down menu.

In case I’ve not been clear enough, here is the offensive offending aforementioned menu we all know and love:

offending menu

Once again, in SDK 3 everything worked perfectly. Now in SDK 4, if it’s set to “Device” I get two libraries built for ARM. If it’s set to simulator, I get two libraries built for the simulator.

Anybody know of a workaround for this bullhonkey?

Thanks much.

UPDATE: the “xcodebuild” command line tool still works, that is to say it will build the correct architecture according to each target’s deployment parameters.

Thus, rather than using XCode’s GUI to build, I can use a shell script that calls xcodebuild like so:

xcodebuild -target device-target -configuration Debug
xcodebuild -target sim-target -configuration Debug

It’d still be nice to find a real solution, but this will get the job done for now.

  • 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-15T21:00:07+00:00Added an answer on May 15, 2026 at 9:00 pm

    Yeah, Apple seems to be frobbing all the XCode controls and options. It’s gotten to the point that I don’t install Beta SDKs at all or GM/public SDKs if I’m close to finishing an app. I know the upgrade will break something.

    Anyway, you should be able to create an External Target or Shell Script Target that builds each and links the libs together. I have a similar shell script for my bag-o-tricks library. In the XCode Project settings, I have set the BaseSDK to the iPhone Device 4.0 SDK. The build script looks roughly like:

    xcodebuild -parallelizeTargets -configuration Debug -sdk iphoneos4.0 -target StaticLibs
    xcodebuild -parallelizeTargets -configuration Debug -sdk iphonesimulator4.0 -target StaticLibs
    xcodebuild -parallelizeTargets -configuration Release -sdk iphoneos4.0 -target StaticLibs
    xcodebuild -parallelizeTargets -configuration Release -sdk iphonesimulator4.0 -target StaticLibs
    mkdir -p build/Debug-dist build/Release-dist
    lipo build/Debug-iphoneos/libfoo.a build/Debug-iphonesimulator/libfoo.a -create -output build/Debug-dist/libfoo.a
    lipo build/Release-iphoneos/libfoo.a build/Release-iphonesimulator/libfoo.a -create -output build/Release-dist/libfoo.a
    

    OK, I confess, this is an unrolled version. My actual script has a bunch of for thing in ${LIST_OF_STUFF}; do ... loops to better automated the builds, copy all the include files, and roll up a whole SDK.

    I submitted a patch to Core-Plot to automate the creation of an SDK for them. If you use this patch as a reference, remove the GCC_VERSION key/value pair from the SDKSettings.plist or apps building against it will fail.

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

Sidebar

Related Questions

I have a 3D Model (OpenGL ES 1.1 iPhone SDK v3.0) that is somewhat
I have an existing iPhone project that has been tested, submitted, and approved, compiled
I have a static lib project with targets for iPhone and for os x.
I have a C SDK I need to use in an iPhone project, and
I have an iPhone (Xcode) Project that was working fine. Something must have been
I am working with the iPhone SDK and I have to process a webservice
Possible Duplicate: Email validation on textField in iPhone sdk I have an app in
i'm new at IPhone SDK Developing and now i need some help. I have
I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have
I am new to the whole iPhone SDK and objective C, but have managed

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.