Facebook Twitter Github Freelancer
    Xcode Workspace Archive Project With Static Library

    Check in the derived data folder for a folder (do a search in Finder) for InstallationBuildProductsLocation. This is where your static library project should be outputting it’s header files based on it’s ‘Packaging > Private / Public Headers Folder Path’.  If you can see your .h files, great, this post can help you. Otherwise you have an issue I haven’t run into yet.

    If you are trying to archive a project in a workspace setup, read the command that is run in the log navigator (command+7) for the ‘Precompile {project}/{project}-Prefix.pch file.

    Generally you will find you are missing a .h file originating in the .pch file.

    Read the command for this, it will begin with ‘ProcessPCH’. Around the end of the command you will find that there are a whole lot of ‘-iquote’ parameters. This is where the headers search path should be for you static library.

    Go back to you project build settings and add to the header search paths for Release mode for every folder in there (for some reason the recursion doesn’t work).

    A general folder structure might be

    InstallationBuildProductsLocation/headers/public
    InstallationBuildProductsLocation/headers/private

    I would add the Release 

    $(TARGET_BUILD_DIR)/../headers/public
    $(TARGET_BUILD_DIR)/../headers/private

    Archive now, watch it work and feel free to thank me.

    Archive is greyed out in Xcode 4

    Perhaps your current build configiuration is “Simulator”? If so it needs to be built under the device configuration before you can archive it.