Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-1516

Error: Building for iOS Simulator, but the linked and embedded framework 'CouchbaseLiteSwift.framework' was built for iOS + iOS Simulator

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 3.0
    • 3.0
    • iOS
    • Security Level: Public
    • None

    Description

      Target Integrity Error: Building for iOS Simulator, but the linked and embedded framework 'CouchbaseLiteSwift.framework' was built for iOS + iOS Simulator.

      This started showing up after taking Xcode update. This means that we should start delivering XCFramework from now on. Or else as a workaround, users should strip out the unnecessary arch from the fat binary.

      Workaround:
      Go to the folder containing the framework and then do the below thinning.

      // for simulator 
      lipo CouchbaseLiteSwift.framework/CouchbaseLiteSwift -thin x86_64 -output  CouchbaseLiteSwift.framework/CouchbaseLiteSwift
       
      // for device 
      lipo CouchbaseLiteSwift.framework/CouchbaseLiteSwift -thin arm64 -output  CouchbaseLiteSwift.framework/CouchbaseLiteSwift
      

      Apple suggestion:

      If this is your library but you have a specific reason for it to be pre-compiled, please build it as an XCFramework. XCFrameworks correctly separate out binaries that have the right architectures for the different platforms you target.

      Forums post:
      https://developer.apple.com/forums/thread/130684
      https://developer.apple.com/forums/thread/128797

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              The Lite The Lite
              Jayahari.Vavachan Jay Vavachan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty