bbcf0c74bb
- 19 Swift source files (~4900 lines) - Complete UI with SwiftUI (MainView, SettingsView, MessageBubble, InputBar) - Inference layer (LlmEngine, Agent, ToolCalling, ConversationContext) - Services (Audio, TTS, WebSearch, ModelDownload, Storage) - Build system: Makefile, Package.swift, Podfile - Documentation: BUILD.md, plan.md, PROJECT_STATUS.md - Ready for Xcode build - just need LiteRT dependency added
111 lines
2.6 KiB
Bash
111 lines
2.6 KiB
Bash
#!/bin/bash
|
|
|
|
# Create Xcode Project Script for Sleepy Agent iOS
|
|
# This script creates a basic Xcode project structure
|
|
|
|
set -e
|
|
|
|
APP_NAME="SleepyAgent"
|
|
BUNDLE_ID="com.sleepy.agent"
|
|
TEAM_ID="" # Leave empty for manual signing
|
|
|
|
# Colors for output
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${GREEN}Sleepy Agent iOS - Project Generator${NC}"
|
|
echo ""
|
|
|
|
# Check for Xcode
|
|
if ! command -v xcodebuild &> /dev/null; then
|
|
echo -e "${RED}ERROR: Xcode is not installed or not in PATH${NC}"
|
|
echo "Please install Xcode from the App Store"
|
|
exit 1
|
|
fi
|
|
|
|
XCODE_VERSION=$(xcodebuild -version | head -1)
|
|
echo "Found: $XCODE_VERSION"
|
|
|
|
# Create project directory structure
|
|
echo ""
|
|
echo "Creating project structure..."
|
|
mkdir -p "$APP_NAME/Assets.xcassets/AppIcon.appiconset"
|
|
mkdir -p "$APP_NAME/Preview Content"
|
|
|
|
# Create AppIcon contents
|
|
cat > "$APP_NAME/Assets.xcassets/AppIcon.appiconset/Contents.json" << 'EOF'
|
|
{
|
|
"images" : [
|
|
{
|
|
"idiom" : "universal",
|
|
"platform" : "ios",
|
|
"size" : "1024x1024"
|
|
}
|
|
],
|
|
"info" : {
|
|
"author" : "xcode",
|
|
"version" : 1
|
|
}
|
|
}
|
|
EOF
|
|
|
|
# Create Assets catalog
|
|
cat > "$APP_NAME/Assets.xcassets/Contents.json" << 'EOF'
|
|
{
|
|
"info" : {
|
|
"author" : "xcode",
|
|
"version" : 1
|
|
}
|
|
}
|
|
EOF
|
|
|
|
# Create Preview Assets
|
|
cat > "$APP_NAME/Preview Content/Preview Assets.xcassets/Contents.json" << 'EOF'
|
|
{
|
|
"info" : {
|
|
"author" : "xcode",
|
|
"version" : 1
|
|
}
|
|
}
|
|
EOF
|
|
|
|
echo -e "${GREEN}Project structure created!${NC}"
|
|
echo ""
|
|
|
|
# Check if we should use CocoaPods
|
|
if command -v pod &> /dev/null; then
|
|
echo "CocoaPods detected. Setting up Pods..."
|
|
|
|
if [ -f "Podfile" ]; then
|
|
echo "Installing dependencies..."
|
|
pod install --repo-update || pod install
|
|
|
|
echo ""
|
|
echo -e "${GREEN}Setup complete!${NC}"
|
|
echo ""
|
|
echo "Open the project with:"
|
|
echo " open ${APP_NAME}.xcworkspace"
|
|
else
|
|
echo -e "${YELLOW}WARNING: No Podfile found${NC}"
|
|
fi
|
|
else
|
|
echo -e "${YELLOW}WARNING: CocoaPods not installed${NC}"
|
|
echo "Install with: sudo gem install cocoapods"
|
|
echo ""
|
|
echo "Without CocoaPods, you'll need to manually add TensorFlow Lite."
|
|
fi
|
|
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo "1. Open ${APP_NAME}.xcworkspace (or ${APP_NAME}.xcodeproj) in Xcode"
|
|
echo "2. Set your Team in Signing & Capabilities"
|
|
echo "3. Update the Bundle Identifier if needed"
|
|
echo "4. Build and run!"
|
|
echo ""
|
|
echo "To build from command line:"
|
|
echo " make build # Debug build for simulator"
|
|
echo " make archive # Create archive for distribution"
|
|
echo " make ipa # Create .ipa file"
|