This app demonstrates how to build an end-to-end user experience with Google ML Kit APIs that aligns with the new Material for ML design guidelines.
The goal is to make it as easy as possible to integrate ML Kit into your app with an experience that has been user tested:
- Visual search using the Object Detection & Tracking API - a complete workflow from object detection to product search using a live camera.
- Clone "showcase app" repo:
git clone https://github.com/firebase/mlkit-material-ios
. - Go to the
mlkit-material-ios/ShowcaseApp
directory, which contains thePodfile
, and install the pod dependencies by running the following command:pod install
. - Open the generated
ShowcaseApp.xcworkspace
file. - If you haven't already, create a Firebase project in the Firebase console, if you don't already have one.
- Add a new iOS app into your Firebase project with a new bundle ID similar to com.myfirstshowcaseapp.
- Download the
GoogleService-Info.plist
from the newly added app and add it to the ShowcaseApp project in Xcode. Remember to checkCopy items if needed
and selectCreate folder references
. - Select the project in the left navigtion panel of Xcode and uncheck
Automatically manage signing
option in theGeneral
tab, and choose your own provisioning file. - Build and run the app on a physical device (the simulator isn't recommended, as the app needs to use the camera on the device).
This app demonstrates live product search using the camera:
- Open the app and point the camera at an object of interest. The app draws a bounding box around the object it detects.
- By focusing on the object, the app triggers a product search to the server and displays the relevant results in the UI.
Note: the search data is mocked, since a real search backend has not been set up for this repository. However, it should be easy to configure your own search service (e.g. Product Search) by replacing the return values for APIKey
, productSearchURL
, and acceptType
in Models/FIRProductSearchRequest.m
.
© Google, 2019. Licensed under the Apache-2 license.