Troubleshooting
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.
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 commandscd iosrm -rf build/pod installcd ..react-native run-ios
- Switch to the legacy build system
- Unlink react-nativereact-native unlink react-native-vector-iconsreact-native run-ios
- Reinstall cocoapodscd iosrm -rf Pods;rm -rf build/sudo gem uninstall cocoapodssudo gem install cocoapodspod installcd ..react-native run-ios
- Add
use_frameworks!
to your podfile:use_frameworks!Note thatFlipper
is not compatible withuse_frameworks!
, and will have to be disabled if in use by deleting these lines:use_flipper!post_install do |installer|flipper_post_install(installer)end - Update your
LD_RUNPATH_SEARCH_PATHS
:Add the following line to all of your build configurations across your project:LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) /usr/lib/swift @executable_path/Frameworks @loader_path/Frameworks";
- react-native was unable to start the app after installing it. To start it manually, run the following command:adb reverse tcp:8081 tcp:8081 && adb shell am start -n com.getbouncer.example/com.getbouncer.example.MainActivity
If the scanner is not scanning cards, or you're seeing the following error in console:
This file can not be opened as a file descriptor; it is probably compressed
Please add the following to your
android/app/build.gradle
file in the android
section:aaptOptions {
noCompress "tflite"
}
Last modified 2yr ago