Integration With Existing iOS Project failed: 'CSSLayout/CSSLayout.h' file not found
See original GitHub issueDescription
After upgrade to react-native@0.39, Integration With Existing Empty iOS Project failed, and old workaround "postinstall": "find ./node_modules/react-native \\( -name *.h -o -name *.m \\) -print0 | xargs -0 sed -i '' -e 's:<CSSLayout/\\(.*\\)>:\"\\1\":g'"
doesn’t work now
react-native@0.38 works just fine
Reproduction
- create an empty iOS project with swift
- follow the official guide of integration with existing app
- try run iOS app and then failed
Additional Information
- React Native version: 0.39
- Platform: iOS
- Operating System: MacOS Sierra 10.12.1
- CocoaPods: 1.1.1
Issue Analytics
- State:
- Created 7 years ago
- Reactions:12
- Comments:5 (3 by maintainers)
Top Results From Across the Web
objective c - .h file not found - Stack Overflow
Every time I make a new class (any type of class, ViewController, NSObject, etc.) and import it in another .m file I get...
Read more >App Won't Compile with Embedded Third Party Framework
"Build succeeds" but the app won't run and Xcode spits out an error: ... This sounds like the framework is missing its Info.plist...
Read more >Integration Unity as a library in native iOS app
Native application implements NativeCallsProtocol defined in following file. find and select Unity-iPhone / Libraries / Plugins / iOS / ...
Read more >Create a Login with Amazon Project
If you do not yet have an app project for using Login with Amazon, you should create one now. If you have an...
Read more >Integration with Existing Apps - React Native
Perform a “Sync Project files with Gradle” operation. If you are using Android Studio, use Alt + Enter to add all missing imports...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I wrote a
post_install
function to handle this issue, along with #11502 (only tested on React Native 0.39.2)Use as follows:
Hope that helps unblock others on 0.39.2!
Also: I first tried the “add a header search path” version. It builds the library fine, but broken when building the Swift module/bridge. It might be fine for objc projects though, so here’s the code if it’s useful to anyone:
Then you can
cat /Users/joshua/dev/work/Taxfix/taxfix-ios/Pods/Target\ Support\ Files/React/React.xcconfig
to verify it’s there afterward.I bumped into this same issue with the react-native-youtube library when trying to upgrade to 0.39.x. See https://github.com/inProgress-team/react-native-youtube/issues/88