diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 97ba144fc..678324bca 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -1,5 +1,26 @@ # TROUBLESHOOTING +### `Undefined symbols: Swift` + +Original issue: https://github.com/DataDog/dd-sdk-reactnative/issues/41 + +If you have the following error message: +``` +Undefined symbols for architecture x86_64: + "static Foundation.JSONEncoder.OutputFormatting.withoutEscapingSlashes.getter : Foundation.JSONEncoder.OutputFormatting", referenced from: + static (extension in Datadog):Foundation.JSONEncoder.default() -> Foundation.JSONEncoder in libDatadogSDK.a(JSONEncoder.o) +... +``` + +open Xcode and go to `Build Settings` of your project (_not your app target_) then make sure `Library Search Paths` is the following: +``` +LIBRARY_SEARCH_PATHS = ( + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"/usr/lib/swift\"", + "\"$(inherited)\"", +); +``` + ### `Undefined symbol _RCTModule` I had this issue when I run the project from Xcode. It might be related to this change in [`react-native v0.63 changelog`](https://github.com/facebook/react-native/commit/6e08f84719c47985e80123c72686d7a1c89b72ed)