iosxcodearm64armv7build-settings

Xcode build settings not showing arch specific options?


I'm trying to add architecture specific locations for libraries in my build settings for my project. However for some reason I don't see them in the menu.


How my menu looks:

My Menu


How the menu is supposed to look

What it's supposed to look like

(Not exactly the same, but you can see how in this image they were able to select architecture specific options for the configuration setting. I'm only able to select OS specific things, not architecture)

See this page for a reference of how it should be working.


Solution

  • I had to find this out through experimentation and trial and error. I was unable to find any documentation out there for this afaik; if there is, I would be happy to see it.

    You'll have to manually edit your project.pbxproj file. Find the setting you want to change (making sure it belongs to the correct target and configuration), and change it from

    LIBRARY_SEARCH_PATHS = (
        /library/search/path/1,
        /library/search/path/2,
        /library/search/path/3,
    );
    

    to

    "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=x86_64]" = (
        /library/search/path/1,
        /library/search/path/2,
        /library/search/path/3,
    );
    
    

    A few things to note:

    The full list of sdks (as of this writing) comprise

    iphonesimulator 
    iphoneos 
    watchos 
    watchsimulator 
    appletvos 
    appletvsimulator 
    macosx
    

    Edit: Please also note that the build system distinguishes between iphoneos (iOS device) and iphonesimulator, so if a build isn't working, double check your [sdk=...] settings!