diff --git a/docs/assets/troubleshooting-react-native-ios-swift-2.png b/docs/assets/troubleshooting-react-native-ios-swift-2.png new file mode 100644 index 000000000..4612f1eb0 Binary files /dev/null and b/docs/assets/troubleshooting-react-native-ios-swift-2.png differ diff --git a/docs/assets/troubleshooting-react-native-ios-swift.png b/docs/assets/troubleshooting-react-native-ios-swift.png new file mode 100644 index 000000000..06121891e Binary files /dev/null and b/docs/assets/troubleshooting-react-native-ios-swift.png differ diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index b2fd2c75d..48303f7ba 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -86,3 +86,32 @@ debugImplementation('com.facebook.flipper:flipper:*') { 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; + ![Screenshot showing the places mentioned in the first steps](/docs/assets/troubleshooting-react-native-ios-swift.png) +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: + ![Screenshot showing the places mentioned in the last steps](/docs/assets/troubleshooting-react-native-ios-swift-2.png) + +1. Now you can run your build normally.