ARTICLE AD BOX
Here is a sh script that convert the shallow framework structure to un-shallow framework structure:
#!/bin/bash set -e # Usage: # ./un_shallow_framework.sh /path/to/TensorFlowLiteC.framework /output/path SRC="$1" DST="$2" if [[ -z "$SRC" || -z "$DST" ]]; then echo "Usage: $0 /path/to/shallow/framework.framework /output/path" exit 1 fi if [[ ! -d "$SRC" ]]; then echo "Source framework does not exist: $SRC" exit 1 fi FRAMEWORK_NAME="$(basename "$SRC")" DST_FRAMEWORK="$DST/$FRAMEWORK_NAME" echo "Copying framework to destination..." mkdir -p "$DST" rm -rf "$DST_FRAMEWORK" cp -R "$SRC" "$DST_FRAMEWORK" # Only run if the copied framework is shallow if [ -d "$DST_FRAMEWORK" ] \ && [ -f "$DST_FRAMEWORK/Info.plist" ] \ && [ ! -d "$DST_FRAMEWORK/Versions" ]; then echo "Converting copied framework to versioned bundle structure..." cd "$DST_FRAMEWORK" # Create versioned structure mkdir -p Versions/A/Resources # Move contents into versioned directory mv Headers Versions/A/ mv Modules Versions/A/ mv Info.plist Versions/A/Resources/ mv TensorFlowLiteC Versions/A/ # Create Current symlink ln -s A Versions/Current # Create top-level symlinks ln -s Versions/Current/Headers Headers ln -s Versions/Current/Modules Modules ln -s Versions/Current/Resources Resources ln -s Versions/Current/TensorFlowLiteC TensorFlowLiteC echo "Conversion complete at: $DST_FRAMEWORK" else echo "Framework already appears to be versioned — no changes made." fiThe new framework structure is:
TensorFlowLiteC.framework/ ├── Versions/ │ ├── A/ │ │ ├── Headers/ │ │ ├── Modules/ │ │ ├── Resources/ │ │ │ └── Info.plist ← required location │ │ └── TensorFlowLiteC │ └── Current → A ├── Headers → Versions/Current/Headers ├── Modules → Versions/Current/Modules ├── Resources → Versions/Current/Resources └── TensorFlowLiteC → Versions/Current/TensorFlowLiteCNow Xcode 26 builds and run!
