Third party podspecs should only include required files
See original GitHub issueWe use GitHub Issues exclusively for tracking bugs in React Native.
- If you’re looking for help with your code, consider asking on Stack Overflow instead: http://stackoverflow.com/questions/tagged/react-native
- Want to know more about future plans? Check out the roadmap: https://github.com/facebook/react-native/wiki/Roadmap
- Have a feature request that is not covered in the roadmap? Submit it here: https://react-native.canny.io/feature-requests
Reporting bugs
Want to report a bug? Please read the bug reporting guidelines: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#bugs
Description
Use React Native with CocoaPods. But all #include <math.h>
(Like Yoga.h) throw a warning and go to find Math.h
from Folly and caused #include <limits>
not found (in this issue https://github.com/facebook/folly/issues/617 )
Reproduction Steps
Init react native project and use CocoaPods with Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
REACT_NATIVE = '../node_modules/react-native'
target 'Skyyer' do
pod "Yoga", path: "#{REACT_NATIVE}/ReactCommon/yoga"
pod 'DoubleConversion', podspec: "#{REACT_NATIVE}/third-party-podspecs/DoubleConversion.podspec"
pod 'GLog', podspec: "#{REACT_NATIVE}/third-party-podspecs/GLog.podspec"
pod 'Folly', podspec: "#{REACT_NATIVE}/third-party-podspecs/Folly.podspec"
pod 'React', path: REACT_NATIVE, subspecs: %w(
Core
CxxBridge
DevSupport
RCTActionSheet
RCTGeolocation
RCTImage
RCTLinkingIOS
RCTNetwork
RCTSettings
RCTText
RCTVibration
RCTWebSocket
)
end
Then build iOS project.
Solution
Create a new React Native project and compare the default project without pods to with pods.
Then exclude the files which is not listed in the default project from Folly.podspec
.
After only includes necessary files, the build passed
Additional Information
- React Native version: 0.45.1
- Platform: iOS
- Development Operating System: macOS
- Build tools: XCode
Files from default project I included finally:
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
This is still broken!! RN 0.49.3
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.