feat(ios): 로컬 ZeroConf 플러그인 — 실기기 Bonjour 활성화 - #61
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
capacitor-zeroconf 4.0.0의 SPM 미지원(Package.swift 부재)으로 네이티브가
미탑재되던 문제를, 같은 jsName("ZeroConf")·같은 payload 형태의 로컬
Swift 플러그인(NetServiceBrowser 기반 watch/unwatch)으로 채운다.
MaestroViewController(capacitorDidLoad)에서 registerPluginInstance —
JS(registerPlugin 프록시)와 패널 런타임 게이트는 무변경으로 동작한다.
시뮬레이터 증거: 빌드 성공 + 앱 렌더 + 부팅 콘솔에 플러그인 등록 로그.
검증 중 발견: 네이티브 검증은 npm run ios:build(CAPACITOR_BUILD=1)를
써야 함 — 일반 build는 GH Pages base(/maestro-coding/)라 흰 화면.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89dddd8105
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| DispatchQueue.main.async { [weak self] in | ||
| self?.watchers[key]?.stop() | ||
| self?.watchers.removeValue(forKey: key) |
There was a problem hiding this comment.
Release the kept-alive watch callback on unwatch
When the discovery timer calls ZeroConf.unwatch(...), this stops and removes the ServiceWatcher, but the corresponding watch call was marked keepAlive, so Capacitor keeps the saved callback alive until it is explicitly released. Repeated “주변 서버 찾기” scans in the iOS app will therefore accumulate saved callbacks and captured JS state even though the native browser has been stopped; store the watch callbackId with the watcher and release it when replacing or removing that watcher.
Useful? React with 👍 / 👎.
요약
2026-07 잔여 리스크 항목(capacitor-zeroconf SPM 미지원 → 실기기에서 주변 서버 검색 불가) 해소.
스펙:
docs/superpowers/specs/2026-08-05-ios-local-zeroconf-design.mdMaestroZeroConfPlugin.swift— jsName "ZeroConf", NetServiceBrowser 기반watch(콜백, added/removed/resolved + name/port/ipv4Addresses payload — 참조 플러그인 형태 미러) /unwatch. 외부 의존성 0, JS·패널 게이트 무변경.MaestroViewController.capacitorDidLoad()에서registerPluginInstance(SPM 환경 표준 경로), storyboard VC 클래스 교체, pbxproj 등록.검증
xcodebuild(iphonesimulator) BUILD SUCCEEDED, 시뮬레이터에서 앱 정상 렌더(스크린샷 확인), 부팅 콘솔에⚡️ 로컬 ZeroConf 플러그인 등록 완료— 등록되면isPluginAvailable('ZeroConf')게이트가 열린다.xcode-select가 Xcode를 가리키지 않아 시뮬레이터 MCP가 붙지 못했음(sudo xcode-select -s /Applications/Xcode.app/Contents/Developer후 자동화 가능). 실기기 최종 확인은 TestFlight 트랙과 묶음.npm run ios:build사용 (일반build는 Pages base라 흰 화면).경계
ios/App/App/(Swift 2파일+storyboard+pbxproj) + 스펙 문서만. JS/서버 무변경.🤖 Generated with Claude Code