Troubleshooting

iOS

ld: warning: Could not find auto-linked library 'swiftFoundation'

This can occur when adding a Swift pod to a pure objective-c application. Add a bridge header to support swift pods. See https://stackoverflow.com/a/56176956 for an example.

error: Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

There are many possible reasons for this error. Here are a few potential work-arounds all taken from react-native issue #25240:
  • Clear the build folder and rebuild by running the following commands
    1
    cd ios
    2
    rm -rf build/
    3
    pod install
    4
    cd ..
    5
    react-native run-ios
    Copied!
  • Switch to the legacy build system
  • Unlink react-native
    1
    react-native unlink react-native-vector-icons
    2
    react-native run-ios
    Copied!
  • Reinstall cocoapods
    1
    cd ios
    2
    rm -rf Pods;
    3
    rm -rf build/
    4
    5
    sudo gem uninstall cocoapods
    6
    sudo gem install cocoapods
    7
    8
    pod install
    9
    cd ..
    10
    react-native run-ios
    Copied!

Undefined symbols for architecture x86_64

This is a known issue with react-native. There are two ways to remediate this problem:
  • Add use_frameworks! to your podfile:
    1
    use_frameworks!
    Copied!
    Note that Flipper is not compatible with use_frameworks!, and will have to be disabled if in use by deleting these lines:
    1
    use_flipper!
    2
    post_install do |installer|
    3
    flipper_post_install(installer)
    4
    end
    Copied!
  • Update your LD_RUNPATH_SEARCH_PATHS:
    Add the following line to all of your build configurations across your project:
    1
    LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) /usr/lib/swift @executable_path/Frameworks @loader_path/Frameworks";
    Copied!

Android

Error: spawnSync /.../Andoroid/sdk/platform-tools/adb ENOENT

  • react-native was unable to start the app after installing it. To start it manually, run the following command:
    1
    adb reverse tcp:8081 tcp:8081 && adb shell am start -n com.getbouncer.example/com.getbouncer.example.MainActivity
    Copied!

Cards will not scan

If the scanner is not scanning cards, or you're seeing the following error in console:
1
This file can not be opened as a file descriptor; it is probably compressed
Copied!
Please add the following to your android/app/build.gradle file in the android section:
1
aaptOptions {
2
noCompress "tflite"
3
}
Copied!
Last modified 6mo ago