Skip to content

Instantly share code, notes, and snippets.

@MapaX
Created May 4, 2021 13:14
Show Gist options
  • Save MapaX/8c9b47b1683ef188eaf30d8b2d9d03f1 to your computer and use it in GitHub Desktop.
Save MapaX/8c9b47b1683ef188eaf30d8b2d9d03f1 to your computer and use it in GitHub Desktop.
Package description for swiftpm version of Google ML Vision
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "MLKitVisionPackage",
platforms: [
.iOS(.v10),
],
products: [
.library(
name: "MLKitVisionPackage",
targets: [
"MLKitVisionTarget"
])
],
dependencies: [
//.package(name: "Promises", url: "https://github.com/google/promises.git", "1.2.8" ..< "1.3.0"),
.package(name: "GTMSessionFetcher", url: "https://github.com/google/gtm-session-fetcher.git", .exact("1.5.0")),
],
targets: [
.target(
name: "MLKitVisionTarget",
dependencies: [
.target(name: "GoogleUtilities"),
.target(name: "GoogleToolboxForMac"),
.target(name: "GoogleUtilitiesComponents"),
.target(name: "Protobuf"),
.target(name: "MLKitCommon"),
.target(name: "MLKitTextRecognition"),
.target(name: "MLKitVision"),
.target(name: "FBLPromisesFramework"),
//.product(name: "FBLPromises", package: "Promises"),
.product(name: "GTMSessionFetcherFull", package: "GTMSessionFetcher"),
]
),
.binaryTarget(name: "GoogleToolboxForMac",
path: "GoogleToolboxForMac.xcframework"),
.binaryTarget(name: "GoogleUtilities",
path: "GoogleUtilities.xcframework"),
.binaryTarget(name: "GoogleUtilitiesComponents",
path: "GoogleUtilitiesComponents.xcframework"),
.binaryTarget(name: "Protobuf",
path: "Protobuf.xcframework"),
.binaryTarget(name: "MLKitCommon",
path: "MLKitCommon.xcframework"),
.binaryTarget(name: "MLKitTextRecognition",
path: "MLKitTextRecognition.xcframework"),
.binaryTarget(name: "MLKitVision",
path: "MLKitVision.xcframework"),
.binaryTarget(name: "FBLPromisesFramework",
path: "FBLPromises.xcframework"),
]
)
@MapaX
Copy link
Author

MapaX commented Dec 19, 2023

@Yusufkhujaev This was done for vendor, so I cannot share the full project.
Also the vendor has now moved to use the Apples own Vision package so I don't know how this works with new version. It works better than this google version and it does not need so much maintenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment