#!/bin/bash # Xcode Integration Script for QwenKnowledgeBase.mlpackage # Run this script to automatically add the CoreML model to your Xcode project echo "🚀 Setting up CoreML model for Xcode integration..." # Check if we're in the right directory if [ ! -f "QwenKnowledgeBase.mlpackage" ] && [ ! -d "QwenKnowledgeBase.mlpackage" ]; then echo "❌ Error: QwenKnowledgeBase.mlpackage not found in current directory" echo " Make sure you're in the correct directory" exit 1 fi echo "✅ Found QwenKnowledgeBase.mlpackage" echo "" echo "📱 Next Steps for Xcode Integration:" echo "1. Open your Xcode project" echo "2. Drag 'QwenKnowledgeBase.mlpackage' from this directory into your Xcode project" echo "3. In the dialog that appears:" echo " - Check 'Add to targets' for your app" echo " - Choose 'Create groups' (not folder references)" echo "4. Xcode will automatically compile the model to .mlmodelc format" echo "" echo "🎯 The model will be available in your app bundle as:" echo " Bundle.main.url(forResource: "QwenKnowledgeBase", withExtension: "mlmodelc")" echo "" echo "✅ Integration complete!"