Sign up for a Fritz AI plan to get started with machine learning in your apps.
Add the Fritz SDK to your app using the following instructions. Before you add the SDK, you'll need to create a project.
You'll need the following before you can begin:
- Xcode 10.3 or later.
- Xcode project targeting iOS 10 or above. You will only be able to use features in iOS 11+, but you still can include Fritz in apps that target iOS 10+ and selectively enable for users on 11+.
- Swift projects must use Swift 5.0 or later.
- CocoaPods 1.6.0 or later.
- The bundle identifier of your app.
1. Add the SDK via CocoaPods
- Create a Podfile if you don't have one: :code:
$ pod init.
- Open your Podfile and add: :code:
$ pod 'Fritz'.
- Save the file and run: :code:
$ pod install.
This creates a .xcworkspace file for your app. Use this file for all future development on your application.
2. Make sure your app is registered
After creating a project, you must register your app. If you have not done so, you can add an app from the Project Overview page.
3. Add Fritz-Info.plist to your app
Add the Fritz-Info.plist file to your app. Make sure to include it in all targets.
If you do not have the Fritz-Info.plist file, you can download it from the Project Settings page for your project. Click the plus button on the appropriate app and download.
4. Initialize in AppDelegate
Initialize the SDK in your AppDelegate. Afterward you’ll be able to use features or add your own custom models.
1. Add the SDK
You can add the SDK in your
Add our repository in order to download libraries:
Add the gradle dependencies:
2. Add Internet Permissions to Android Manifest
Edit your app's
AndroidManifest.xml to include INTERNET permissions. The model will always run offline and on-device. We require internet permissions to collect performance metrics on the models and improve them over time so that your app always runs smoothly.
3. Initialize the SDK onCreate
In your Application or MainActivity class, initialize SDK.
To find your API Key, go to the webapp "Your Project > Project Settings > Your App > Show API Key"