Xcode 16 beta 6 LLVMError: LLVMError(description: "file too small to be an archive")

We are using TensorFlowLiteC XCFramework and encountering an issue.

Download link: https://dl.google.com/tflite-release/ios/prod/tensorflow/lite/release/ios/release/30/20231002-210715/TensorFlowLiteC/2.14.0/883c6fc838e0354b/TensorFlowLiteC-2.14.0.tar.gz

Whenever this framework is linked, Previews fail with the following error:

== PREVIEW UPDATE ERROR:

    FailedToLaunchAppError: Failed to launch cg.Xcode16TensorPreviewsRepro
    
    ==================================
    
    |  [Remote] JITError
    |  
    |  ==================================
    |  
    |  |  [Remote] LLVMError
    |  |  
    |  |  LLVMError: LLVMError(description: "file too small to be an archive")

Since Xcode 16 will soon be the IDE for all our devs, it would be great if the community or Xcode Previews team could share any workarounds or solutions for this issue.

FB(reproducer + additional diagnostics): https://feedbackassistant.apple.com/feedback/15084788

Thanks

We managed to work around the issue by modifying the object file within the XCFramework. I converted it into a static archive, and now Previews are working perfectly again. Here’s the command I used:

ar rcs <target_archive_name> <existing_object_file>
Xcode 16 beta 6 LLVMError: LLVMError(description: "file too small to be an archive")
 
 
Q