question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Third party podspecs should only include required files

See original GitHub issue
**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 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:

2017-06-21 17 41 21

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Pranit-Harekarcommented, Oct 10, 2017

This is still broken!! RN 0.49.3

1reaction
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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to automatically install 3rd party frameworks from Podspec
I have done proper pushing of PodA to Podspecs repo, proper tagging, and proper Podspecs file. PodA has a dependency on a public...
Read more >
Optimize your iOS projects creating binaries Frameworks
Hello again developer friend! In this opportunity I would like to explain how to set up Cocoapods to distribute your project.
Read more >
How to Use a Third Party Framework in a Private CocoaPod
After you obtain the framework using the installer, you can include only a reference to that framework in your pod: s.frameworks = 'TelerikUI'....
Read more >
Creating a CocoaPod - Use Your Loaf
Before you can add a library to the CocoaPod repository it must have a valid license file. There are a lot of useful...
Read more >
CocoaPods - NSHipster
This allows the original xcodeproj file to remain unchanged. Subsequent invocations of pod install will add new pods or remove old pods ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found