#!/bin/bash set -euo pipefail IOS="${HOME}/Code/mediacluster/apps/ios" mkdir -p "$IOS/Vendor" SRC="/tmp/vlckit4unpack/VLCKit-binary/VLCKit.xcframework" if [ ! -d "$SRC" ]; then echo "Missing $SRC — run scripts/fetch-vlckit.sh first" exit 1 fi # Backup oude MobileVLCKit indien aanwezig if [ -d "$IOS/Vendor/MobileVLCKit.xcframework" ]; then mv "$IOS/Vendor/MobileVLCKit.xcframework" \ "$IOS/Vendor/MobileVLCKit.xcframework.bak.$(date +%Y%m%d%H%M)" || true fi rm -rf "$IOS/Vendor/VLCKit.xcframework" cp -R "$SRC" "$IOS/Vendor/VLCKit.xcframework" HDR="$IOS/Vendor/VLCKit.xcframework/ios-arm64/VLCKit.framework/Headers/VLCDrawable.h" if ! grep -q 'VLCPictureInPictureDrawable' "$HDR"; then echo "ERROR: PiP headers missing in $HDR" exit 1 fi echo "Linked Vendor/VLCKit.xcframework" du -sh "$IOS/Vendor/VLCKit.xcframework" grep -n 'VLCPictureInPictureDrawable' "$HDR" | head -3