mrousavy / vision-camera-plugin-builder

Native boilerplate for Vision Camera plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vision Camera Plugin Builder

Vision Camera Plugin Builder logo
A CLI to easily create VisionCamera Frame Processor Plugins in a few seconds!

πŸš€ Usage

npx vision-camera-plugin-builder ios
npx vision-camera-plugin-builder android

After generating native files, cli will output additional post-setup info

Supported versions

vision-camera-plugin-builder react-native-vision-camera
>= 0.5.0 3.5.0+
>= 0.3.0 3.0.0+
< 0.3.0 2.0.0+

Library use case

For vision-camera-<pluginName>, it generates:

  • Android - inside Android source set:
    β”œβ”€β”€ android/src/main/<packageName>
    β”‚   β”œβ”€β”€ <pluginName>
    β”‚   β”œβ”€β”€   β”œβ”€β”€ <pluginName>Plugin.(java|kt)
    β”‚   β”œβ”€β”€ <pluginName>PluginPackage.(java|kt)
    
  • iOS - inside iOS library's source code folder:
    β”œβ”€β”€ ios
    β”‚   β”œβ”€β”€ <pluginName>
    β”‚   β”œβ”€β”€   β”œβ”€β”€ <pluginName>Plugin.(m|mm)
    β”‚   β”œβ”€β”€   β”œβ”€β”€ <pluginName>Plugin.Swift (if Swift selected)
    

In case of library use case the CLI will output how to proceed with additional steps for library's .podspec and build.gradle files

Application use case

For local usage inside application, it generates:

  • Android - inside Android source set:
    β”œβ”€β”€ android/src/main/<packageName>
    β”‚   β”œβ”€β”€ <pluginName>
    β”‚   β”œβ”€β”€   β”œβ”€β”€ <pluginName>Plugin.(java|kt)
    β”‚   β”œβ”€β”€   β”œβ”€β”€ <pluginName>PluginPackage.(java|kt)
    
  • iOS - inside iOS library's source code folder:
    β”œβ”€β”€ ios
    β”‚   β”œβ”€β”€ <pluginName>
    β”‚   β”œβ”€β”€   β”œβ”€β”€ <pluginName>Plugin.(m|mm)
    β”‚   β”œβ”€β”€   β”œβ”€β”€ <pluginName>Plugin.Swift (if Swift selected)
    

In case of application use case the CLI will output how to proceed with additional steps for Android application linking of the plugin's package

βš™οΈ Options

Flag Input Description
--projectPath (iOS only) [string] Path to .xcodeproj file
--manifestPath (Android only) [string] Path to project's Android Manifest file
--pluginName [string] Name of the plugin
--methodName [string] Name of plugin's exported method
--lang [choices] "Kotlin" or "Java" for Android & "Swift" or "ObjC" or "ObjCPP" for iOS

License

MIT

About

Native boilerplate for Vision Camera plugins

License:MIT License


Languages

Language:TypeScript 92.9%Language:JavaScript 6.9%Language:Batchfile 0.1%