Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third party podspecs should only include required files #14654

Closed
david50407 opened this issue Jun 21, 2017 · 6 comments
Closed

Third party podspecs should only include required files #14654

david50407 opened this issue Jun 21, 2017 · 6 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@david50407
Copy link

**Issues that do not describe a bug or do not fill out the template below will be closed**

We use GitHub Issues exclusively for tracking bugs in React Native.

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 facebook/folly#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:

2017-06-21 17 41 21

@sivakumar-cf
Copy link

@david50407 Can you Please share the updated excluded files Folly.podspec file?

@mhorowitz
Copy link
Contributor

Have you tried to update past f3f44ee to see if the problem is fixed for you? This effectively remove all header files from the third party podspecs.

@ragnorc
Copy link

ragnorc commented Jul 7, 2017

#14326

@ghuh
Copy link

ghuh commented Aug 28, 2017

This is still broken on RN 0.47.2 which include f3f44ee

@Pranit-Harekar
Copy link

This is still broken!! RN 0.49.3

@stale
Copy link

stale bot commented Dec 9, 2017

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.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 9, 2017
@stale stale bot closed this as completed Dec 16, 2017
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

6 participants