Skip to content

feat(ios): 로컬 ZeroConf 플러그인 — 실기기 Bonjour 활성화 - #61

Merged
redsunjin merged 2 commits into
mainfrom
feat/ios-local-zeroconf
Aug 5, 2026
Merged

feat(ios): 로컬 ZeroConf 플러그인 — 실기기 Bonjour 활성화#61
redsunjin merged 2 commits into
mainfrom
feat/ios-local-zeroconf

Conversation

@redsunjin

Copy link
Copy Markdown
Owner

요약

2026-07 잔여 리스크 항목(capacitor-zeroconf SPM 미지원 → 실기기에서 주변 서버 검색 불가) 해소.
스펙: docs/superpowers/specs/2026-08-05-ios-local-zeroconf-design.md

  • 앱 타깃 로컬 플러그인 MaestroZeroConfPlugin.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') 게이트가 열린다.
  • 잔여 확인(비차단): 시뮬레이터에서 "주변 서버(Bonjour)" 버튼 탭→호스트 서버 목록 확인은 터치 자동화가 필요 — 로컬 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

selimDGAX and others added 2 commits August 5, 2026 16:30
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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@redsunjin
redsunjin merged commit 982fc4b into main Aug 5, 2026
4 checks passed
@redsunjin
redsunjin deleted the feat/ios-local-zeroconf branch August 5, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants