Petnow LogoPetnow

Example Apps

Open-source iOS, Android, React Native, and Flutter apps that show the SDK 1.6.0 integration flow, prewarm included.

The petify-sdk-examples repository has the same example app for iOS, Android, React Native, and Flutter, plus an optional example server.

FolderPlatformSDK
ios/iOS 16.4+, SwiftUIpetnow.ui 1.6.0
android/Android 9+ (API 28), Jetpack Composeio.petnow:ui:1.6.0
react-native/React Native 0.76, New Architecture@petify/react-native-camera-ui 1.6.0
flutter/Flutter 3.41+petnow_camera_ui 1.6.0
server/Node.js 22+Optional example server that holds the Secret key

The flow

Every app has four screens: home → capture guide → camera → result. Comments numbered ①–⑤ mark the same steps in all four:

StepWhere
①Prewarm when the guide appearsGuide screen
②Guide the user from detection feedback, not from the preview appearingCamera screen
③Retry with startDetection() without reopening the cameraCamera screen
④releasePrewarmed() when the user returns homeHome
⑤Check whether the prewarm took (engineReused)Result screen

Each app runs in one of two modes:

  • Camera-only (a Client key only): the app opens an identification capture session and captures. Nothing is uploaded.
  • Server mode (a Client key plus server/): the app can also register, verify (1:1), and identify (1:N) a pet. Home lists the pets you registered; tap one to verify it. The app sends the images to the example server, which holds the Secret key and calls the Server API.

Run them

Each folder's README has the full build guide. In short, you need from the Petify Console, under Integration → API & SDK:

  1. API keys. Apps hold a Client key (app) only (SDK 1.5.0+). The Secret key (server) goes only into the example server, and only if you want to register, verify, and identify. See key types. Each app reads its key from a git-ignored local file created from a template.
  2. An AWS CodeArtifact key, for downloading the SDK. The SDK is not in the repository: each app downloads it the way iOS, Android, and React Native Getting Started describe. The Flutter package is a zip in CodeArtifact; flutter/README.md has the command.

The apps run against the production backend. Use a physical device: the camera does not run in the iOS simulator or most emulators.

Shortcuts not to copy into production

  • Camera-only mode creates its capture session from the app. A Client key may do that, but in production your server creates sessions and sends the app only the session ID.
  • The example server is for development. It runs plain HTTP on your local network behind a token. In server mode a registration is a real pet in your account; the server deletes it when a registration is abandoned. Put this logic in your own backend, behind your own authentication and HTTPS.

On this page