Интеграция React Native в существующий Native iOS, получение ошибки установки модуля - PullRequest
2 голосов
/ 13 июля 2020

Я пытаюсь установить модуль в приложение iOS со следующими данными файла модуля -

source 'https://github.com/CocoaPods/Specs.git'

# Required for Swift apps
platform :ios, '9.0'
use_frameworks!

# The target name is most likely the name of your project.
target 'EmbedRN' do
  # Your 'node_modules' directory is probably in the root of your project,
  # but if not, adjust the `:path` accordingly
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # needed for debugging
    # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

end

получение ошибки установки модуля -

установка модуля Анализ зависимостей Получение модуля c для DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConv ersion.podspec Fetching podspe c for Folly from ../node_modules/react-native/third-party-podspecs/Folly.podspec Fetching podspe c for glog from ../node_modules/react-native/third-party-podspecs/glog.podspec

[!] CocoaPods не может найти совместимые версии для pod "React / Core": В Podfile: React / Core (из ../node_modules/react-native)

Ни один из ваших источников spe c не содержит spe c, удовлетворяющего зависимости: React/Core (from .. / node_modules / rea ct-native ).

У вас есть:

  • устаревшие исходные репозитории, которые вы можете обновить с помощью pod repo update или pod install --repo-update .
  • неправильно набрал имя или версию.

Пакет. json содержимое файла -

{
  "name": "EmbedRN",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "react": "16.13.1",
    "react-native": "0.63.0"
  }
}

Структура проекта - введите описание изображения здесь

...