d-date / google-mlkit-swiftpm

Google MLKit for iOS in Swift Package Manager
Apache License 2.0
92 stars 21 forks source link
cocoapods google-ml-kit ios mlkit swift swiftpm

Google MLKit SwiftPM Wrapper

This is experimental project for building MLKit in Swift Package Manager.

Requirements

Installation

Use Swift Package Manager to install

    .package(url: "https://github.com/d-date/google-mlkit-swiftpm", from: "5.0.0")

Add Linker flags

Add these flags to Other Linker Flags in Build Settings of your Xcode projects.

Link .bundle to your project

The MLKitFaceDetection contains GoogleMVFaceDetectorResources.bundle. Since the bundle can't be introduced via Swift PM, you need to link to your project by yourself.

Download GoogleMVFaceDetectorResources.bundle from Release and add to your Xcode project and make it available in your build target.

Limitation

Example

Open Example/Example.xcworkspace and fixing code signing to yours.