title: iOS : Universal framework is creating issue while submitting to app store
body: <p>We have created one framework and integrated it in my one app. I am able to run and debug the app using this framework but i am receiving below error while submitting to the app store.</p>
  
  <p>Please note that i am using xcode 6.3.</p>
  
  <p><strong>Error: 'Unsupported architecture', The executable for XYZ contains unsupported architecture '[x86_64, i386]'.</strong>"</p>
  
  <p>I have added below script in settings to Framework code while creating the<br>
  framework(Static library) to make it universal. </p>
  
  <pre><code> **Options**
  
  
  REVEAL_ARCHIVE_IN_FINDER=true
  
  FRAMEWORK_NAME="${PROJECT_NAME}"
  
  SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"
  
  DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework"
  
  
  
  UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal"
  
  FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework"
  
  
  `Build Frameworks`
  
    xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphonesimulator -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator | echo
  
   xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphoneos -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos | echo
  
   #xcodebuild -target ${PROJECT_NAME} ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" | echo
  
  #xcodebuild -target ${PROJECT_NAME} ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" | echo
  
  
  
   Create directory for universal
  
  
  rm -rf "${UNIVERSAL_LIBRARY_DIR}"
  
  mkdir "${UNIVERSAL_LIBRARY_DIR}"
  
  mkdir "${FRAMEWORK}"
  
  
  
  Copy files Framework
  
  
  cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}"
  
  
  
  Make fat universal binary
  
  
  lipo "${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}"     "${DEVICE_LIBRARY_PATH}/${FRAMEWORK_NAME}" -create -output     "${FRAMEWORK}/${FRAMEWORK_NAME}" | echo
  
  
  
   On Release, copy the result to desktop folder
  
  
  if [ "${CONFIGURATION}" == "Release" ]; then
  mkdir "${HOME}/Desktop/${FRAMEWORK_NAME}-${CONFIGURATION}-iphoneuniversal/"
  cp -r "${FRAMEWORK}" "${HOME}/Desktop/${FRAMEWORK_NAME}-${CONFIGURATION}-    iphoneuniversal/"
  fi
  
  
  
   If needed, open the Framework folder
  
  
  if [ ${REVEAL_ARCHIVE_IN_FINDER} = true ]; then
  if [ "${CONFIGURATION}" == "Release" ]; then
  open "${HOME}/Desktop/${FRAMEWORK_NAME}-${CONFIGURATION}-iphoneuniversal/"
  else
  open "${UNIVERSAL_LIBRARY_DIR}/"
  fi
  fi
  </code></pre>
  
  <p><strong>Can anyone please help me to create framework which i can debug (means run in simulator), run(in device) and also submit to the appstore.</strong></p>
  
  <p>Thanks in advance.</p>