小编Leo*_*tim的帖子

如何预先构建 React Native pod,或者,有没有办法在 Podfile 中使用远程 React Native pod?

目前,我在现有的 iOS 项目中实现了一个 ReactNative 模块。到目前为止,该项目运行良好,但构建时间显着增加,因为 xcode 每次构建都会重新编译每个 React 库。我尝试使用cocoapods-binary来预构建 React pod,但是,此插件不适用于本地 pod。

这是我的 Podfile:

platform :ios, "10.0"

plugin 'cocoapods-binary'

# Path to node_modules directory
$node_modules_path = "../../react-native-pojects/node_modules"

require_relative "#{$node_modules_path}/@react-native-community/cli-platform-ios/native_modules"

project "native-project",
  "Debug" => :debug,
  "Homolog" => :release,
  "Release" => :release

target "native-project" do
  
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # React Native pods
  pod "FBLazyVector", :path => "#{$node_modules_path}/react-native/Libraries/FBLazyVector"
  pod "FBReactNativeSpec", :path => "#{$node_modules_path}/react-native/Libraries/FBReactNativeSpec"
  pod "RCTRequired", :path => "#{$node_modules_path}/react-native/Libraries/RCTRequired"
  pod "RCTTypeSafety", …
Run Code Online (Sandbox Code Playgroud)

facebook ios cocoapods react-native

6
推荐指数
0
解决办法
667
查看次数

按下导航后退按钮时如何调用功能?

当我按下后退按钮时,我需要调用一个函数.优选地,不必创建另一个按钮

uinavigationcontroller ios swift

4
推荐指数
2
解决办法
1353
查看次数