c2-mobile v0.1.4
c2-mobile
c2移动端基础组件库
说明
1、内置添加的第三方库
- @react-native-firebase/storage 官网文档
ios需要运行 npx pod-install ->待验证
Installation
npm install c2-mobile
Usage
import { multiply } from 'c2-mobile';
// ...
const result = await multiply(3, 7);
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
c2-mobile.podspec 关联脚本 ios/c2-mobile.rb 已弃用
鉴于react-native 0.7.2 不能自动连接、安装c2-mobile package.json 中dependence 原生模块,c2-mobile.podspec 会对第三方依赖进行拷贝【检测到主工程package.json代码未包含相关依赖时才会拷贝】 c2-mobile.rb 的创建解决copy、安装第三方可复用性的问题【.podspec文件不能置入方法需,但可引用ruby脚本】
c2-mobile iOS依赖第三方RN 插件的自动引入处理
添加 postinstall 将在@react-native-community/cli-platform-ios/native_modules.rb 中扩展注入c2-mobile 依赖,postinstall 判断了操作系统,只有在Mac os下才执行
c2-mobile 注入了两句代码
require_relative '../../../../ios/c2-inject.rb'
inject_c2_depends(packages)
c2-inject.rb 将会在pod install 时注入c2-mobile 的依赖包,依赖包的配置文件在ios/c2-third.json文件之中
关于 c2-third.json 的依赖获取
在example 项目中添加依赖包【c2-mobile-base根目录的package.json dependencies 的的依赖项】, cd 至example文件夹 并执行 react-native config
, 此时将打印出原生依赖的json内容。复制json内容的dependencies至 c2-third.json文件即可
iOS 部分功能未为间接引用以下功能,直接拷贝第三方插件源码至pod 仓库
- react-native-background-timer源码拷贝
RNBackgroundTimer.h
RNBackgroundTimer.n
## 相机相关组件
使用第三方组件。由于react-native-camera过时,因此替换成如下组件,相关文档请查看官网api
[react-native-vision-camera](https://www.react-native-vision-camera.com)
1 month ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
5 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
5 months ago
7 months ago
5 months ago
7 months ago
5 months ago
6 months ago
6 months ago
6 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
7 months ago
7 months ago
6 months ago
9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
7 months ago
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
4 years ago