title: Xcode 6 missing required Architecture in custom SDK build, how to include all archs properly?
body: <p>I've got a framework file that I inherited and manage in Xcode6, as well as a demo application that uses the framework file.  I generally build the framework project, copy the created .framework file into said demo app, and compile that demo app.</p>
  
  <p>Recently I'm running into problems where the framework is said not to have the required architectures, keeping my demo app from building.  I've been banging my head on trying to get the SDK to build with all architectures, but no matter what I do the demo app can't find what it needs.  It has run fine previously, but now doesn't.</p>
  
  <p>What can I do to ensure this SDK gets built with any archs that could be needed by a consumer in Xcode?  </p>
  
  <p>Also see update below.  It appears the run script does most of the compiling, and I'm not sure if it uses the settings even?</p>
  
  <p>The error in the demo app build:</p>
  
  <pre><code>missing required architecture x86_64 in file 
  Undefined symbols for architecture x86_64:
    "_OBJC_CLASS_$_BeaconManager", referenced from:
        objc-class-ref in StartViewController.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>The build settings on the SDK.  I've expanded the arch values to be as complete as possible, but it hasn't helped.  The .framework file has ballooned from 1mb to 8mb after adding all these too.</p>
  
  <p><img src="https://i.stack.imgur.com/ROaI1.png" alt="enter image description here"></p>
  
  <p>UPDATE:</p>
  
  <p>There is a build script that appears to do more compiling on its own.  I haven't determined if this script determines the architecture on its own or if it still respects all the settings I've attempted to update in Xcode.  What I've learned is that the SDK does not work in simulators once built, but does work when the demo app+SDK is put on the actual Iphone device. </p>
  
  <pre><code>xcodebuild -configuration ${CONFIGURATION} -target BeaconSDK -sdk iphoneos -SYMROOT=${SYMROOT} -OBJROOT=${OBJROOT}
  
  xcodebuild -configuration ${CONFIGURATION} -target BeaconSDK -sdk iphonesimulator -SYMROOT=${SYMROOT} -OBJROOT=${OBJROOT}
  
  INSTALL_DIR=${SRCROOT}/${TARGET_NAME}
  BUILD_DIR=${SRCROOT}/build
  
  DEVICE_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos/${TARGET_NAME}
  SIMULATOR_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${TARGET_NAME}
  
  # Create and renews the final product folder.
  rm -rf "${INSTALL_DIR}"
  mkdir -p "${INSTALL_DIR}"
  mkdir -p "${INSTALL_DIR}/Versions/A/Headers"
  
  xcrun -sdk iphoneos lipo -create ${SIMULATOR_DIR}/BeaconSDK ${DEVICE_DIR}/BeaconSDK -o ${INSTALL_DIR}/Versions/A/BeaconSDK
  
  # Copy the header files to the final product folder.
  cp -r "${SIMULATOR_DIR}/Headers/" "${INSTALL_DIR}/Versions/A/Headers/"
  
  mkdir -p "${INSTALL_DIR}/Versions/A/Resources"
  
  cp -r "${DEVICE_DIR}/" "${INSTALL_DIR}/Versions/A/Resources/"
  
  #create relative symbolic link.
  cd ${INSTALL_DIR}
  
  #link
  ln -s A Versions/Current
  ln -s Versions/A/BeaconSDK BeaconSDK
  ln -s Versions/A/Resources Resources
  ln -s Versions/A/Headers Headers
  </code></pre>