Installation
Requirements
- Capacitor 5.0+
- iOS 13.0+
- Android API Level 21+ (Android 5.0 Lollipop and above)
- Node.js 16+
Capacitor Installation
Add the package to your Capacitor project:
npm install @getpassage/capacitor
iOS Platform Setup
If you haven't added the iOS platform yet:
# Add iOS platform
npx cap add ios
# Sync the plugin
npx cap sync ios
If you already have the iOS platform:
# Just sync the new plugin
npx cap sync ios
Android Platform Setup
1. Configure Maven Repository
The Passage SDK uses JitPack for distribution. Add the JitPack repository to your Android project:
Open android/build.gradle (the project-level file) and add JitPack to the repositories:
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' } // Add this line
}
}
Alternatively, if you're using the newer repository configuration in android/settings.gradle:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' } // Add this line
}
}
2. Add Android Platform
If you haven't added the Android platform yet:
# Add Android platform
npx cap add android
# Sync the plugin
npx cap sync android
If you already have the Android platform:
# Just sync the new plugin
npx cap sync android
Verification
To verify the installation was successful, you can check if the plugin is properly registered by importing it in your project:
import { open } from '@getpassage/capacitor';
// This should not throw any errors
console.log('Passage Capacitor SDK loaded successfully');
That's it! The package is now installed and ready to use in your Capacitor application.
Next Steps
Continue to the Integration Guide to learn how to implement the Passage SDK in your application.