Description
Environment:
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 198.28 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.1.0 - ~/.nvm/versions/node/v10.1.0/bin/node
npm: 6.4.0 - ~/.nvm/versions/node/v10.1.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: ^16.5.0 => 16.5.2
react-native: ^0.57.1 => 0.57.1
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
Problem:
- integration react-native with Existing Apps like doc
(tip:This method uses cocoapods to integrate react) - increase a third party module, example react-native-qq, a third party module don't support cocoapods
- so, i have to drop the RCTQQAPI.xcodeproj into my project like this
- now, build it. i'll get a wrong.
'React/RCTViewManager.h' file not found
(tip: this wrong target in react-native-qq)
so who can tell me how to resolve it. i want to enjoy to manager my react-native by cocoapods.
i don't want to drop the react.xcodeproj to my project
package.json:
{
"name": "react-native-template",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "^16.5.0",
"react-native": "^0.57.1",
"react-native-qq": "^2.0.5",
}
}
Podfile:
platform :ios, '9.0'
use_frameworks!
target 'react-native-template' do
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
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
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
Template:
i provide a template to help u reproduce the problem. (https://github.com/EternalChildren/react-native-template)
because the module above needs some extrate configs. So i use a third party module named react-native-linear-gradient. I know it support pods. but i want to use it by the way in this demo
- clone the demo
- into the dir and npm install it
- then cd ios/ && pod install
- now it can reproduce the problem when u build it.
This problem has plagued me for many days. well i need help!
Thank you !!