Add QR scanner support for macOS with camera selection

- Refactor QR scanner into separate Scanner module for iOS and macOS
- Add camera selection menu for devices with multiple cameras
- Use Vision framework for QR detection on macOS
- Remove tvOS QR scanner support (continuity camera)
- Add camera entitlement and usage description for macOS
- Fix minor issues in Intents and ExtensionProvider
This commit is contained in:
世界
2026-01-01 18:18:03 +08:00
parent 251a79f5d7
commit e2c378d42b
15 changed files with 687 additions and 108 deletions
-17
View File
@@ -9,7 +9,6 @@
/* Begin PBXBuildFile section */
3A017F922A4AB2E4009149FA /* GRDB in Frameworks */ = {isa = PBXBuildFile; productRef = 3A017F912A4AB2E4009149FA /* GRDB */; };
3A096F8F2A4ED3DE00D4A2ED /* Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3A096F862A4ED3DE00D4A2ED /* Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
3A1E8E692EDEC1AF00ADD104 /* CodeScanner in Frameworks */ = {isa = PBXBuildFile; productRef = 3A1E8E682EDEC1AF00ADD104 /* CodeScanner */; };
3A2E87F22ED5A91100644195 /* Runestone in Frameworks */ = {isa = PBXBuildFile; productRef = 3A2E87F12ED5A91100644195 /* Runestone */; };
3A2E87FB2ED5ABDA00644195 /* TreeSitterJSON5Runestone in Frameworks */ = {isa = PBXBuildFile; productRef = 3A2E87FA2ED5ABDA00644195 /* TreeSitterJSON5Runestone */; };
3A3AA7FC2A4EFDAE002F78AB /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AEC211D2A459B4700A63465 /* Library.framework */; };
@@ -564,7 +563,6 @@
files = (
3A4EAD1B2A4FEB02005435B3 /* Library.framework in Frameworks */,
3A4A020D2B53E3DC004EFB87 /* QRCode in Frameworks */,
3A1E8E692EDEC1AF00ADD104 /* CodeScanner in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -803,7 +801,6 @@
name = ApplicationLibrary;
packageProductDependencies = (
3A4A020C2B53E3DC004EFB87 /* QRCode */,
3A1E8E682EDEC1AF00ADD104 /* CodeScanner */,
);
productName = ApplicationLibrary;
productReference = 3A4EAD102A4FEAE6005435B3 /* ApplicationLibrary.framework */;
@@ -1140,7 +1137,6 @@
3A2E87F02ED5A91100644195 /* XCLocalSwiftPackageReference "Frameworks/Runestone" */,
3A2E87F92ED5ABCF00644195 /* XCLocalSwiftPackageReference "Frameworks/TreeSitterJSON5" */,
3ACE5E012EE1A91100644196 /* XCRemoteSwiftPackageReference "CodeEditSourceEditor" */,
3A1E8E672EDEC1AF00ADD104 /* XCRemoteSwiftPackageReference "CodeScanner" */,
);
productRefGroup = 3AEC20C72A45991900A63465 /* Products */;
projectDirPath = "";
@@ -2750,14 +2746,6 @@
minimumVersion = 6.15.1;
};
};
3A1E8E672EDEC1AF00ADD104 /* XCRemoteSwiftPackageReference "CodeScanner" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/twostraws/CodeScanner.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.5.2;
};
};
3A4A020B2B53E3DC004EFB87 /* XCRemoteSwiftPackageReference "qrcode" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/dagronf/qrcode.git";
@@ -2798,11 +2786,6 @@
package = 3A017F902A4AB2E4009149FA /* XCRemoteSwiftPackageReference "GRDB" */;
productName = GRDB;
};
3A1E8E682EDEC1AF00ADD104 /* CodeScanner */ = {
isa = XCSwiftPackageProductDependency;
package = 3A1E8E672EDEC1AF00ADD104 /* XCRemoteSwiftPackageReference "CodeScanner" */;
productName = CodeScanner;
};
3A2E87F12ED5A91100644195 /* Runestone */ = {
isa = XCSwiftPackageProductDependency;
package = 3A2E87F02ED5A91100644195 /* XCLocalSwiftPackageReference "Frameworks/Runestone" */;
@@ -46,15 +46,6 @@
"version" : "0.12.1"
}
},
{
"identity" : "codescanner",
"kind" : "remoteSourceControl",
"location" : "https://github.com/twostraws/CodeScanner.git",
"state" : {
"revision" : "5e886430238944c7200fc9e10dbf2d9550dba865",
"version" : "2.5.2"
}
},
{
"identity" : "grdb.swift",
"kind" : "remoteSourceControl",