dotintent / react-native-ble-plx

React Native BLE library
Apache License 2.0
3.04k stars 508 forks source link

Linker Error finding Swift Support Libraries #457

Closed paddlefish closed 5 years ago

paddlefish commented 5 years ago

Prerequisites

Start with a react-native app (not ejected Expo)

Expected Behavior

Build and run

Current Behavior

Linker error: ld: warning: Could not find auto-linked library 'swiftFoundation' ld: warning: Could not find auto-linked library 'swiftDarwin' ld: warning: Could not find auto-linked library 'swiftCoreFoundation' ld: warning: Could not find auto-linked library 'swiftCore' ld: warning: Could not find auto-linked library 'swiftCoreGraphics' ld: warning: Could not find auto-linked library 'swiftObjectiveC' ld: warning: Could not find auto-linked library 'swiftDispatch' ld: warning: Could not find auto-linked library 'swiftSwiftOnoneSupport' Undefined symbols for architecture arm64:

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Install react-native-ble-plx using yarn add
  2. react-native link
  3. Build-and-Run in Xcode

Context

The fix is to add a single empty swift file to your main app. This will trigger Xcode to link in Swift and create a bridging header.

We should update the README to include this simple step

paddlefish commented 5 years ago

Oh my, I'm sorry, the README already says that and I skimmed over it. So sorry!

(feels embarrased)

myckhel commented 4 years ago

Following this solution worked for me Dropping for people facing same issue and looking for solution https://stackoverflow.com/a/56187043/9241085

lsirdevan commented 4 years ago

@myckhel That solution worked for me as well. Thanks!

mzruiz commented 3 years ago

@paddlefish The fix you suggested worked when I experience the issue integrating opentok-react-native