2c1e1c7ca5
Photos/Files bug: the lightbox download handed nativeSaveFile a bare "/files/<id>" with no name, extension, or mime. Empty mime made bzSaveToPhotos short-circuit as "notmedia" — so saveToAlbum (and its permission prompt) never ran, and the image landed in the generic Files folder as an extension-less blob. Now nativeSaveFile trusts the server's Content-Type when the mime is unknown and appends a real extension (bzExtForMime/bzEnsureExt), so images reach the Images folder AND Photos. File preview: replace the @capacitor/share "share sheet" open with a new native FileOpener plugin (QLPreviewController). bzOpenFile now prefers a real Quick Look preview and only falls back to the share sheet if the plugin isn't in the build. Wired file-opener into mobile/package.json and the codemagic SPM diagnostics loop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
23 lines
662 B
Swift
23 lines
662 B
Swift
// swift-tools-version: 5.9
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "FileOpener",
|
|
platforms: [.iOS(.v15)],
|
|
products: [
|
|
.library(name: "FileOpener", targets: ["FileOpenerPlugin"])
|
|
],
|
|
dependencies: [
|
|
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "FileOpenerPlugin",
|
|
dependencies: [
|
|
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
.product(name: "Cordova", package: "capacitor-swift-pm")
|
|
],
|
|
path: "ios/Sources/FileOpenerPlugin")
|
|
]
|
|
)
|