@infilectcapacitor/capacitor-infiviz-shots
v1.0.2
Published
Capacitor plugin for InfivizShotSDK (iOS & Android)
Readme
Capacitor InfivizShots Plugin
A Capacitor plugin to bridge the InfivizShotSDK (Android & iOS) to your Capacitor app.
Install
npm install ./capacitor-infiviz-shots
npx cap synciOS Integration
- Add your InfivizShotSDK to
ios/Plugin/(as a framework or via CocoaPods in the Podfile). - Open the iOS project in Xcode (
npx cap open ios). - Make sure the SDK is linked in the plugin target.
- Implement the native methods in
InfivizShotsPlugin.swift.
Android Integration
- Add your InfivizShotSDK to
android/src/main/java/or as a dependency. - Ensure proper permissions in
AndroidManifest.xml. - The plugin automatically handles camera permissions and activity results.
Usage
import { InfivizShots } from 'capacitor-infiviz-shots';
// Example usage
const result = await InfivizShots.fetchUniversalSessionId({ tempID: 'abc' });
console.log(result.sessionId);
// Listen for events
InfivizShots.addListener('SyncEvent', (payload) => {
console.log('Sync event:', payload);
});Development
- Implement your native bridge in
ios/Plugin/InfivizShotsPlugin.swift. - Update TypeScript definitions in
src/definitions.ts. - Build with
npm run build.
