iOS: podspec fails with use_frameworks! :linkage => :dynamic (SPM integration) - please migrate to install_modules_dependencies

オープン 初心者向け
#1,270 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ios, react-native, ruby

調査の方向性

リポジトリルートの podspec (react-native-fs.podspec) から始め、レガシーな s.dependency "React-Core" 行を見つけてください。それを install_modules_dependencies(s) に置き換えます。リンクされた React Native の new_architecture.rb ヘルパーと issue の例のパッチに従ってください。pod install を実行し、use_frameworks! :linkage => :dynamic でアプリをビルドして検証してください。完了とは、podspec が React-Core を直接宣言しなくなり、動的フレームワークのビルドが React シンボルをリンクすることです。

索引モデルが issue の本文から書いたものです。

説明

Summary

The podspec still declares the legacy s.dependency "React-Core". When an app builds with use_frameworks! :linkage => :dynamic — required for React Native's SPM integration path (spm_dependency), which is becoming the default as CocoaPods trunk goes read-only — the pod fails to link React symbols with RN >= 0.81 (prebuilt React-Core).

Proposed fix

React Native ships an official helper that handles both static and dynamic linkage correctly:

install_modules_dependencies(s)

Replacing the React-Core dependency with this helper is backward compatible with static linkage and is the pattern used by react-native's own libraries.

Reference: https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/cocoapods/new_architecture.rb

Example patch

We maintain a patch for our own builds here, in case it helps: https://github.com/AsteriskZuo/react-native-chat-library/tree/5.x/docs/troubleshooting/patches

Thanks for the great library!

主要言語
C++
スター
5k
フォーク
1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

itinance/react-native-fs のほかの issue

itinance/react-native-fs の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。