Skip to content

fix(ios): complete photo and video copies asynchronously and truthfully - #152

Closed
OskarEichler wants to merge 1 commit into
birdofpreyru:masterfrom
OskarEichler:codex/rnfs-apple-photos
Closed

fix(ios): complete photo and video copies asynchronously and truthfully#152
OskarEichler wants to merge 1 commit into
birdofpreyru:masterfrom
OskarEichler:codex/rnfs-apple-photos

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 27, 2026

Copy link
Copy Markdown

Fixes

Remove the unbounded dispatch-group wait from video copying; complete within the PhotoKit callback; reject missing/non-file assets and PhotoKit/copy errors; check image encoding and atomic-write results.

Compatibility / breaking changes

No signature changes. Failed asset copies now reject instead of hanging or reporting success. AVAsset results without a file URL are explicitly rejected; this does not add composition export support. The native module queue is no longer blocked while PhotoKit fetches a video.

Verification

Actual video method with Foundation/PhotoKit doubles covers delayed success, missing asset, non-URL asset, PhotoKit error and copy failure. A recording dispatch-wait shim avoids hanging the baseline diagnostic and confirms its blocking path; the fixed implementation has no wait and all 5 cases pass. Actual iOS Simulator SDK compilation passes. No real photo-library/iCloud/device test is claimed.

Shared verification

yarn test (ESLint + TypeScript), yarn prepare (module/declarations), and git diff --check pass for the combined review checkout. React Doctor reports 100/100 for the changed JS scope. Native checks are described above; no physical-device, signed-release or production verification is claimed. No checked-in test/spec files were changed. Isolated diagnostics were run outside the repository. Consumer verification at immutable combined pin eb4ee67 (RN 0.87.1): immutable install and lint, both Android Debug flavors, both iOS Simulator Debug schemes, four release-mode Metro bundles, 13 production web builds and four browser-extension builds pass. All 72 installed non-metadata files match reviewed source/rebuilt artifacts. Windows SDK/runtime remains unverified.

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