title: Could not find module 'MyCustomFramework' for target 'x86_64-apple-ios-simulator'; found: arm64, armv7-apple-ios, arm64-apple-ios, arm, armv7
body: <p>I have a custom framework that I am archiving for use in another project. After updating to Xcode11 I get the following error in my project utilizing the framework.</p>
  <p>Could not find module 'MyCustomFramework' for target 'x86_64-apple-ios-simulator'; found: arm64, armv7-apple-ios, arm64-apple-ios, arm, armv7</p>
  <p>My framework works fine on Xcode10 but does not on 11. My target is set to NO for build active architectures only. I have the following for Valid Architectures; arm64e, armv7s, armv7, arm64.</p>
  <h1>My build script</h1>
  <pre><code>exec &gt; ${PROJECT_DIR}/${PROJECT_NAME}_archive.log 2&gt;&amp;1
  
  UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
  
  if [ &quot;true&quot; == ${ALREADYINVOKED:-false} ]
  then
  echo &quot;RECURSION: Detected, stopping&quot;
  else
  export ALREADYINVOKED=&quot;true&quot;
  
  # make sure the output directory exists
  mkdir -p &quot;${UNIVERSAL_OUTPUTFOLDER}&quot;
  
  echo &quot;Building for iPhoneSimulator&quot;
  xcodebuild -workspace &quot;${WORKSPACE_PATH}&quot; -scheme &quot;${TARGET_NAME}&quot; -configuration ${CONFIGURATION} -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro Max' ONLY_ACTIVE_ARCH=NO ARCHS='i386 x86_64' BUILD_DIR=&quot;${BUILD_DIR}&quot; BUILD_ROOT=&quot;${BUILD_ROOT}&quot; ENABLE_BITCODE=YES OTHER_CFLAGS=&quot;-fembed-bitcode&quot; BITCODE_GENERATION_MODE=bitcode clean build
  
  # Step 1. Copy the framework structure (from iphoneos build) to the universal folder
  echo &quot;Copying to output folder&quot;
  cp -R &quot;${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}&quot; &quot;${UNIVERSAL_OUTPUTFOLDER}/&quot;
  
  # Step 2. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory
  SIMULATOR_SWIFT_MODULES_DIR=&quot;${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${TARGET_NAME}.framework/Modules/${TARGET_NAME}.swiftmodule/.&quot;
  if [ -d &quot;${SIMULATOR_SWIFT_MODULES_DIR}&quot; ]; then
  cp -R &quot;${SIMULATOR_SWIFT_MODULES_DIR}&quot; &quot;${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/Modules/${TARGET_NAME}.swiftmodule&quot;
  fi
  
  # Step 3. Create universal binary file using lipo and place the combined executable in the copied framework directory
  echo &quot;Combining executables&quot;
  lipo -create -output &quot;${UNIVERSAL_OUTPUTFOLDER}/${EXECUTABLE_PATH}&quot; &quot;${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${EXECUTABLE_PATH}&quot; &quot;${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}/${EXECUTABLE_PATH}&quot;
  
  # Step 4. Create universal binaries for embedded frameworks
  #for SUB_FRAMEWORK in $( ls &quot;${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/Frameworks&quot; ); do
  #BINARY_NAME=&quot;${SUB_FRAMEWORK%.*}&quot;
  #lipo -create -output &quot;${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/Frameworks/${SUB_FRAMEWORK}/${BINARY_NAME}&quot; &quot;${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${SUB_FRAMEWORK}/${BINARY_NAME}&quot; &quot;${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}/${TARGET_NAME}.framework/Frameworks/${SUB_FRAMEWORK}/${BINARY_NAME}&quot;
  #done
  
  # Step 5. Convenience step to copy the framework to the project's directory
  ARCHIVE_PATH=&quot;${PROJECT_DIR}/Products&quot;
  rm -rf &quot;${ARCHIVE_PATH}&quot;
  mkdir &quot;${ARCHIVE_PATH}&quot;
  
  echo &quot;Copying to project dir&quot;
  yes | cp -Rf &quot;${UNIVERSAL_OUTPUTFOLDER}/${FULL_PRODUCT_NAME}&quot; &quot;${ARCHIVE_PATH}&quot;
  
  open &quot;${ARCHIVE_PATH}&quot;
  
  fi
  
  </code></pre>