Add troubleshooting content about swift errors in React Native build (#794)
Summary: Going through the `Getting Started` tutorial with `"react-native": "0.61.5"` makes the app crash when you build it, in order to get it working you must add a `.swift` file to the project. ## Changelog Add troubleshooting content about swift errors in React Native build Pull Request resolved: https://github.com/facebook/flipper/pull/794 Reviewed By: passy Differential Revision: D19852986 Pulled By: mweststrate fbshipit-source-id: 16bc44ad573dc20b90f57777ea1c9cfca7c7c4c9
This commit is contained in:
committed by
Facebook Github Bot
parent
15cde55981
commit
9c873bd034
BIN
docs/assets/troubleshooting-react-native-ios-swift-2.png
Normal file
BIN
docs/assets/troubleshooting-react-native-ios-swift-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 753 KiB |
BIN
docs/assets/troubleshooting-react-native-ios-swift.png
Normal file
BIN
docs/assets/troubleshooting-react-native-ios-swift.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 705 KiB |
@@ -86,3 +86,32 @@ debugImplementation('com.facebook.flipper:flipper:*') {
|
|||||||
exclude group: 'com.squareup.okhttp3'
|
exclude group: 'com.squareup.okhttp3'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## iOS
|
||||||
|
|
||||||
|
### Build errors in React Native
|
||||||
|
|
||||||
|
If you experience errors such as `Undefined symbol: associated type descriptor for FloatLiteralType` or `Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility50` after going through the [Getting Started](/docs/getting-started.html) tutorial you must do as follows:
|
||||||
|
|
||||||
|
1. Open your project in Xcode;
|
||||||
|
1. Click in your project's name on the left side;
|
||||||
|
1. Make sure that you choose your project under `PROJECT` on the screen that has been opened;
|
||||||
|
1. Go to the tab `Build Settings`;
|
||||||
|
1. Search for `LD_RUNPATH_SEARCH_PATHS` (make sure that `All` is selected);
|
||||||
|
1. Double-click `Runpath Search Paths` and, in the dialog that opens, click on the plus button at the bottom-left corner and paste `/usr/lib/swift $(inherited)` there;
|
||||||
|

|
||||||
|
1. Now search for `LIBRARY_SEARCH_PATHS`;
|
||||||
|
1. Double-click `Library Search Paths` and, in the dialog that opens, add the following items:
|
||||||
|
|
||||||
|
```
|
||||||
|
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)"
|
||||||
|
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
|
||||||
|
"$(inherited)"
|
||||||
|
```
|
||||||
|
|
||||||
|
_Note: all of them should be added as `non-recursive` (the default)._
|
||||||
|
|
||||||
|
In the end it should look like this:
|
||||||
|

|
||||||
|
|
||||||
|
1. Now you can run your build normally.
|
||||||
|
|||||||
Reference in New Issue
Block a user