Files
digital-pilates/scripts/fix-swift-compilation.sh
richarjiang b0e93eedae feat(ios): 添加用药计划Widget小组件支持
- 创建medicineExtension小组件,支持iOS桌面显示用药计划
- 实现App Group数据共享机制,支持主应用与小组件数据同步
- 添加AppGroupUserDefaultsManager原生模块,提供跨应用数据访问能力
- 添加WidgetManager和WidgetCenterHelper,实现小组件刷新控制
- 在medications页面和Redux store中集成小组件数据同步逻辑
- 支持实时同步今日用药状态(待服用/已服用/已错过)到小组件
- 配置App Group entitlements (group.com.anonymous.digitalpilates)
- 更新Xcode项目配置,添加WidgetKit和SwiftUI框架支持
2025-11-14 08:51:02 +08:00

32 lines
980 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 快速修复Swift编译问题的脚本
echo "🔧 开始修复Swift编译问题..."
# 1. 清理构建缓存
echo "🧹 清理构建缓存..."
cd ios
rm -rf ~/Library/Developer/Xcode/DerivedData/*/Build/Intermediates/*.swiftmodule/* 2>/dev/null
# 2. 重新生成项目文件
echo "📝 重新生成项目文件..."
xcodebuild -project OutLive.xcodeproj -alltargets clean
# 3. 重新安装Pods
echo "📦 重新安装Pods..."
rm -rf Pods
rm -f Podfile.lock
pod install --repo-update
# 4. 检查编译错误
echo "🔍 检查编译错误..."
if xcodebuild -workspace OutLive.xcworkspace -scheme OutLive -destination 'generic/platform=iOS Simulator,name=iPhone 15' build 2>&1 | grep -q "error:"; then
echo "❌ 发现编译错误请检查Xcode项目"
echo "💡 建议在Xcode中打开项目查看详细错误信息"
open ios/OutLive.xcworkspace
else
echo "✅ 编译检查通过"
fi
echo "🎉 修复完成!请尝试重新构建项目。"