Coder Social home page Coder Social logo

react-native-simple's Introduction

react-native-simple

RN 使用远程pod集成

文件说明

0.63.2 📁 对应react-native 0.63.2 版本
0.61.0 📁 对应react-native 0.61.0 版本
0.61.0-rc.0 📁 对应react-natice 0.61.0-rc.0 版本
0.60.4 📁 对应react-natice 0.60.4 版本

使用说明

在Podfile中增加如下源和依赖

source 'https://github.com/xcuYao/PrivatePods.git'
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

pod 'RNFramework', '0.1.10'

⚠️ 0.1.0(rn 0.60.4)不支持use_framework!
🐙 0.1.1(rn 0.61.0-rc.0)支持
🐙 0.1.2(rn 0.61.0)支持
🐙 0.1.10(rn 0.63.2)支持

对于常规的react-native项目 我们一般需要在iOS项目的Podfile中增加类似一堆依赖

  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  ...

从本地的目录(一般为上级node_modules/react-native)中读取依赖
这个项目将依赖(podspec)拆到远端私有源
并封装在RNFramewrok中 这样就解耦了依赖
方便集成项目,而且公共部分也方便统一处理,新老项目也可快速接入

具体使用参考示例工程

其他

0.60.4版本不支持use_framework!
0.61.0-rc.0已解决
具体可以参考讨论官方说明

react-native-simple's People

Contributors

xcuyao avatar dependabot[bot] avatar

Stargazers

 avatar emmm avatar Michael avatar li kunkun avatar

Watchers

 avatar

Forkers

krmao

react-native-simple's Issues

安装问题

有个疑问,当我执行pod install的时候,由于每个模块的source都是指向RN的仓库,这么操作,会不会导致RN会下载很多遍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.