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.

    ‘unrecognized selector sent to instance’ for Static Library Category

    If you receive ‘unrecognized selector sent to instance category’ when running a static library that has a category in it, in short, it’s failing because the category is stripped out when the binary is built. You don’t receive an error when it builds because it exists then.

    Just add ‘-Objc’ to other linker flags for the project linking to the static library.

    Refer to this article for a good explanation: https://developer.apple.com/library/mac/#qa/qa2006/qa1490.html

    Include Resources in Xcode Project for Static Library

    This resource is good, just remember to look at step 10 as it shows you you need to reference the bundle the resource is in.

    http://iphone.galloway.me.uk/iphone-sdktutorials/ios-library-with-resources/