Skip to content

v0.0.9

Choose a tag to compare

@LESANF LESANF released this 17 Sep 04:09
· 46 commits to master since this release
9aea1f4

Warning

Still a PoC. 0.0.x promises no API or structural stability.

Two things change what you get, and a round of housekeeping.

Rich push images on iOS

iOS hands an image push to a Notification Service Extension, not to the app. Without one, a background or killed app shows the text and drops the image. The template now ships that extension: targets/notification-service/ is the reference app's, copied as-is, and @bacons/apple-targets turns it into an Xcode target at prebuild. It reads fcm_options.image — the same key the foreground path already used.

It follows the template's existing rule: the folder's presence turns it on, and only while push itself is on. Delete the folder and the target is gone; push off means no target regardless. The bundle is <bundleId>.ImageNotification, and a device build needs a provisioning profile for that bundle.

@bacons/apple-targets@4.0.6 crashes on any non-clean prebuild once the target exists — the loop that removes the old build configuration list clears the very property it is iterating. patches/ carries the fix. Upstream has the identical change open as a PR with no review since August, and 5.0.0 has the same code, so this is a patch we expect to keep and re-target on upgrades. patches/README.md states the exact condition for dropping it.

One trap found on the first device test: iOS attachments accept JPEG, PNG and GIF only. placehold.co/600x400 returns SVG unless you add .png, and the notification then arrives without its image and without any error you would see. Both the extension and the foreground path fail the same way.

pnpm: a floor, not a pin

packageManager: pnpm@11.10.0 was doing the opposite of what a template wants. The pnpm binary is usually the corepack shim, and corepack honors that field — so a machine with pnpm 12 installed globally ran 11.10.0 the moment it entered the project, and every generated app inherited the same downgrade. The pin is gone. engines.pnpm: ">=12" sets a floor that pnpm enforces locally, only-allow pnpm keeps blocking npm and yarn, and CI passes version: 12 to pnpm/action-setup, which had been reading the pin. pnpm 12 keeps 11's lockfile format, so nothing else moves.

Housekeeping

docs/handoff.md still described SDK 55 and pnpm 10 and pointed at placeholder paths; it is gone. docs/template-completion.md stays as the repo's own progress log but no longer ships to generated projects (CLI 0.0.9). patches/README.md now opens with a dated table of every patch added or removed — including the one-day expo patch from 0.0.4 — so the next person can see why each existed.

Already generated a project?

MIGRATION.md has rows for v0.0.7 and v0.0.8: the pnpm change is a two-line edit everyone should make; the extension is opt-in and the guide copies the files straight from this tag rather than asking you to retype them.


Warning

여전히 PoC 입니다. 0.0.x 는 API·구조 안정성을 약속하지 않습니다.

받는 쪽이 달라지는 변경 두 가지와 정리 한 번입니다.

iOS 리치 푸시 이미지

iOS 는 이미지가 든 푸시를 앱이 아니라 Notification Service Extension 에 넘깁니다. 이게 없으면 백그라운드·종료 상태에서 글만 뜨고 이미지는 빠집니다. 이번에 그 확장을 넣었습니다. targets/notification-service/ 는 참조 앱의 것을 그대로 복사했고, @bacons/apple-targets 가 prebuild 때 Xcode 타깃으로 만듭니다. 읽는 키는 fcm_options.image 로, 포그라운드 경로가 이미 쓰던 것과 같습니다.

템플릿의 기존 규칙을 따릅니다 — 폴더가 있으면 켜지고, 푸시가 켜진 상태에서만입니다. 폴더를 지우면 타깃도 사라지고, 푸시가 꺼져 있으면 폴더가 있어도 붙지 않습니다. 번들은 <bundleId>.ImageNotification 이고 실기 빌드에는 그 번들의 프로비저닝 프로필이 따로 필요합니다.

@bacons/apple-targets@4.0.6 은 타깃이 이미 있는 상태의 prebuild(--no-clean)에서 죽습니다 — 기존 build configuration list 를 지우는 루프가 자기가 돌고 있는 프로퍼티를 지워버립니다. patches/ 가 고칩니다. 업스트림에 같은 수정이 8월부터 리뷰 없이 열려 있고 5.0.0 도 같은 코드라, 들어올 것으로 가정하지 않고 버전을 올릴 때마다 재타깃하는 패치로 관리합니다. 지우는 조건은 patches/README.md 에 있습니다.

첫 실기 테스트에서 밟은 함정 하나: iOS 첨부는 JPEG·PNG·GIF 만 받습니다. placehold.co/600x400 은 .png 를 붙이지 않으면 SVG 를 주고, 알림은 이미지 없이 아무 에러도 없이 도착합니다. 확장과 포그라운드 경로가 같은 방식으로 실패합니다.

pnpm — 핀이 아니라 하한

packageManager: pnpm@11.10.0 은 템플릿이 원하는 것과 반대로 움직였습니다. pnpm 바이너리는 대개 corepack 심이고 corepack 은 이 필드를 따릅니다. 전역에 pnpm 12 를 깔아둔 머신이 프로젝트에 들어오는 순간 11.10.0 으로 돌았고, 생성된 앱도 전부 같은 다운그레이드를 물려받았습니다. 핀을 뺐습니다. engines.pnpm: ">=12" 가 하한이고(로컬에서 불일치면 pnpm 이 실패합니다), only-allow pnpm 이 npm·yarn 을 막고, 핀을 읽고 있던 CI 의 pnpm/action-setup 에는 version: 12 를 줍니다. pnpm 12 는 11 의 lockfile 형식을 그대로 쓰니 그 외에는 움직이는 게 없습니다.

정리

docs/handoff.md 는 여전히 SDK 55·pnpm 10 을 이야기하고 자리표시 경로를 가리키고 있어 지웠습니다. docs/template-completion.md 는 레포의 진행 기록으로 남지만 생성 프로젝트에는 더 이상 가지 않습니다(CLI 0.0.9). patches/README.md 는 넣고 뺀 패치 전부의 날짜별 표로 시작합니다 — 0.0.4 때 하루 살았던 expo 패치까지 — 다음 사람이 왜 있었는지 볼 수 있게.

이미 프로젝트를 만들었다면

MIGRATION.md 에 v0.0.7·v0.0.8 행이 있습니다. pnpm 변경은 두 줄 편집이라 모두에게 권하고, 확장은 선택이며 가이드는 손으로 옮겨 적지 않고 이 태그에서 파일을 그대로 받게 되어 있습니다.