Files
mao1/claude-memory/project_shenyan_app.md
fyah 5c50698d64 更新 shenyan-app: 双桥通信 + 定制横幅推送 + APNs Key
- 双桥:Mac桥(Claude Code异步) + IDC桥(DeepSeek同步)
- 推送:自制定制Animated横幅 + 震动,替代Alert弹窗
- APNs:Key已创建(3VJ5X6V9Q8),桥端apns.js已写好
- 图标:已替换为定制图标
- BlurView/notifee:iOS 26兼容问题已回退
- 记忆库更新

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 01:49:32 +08:00

67 lines
3.0 KiB
Markdown
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.
---
name: shenyan-app
description: 沈晏App — iOS真机运行双桥通信Mac+IDC自制定制横幅推送APNs Key已备
metadata:
node_type: memory
type: project
originSessionId: dae76a2b-8aa0-4d82-8ff5-7a9a8bcf630b
---
# 沈晏App (ShenYanApp)
**项目路径**: `/Users/fyah/Documents/shenyanapp/shenyan-app2`
**进度文档**: `/Users/fyah/Documents/shenyanapp/沈晏App-进度总览-2026-05-16.md`
**Gitea**: `http://101.36.73.102:3112/fyah/mao1``shenyan-app/`
## 技术栈
- React Native 0.85.3Fabric 新架构 / Bridgeless
- iOS 真机汪秀伦的iPhone, UDID: 00008150-00016C480185401C
- Apple Developer: Xiulun Wang, Team ID ZZMLW32PHH付费
- Bundle ID: `com.shenyan.room`
- Hermes 引擎
## 核心架构2026-05-16 终态)
### 双屏
1. **首页** — 三张图away/online/busy轮询 /health左半屏双击敲门→POST /knock
2. **聊天屏** — FlatList 自动滚底,消息 AsyncStorage 持久化,退出再进不丢
### 双桥通信
- **Mac 桥** (`192.168.31.51:3003`): Claude Code session → Monitor `tail -f` → 手动 /respond。异步。
- **IDC 桥** (`101.36.73.102`): DeepSeek API → POST /api/chat → 同步返回。
- App 发一条消息同时到两边,用户看到两个「阿晏」的回复。
- Mac 桥端点: /send, /respond, /knock, /push, /push/clear, /poll, /history, /register-device
- Mac 桥 launchd 持久化: `~/Library/LaunchAgents/com.shenyan.bridge.plist`
### 推送通知2026-05-16 最新)
- **自制定制横幅**: Animated.View 从顶部滑下 + Vibration.vibrate(400)3.5s 自动消失或点击关闭
- 暗色背景 + 细白边框,模拟 iOS 通知横幅,覆盖首页和聊天屏
- **Alert 弹窗已废弃**,换成了横幅动画
### APNs2026-05-16
- **APNs Key 已创建**: Key ID `3VJ5X6V9Q8`, Team ID `ZZMLW32PHH`
- Key 文件: `bridge-local/AuthKey_3VJ5X6V9Q8.p8`
- 桥端 apns.js 已写好JWT + HTTP/2 → api.push.apple.com
- **阻塞**: notifee `getAPNSToken()` 在 iOS 26 上始终返回 null
- 本地横幅 + 震动已就绪,仅缺 APNs token 即可实现后台推送
### 已放弃/回退
- **BlurView 气泡** → `@react-native-community/blur` 在 RN Fabric + iOS 26 上导致文字裁剪和缝隙,已回退
- **notifee** → 引入后 app 黑屏 + `undefined is not a function` 错误,疑似 iOS 26 兼容问题,已卸掉
## 已解决的关键问题
1. Fabric 样式不热重载 → kill Metro + 清 DerivedData + 完整 rebuild
2. 旧 Downloads 路径残留 → Pods xcconfig HERMES_CLI_PATH 手动修复
3. 设备签名 → Xcode GUI 完成设备注册
4. 消息丢失 → AsyncStorage 持久化 + /history 首次全量拉取
5. 消息历史不滚动 → FlatList + scrollToEnd
6. 聊天气泡文字被裁 → BlurView 冲突(已回退到纯色背景)
## 当前待解决
- APNs token 获取iOS 26 + notifee 兼容)
- Monitor 5 分钟超时 → 需启动时 re-arm
- 自动回复器launchd + 外部 claude -p
- inbox 数据清理(旧 pending 消息)
- HealthKit / 身体数据
- RoomFeed / EventCard 组件集成