uniapp-native-plugin
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen to use this skill
何时使用本技能
Use this skill whenever the user wants to:
- Develop native Android plugins
- Develop native iOS plugins
- Integrate native functionality into uni-app
- Create custom native modules
- Extend uni-app with native capabilities
- Handle native plugin communication
- Package and distribute native plugins
当用户有以下需求时,可使用本技能:
- 开发Android原生插件
- 开发iOS原生插件
- 为uni-app集成原生功能
- 创建自定义原生模块
- 借助原生能力扩展uni-app
- 处理原生插件通信
- 打包并分发原生插件
How to use this skill
如何使用本技能
To develop native plugins:
-
Identify the platform from the user's request:
- Android → Use Android plugin examples
- iOS → Use iOS plugin examples
-
Load the appropriate example file from thedirectory:
examples/- - Native plugin development guide
examples/guide/ - - Android plugin examples
examples/android-plugin/ - - iOS plugin examples
examples/ios-plugin/
-
Load the appropriate template from thedirectory:
templates/- - Plugin development templates
templates/plugin-template.md
-
Follow the specific instructions in those files for development
开发原生插件的步骤:
-
根据用户需求确定平台:
- Android → 使用Android插件示例
- iOS → 使用iOS插件示例
-
从目录加载对应的示例文件:
examples/- - 原生插件开发指南
examples/guide/ - - Android插件示例
examples/android-plugin/ - - iOS插件示例
examples/ios-plugin/
-
从目录加载对应的模板:
templates/- - 插件开发模板
templates/plugin-template.md
-
按照这些文件中的具体说明进行开发
Examples and Templates
示例与模板
Examples
示例
Located in :
examples/- guide/ - Native plugin development guide
- android-plugin/ - Android plugin development examples
- ios-plugin/ - iOS plugin development examples
位于目录下:
examples/- guide/ - 原生插件开发指南
- android-plugin/ - Android插件开发示例
- ios-plugin/ - iOS插件开发示例
Templates
模板
Located in :
templates/- plugin-template.md - Plugin development templates
位于目录下:
templates/- plugin-template.md - 插件开发模板
Best Practices
最佳实践
- Follow platform guidelines: Adhere to Android and iOS development standards
- Error handling: Implement proper error handling and logging
- Documentation: Provide clear documentation for plugin usage
- Testing: Test plugins thoroughly on real devices
- 遵循平台规范:严格遵守Android和iOS的开发标准
- 错误处理:实现完善的错误处理与日志记录
- 文档编写:提供清晰的插件使用文档
- 测试环节:在真实设备上对插件进行全面测试
Resources
资源
- Official Documentation: https://nativesupport.dcloud.net.cn/NativePlugin/
Keywords
关键词
native plugin, 原生插件, Android插件, iOS插件, plugin development, native module
native plugin, 原生插件, Android插件, iOS插件, plugin development, native module