Repository navigation
feat(mobile): save images to the photo library - #2765
Merged
Merged
Conversation
XiaoMengXinX
force-pushed
the
feat-mobile-save-photo
branch
from
November 29, 2026 13:26
31674fa to
b36b266
Compare
oneo-me
force-pushed
the
feat-mobile-save-photo
branch
from
November 29, 2026 14:44
b36b266 to
a78db33
Compare
oneo-me
enabled auto-merge (rebase)
November 29, 2026 14:44
|
This pull request has no valid
Run the checks on the head commit, fill the block in the template, then push or edit the body: this label and comment update on their own. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oneo-me
force-pushed
the
feat-mobile-save-photo
branch
from
November 29, 2026 15:59
a78db33 to
3152647
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
mobile.SavePhoto(mobile.PhotoSaveOptions) to save an encoded image directly to the system photo library on iOS and Android without routing through the system file-export document picker.mobile/coremobile.PhotoSaveOptions(Name,MIME,Path,Data) andmobile.SavePhoto(cx, o, done)backed byScope.SavePhoto, gated underservicePicker.hostUntracked()other than iOS/Android, plus simulated web, watchOS, and tvOS), empty image inputs, and non-image media types before emitting a platform request; normalizeMIMEand sanitizeName.internal/platform/ios/photos.go)PHAccessLevelAddOnly) and add the staged file viaPHAssetCreationRequest+PHAssetResourceCreationOptions, preserving original format (including animated GIF) and filename.localIdentifierwhen available.internal/platform/android)ItemSaveFilewithSave.PhotothroughItemSavePhotoon the pipe (reusing Go-side staging/unstaging).MediaStore.Images(IS_PENDINGon API 29+, publicPictures+WRITE_EXTERNAL_STORAGEruntime prompt on API 28), cleaning up incomplete entries on error and returning thecontent://URI.classes.dexandclasses.jarare left for the release/runtime rebuild.nsgotest& DocsFileSave.Photoinnsgotestand allow returning a non-absolute library identifier/URI fromApp.SaveFilefor photo saves.mobile.SavePhotoindocs/architecture/services.md,docs/public/en/services.md,skills/nsgo/SKILL.md,docs/roadmap.md(HarmonyOS/TSX gap), andchangelog.d/save-photo.md.Targets
core,base,ui,tsx, thensgotool)Screenshots
None
Verification
a78db33a13bb8549e544ddcf58889b2d5505ba791d16f441dgo tool nsgo check -target ios,android_arm64,macos_arm64 -jobs 8 → 0go tool nsgo test → 1go tool nsgo test -run TestPublishedSiteLoadsFromACDNAndOpensRealLinks → 0failiOS simulator and device, Android emulator, Windows, Linux and browser CI jobs; the full run's only failure, TestPublishedSiteLoadsFromACDNAndOpensRealLinks, timed out under load and passes aloneChecklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.changelog.d/fragment, not inCHANGELOG.md.