title: Publishing the XCFramework
body: <p>I want to modularise my codebase to distribute it like third party libraries. I followed the <a href="https://www.raywenderlich.com/17753301-creating-a-framework-for-ios" rel="nofollow noreferrer">article</a> for the same. So far I have been able to split the code into three modules (Networking, Core &amp; Home). The problem is occurred while <a href="https://www.raywenderlich.com/17753301-creating-a-framework-for-ios#toc-anchor-009" rel="nofollow noreferrer">archiving</a> the XCFramework with given command - <img src="https://i.stack.imgur.com/qjEs8.png" alt="commands" /> I was facing this  error -</p>
  <pre><code>:10:8: error: no such module 'Alamofire'
  import Alamofire
         ^
  
  Command CompileSwiftSources failed with a nonzero exit code
  ** ARCHIVE FAILED **
  
  
  The following build commands failed:
      CompileSwift normal x86_64 (in target 'Networking' from project 'Networking')
      CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'Networking' from project 'Networking')
      CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Networking' from project 'Networking')
  (3 failures)
  </code></pre>
  <p>So I did some R&amp;D and excluded the arm64 and x86_64  for simulator architecture both from your main Project and the Pod project. <img src="https://i.stack.imgur.com/6dTmt.png" alt="excluded" />Error has gone and archiving was successful. But the <strong>xcarchive file created by the command, having only size of 21KB.</strong></p>
  <p>Still I tried to generate the XCFramework for simulator and iOS device with the following command -</p>
  <pre><code>xcodebuild -create-xcframework \
  -framework './build/Networking.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/Networking.framework' \
  -framework './build/Networking.framework-iphoneos.xcarchive/Products/Library/Frameworks/Networking.framework' \
  -output './build/Networking.xcframework'
  </code></pre>
  <p>As expected, I got the error -
  &quot;unable to read the file at '/Users/vinodkr/Documents/GitHub/channel-partners-ios/Frameworks/Networking/build/Networking.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/Networking.framework/Networking'&quot;</p>
  <p>NOTE :- Device specification</p>
  <ul>
  <li>macOS Monterey, 2.6 GHz 6-Core Intel Core i7</li>
  <li>xcode Version 13.1 (13A1030d)</li>
  </ul>
  <p>More Information  -</p>
  <ol>
  <li><p>I tried the article with brand new project without Pods in it. It worked perfectly fine.</p>
  </li>
  <li><p>I am consuming 'Alamofire' with a warning - &quot;Module 'Alamofire' was not compiled with library evolution support; using it means binary compatibility for 'Networking' can't be guaranteed&quot;.</p>
  </li>
  </ol>