React-native dyld error: _AVMetadataObjectTypeDataMatrixCode - ios

I've upgraded to react-native 0.16-rc, and tried to run my program on iOS (it worked great on 0.13.2). In simulator all goes great, but when I try to run it on my old iPhone (iOS 7.1 but before it ran great on it) I get error:
dyld: Symbol not found: _AVMetadataObjectTypeDataMatrixCode
Referenced from: /var/mobile/Applications/482E10D8-4B8B-4E1A-8AF8-78AC61C0C398/appname.app/appname
Expected in: /System/Library/Frameworks/AVFoundation.framework/AVFoundation
in /var/mobile/Applications/482E10D8-4B8B-4E1A-8AF8-78AC61C0C398/appname.app/appname
Can anybody help with it? I use external react-native-camera module which wasn't updated in while. Also didn't have time to upgraded to newest xCode (my ver. 7.0.1). Anybody had that kind of problems?

Related

Undefined symbols for architecture x86_64: "_RCTSetLogFunction" in React Native when compiling iOS

I'm revamping an old app written in react-native (which had no changes from ~2018) to its latest versions. I migrated from react-native 0.59 to the latest 0.64
To do so, I got help from the react-native migration help tool.
I also had to update my dependencies to work with auto-link and cocoa pods. I'm fairly new to mobile and react native (my background is on web with plain react), so there might be something obvious that I'm missing.
But, while android compiles and works successfully on my Mac, I can't make the compilation to work with iOS.
As the title says, I'm getting the following error:
Undefined symbols for architecture x86_64:
"_RCTSetLogFunction", referenced from:
-[MetronomeWalletTests testRendersWelcomeScreen] in MetronomeWalletTests.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is happening in the test project, not in the main project (or however it is called).
Things I've tried
I enabled dead code stripping as this issue suggests in both the main and the test project, for debug and release, in the "targets" section.
I also tried disabling that same setting, as this issue suggests
I tried cleaning and rebuilding
I tried adding Javascript.framework to the linked libraries
If I understand correctly, this error takes place in the phase "Link {projectName}Tests (x86_64)"
None of these have worked. I've run out of ideas.
Environment:
Mac pro with Big Sur 11.3.1 (I'm also new to Mac in general, so let me know if anything might be missing)
RN version: 0.64.2
Xcode version: 12.5.1
I get this error building both from the console and from xcode
It looks like this issue has been fixed for newly scaffolded projects. I was also facing this issue when upgrading an existing React Native project from 0.59.10 to 0.65, with the caveat that it was only happening when building in Release mode (e.g. when archiving the project in Xcode).
The solution for me is outlined in this PR - the gist is to wrap any usage of RCTSetLogFunction inside an #ifdef DEBUG block, to prevent it being run in Release mode.
I realise this might not answer the original question but I thought I'd post it here in case its helpful to anyone else.

Xcode 10 GM libstdc++ error, can't run on simulator

I am trying to test my apps for iOS 12. I have a iPad only app that works fine under Xcode 9. When I try to compile it for the simulator with Xcode 10 GM, the following warning appears:
URGENT: building for iOS Simulator simulator, but linking against dylib (/usr/lib/libstdc++.6.0.9.dylib) built for macOS. Note: This will be an error in the future
It will build, but when running it crashes with the following message:
dyld: lazy symbol binding failed: can't resolve symbol ___cxa_guard_acquire in /Users/.... /.... xxx.app because dependent dylib #1 could not be loaded.
I haven't done anything, it happened on the first try.
Any ideas?
removed '/usr/lib/libstdc++.6.0.9.dylib' from the 'OTHER_LDFLAGS', seems to be fine again.
libstc is removed in iOS 12 and was first deprecated in Xcode 10. You can however manually add this library in Simulator or update your dependency to use libc++.
Refer this link for manually adding these libraries - libstdc

I recently upgraded Xcode 8.3.1 and Mac to Sierra. When I try to run my app on my iPhone 6s I get the following error. How do I fix this?

I tried uninstalling and reinstalling all pods but have no idea how to fix this. My app gets to the loading screen then crashes.
dyld: Symbol not found: __TWPVs11AnyHashables20_AnyHashableProtocols
Referenced from:
/private/var/containers/Bundle/Application/476E6613-F069-42F5-B10D-5F56C0A357C3/Myapp.app/Frameworks/Alamofire.framework/Alamofire
Expected in:
/private/var/containers/Bundle/Application/476E6613-F069-42F5-B10D-5F56C0A357C3/Myapp.app/Frameworks/libswiftCore.dylib
in
/private/var/containers/Bundle/Application/476E6613-F069-42F5-B10D-5F56C0A357C3/Myapp.app/Frameworks/Alamofire.framework/Alamofire
(lldb)

dyld_l_fatal_error when Running app on device but not simulator after iOS 9.2.1 update on device

I've been banging my head against the walls with this one. I recently updated my iPhone 6S to iOS 9.2.1 and since then I get the following error:
dyld: Library not loaded: #rpath/AMScrollingNavbar.framework/AMScrollingNavbar
Referenced from: /var/mobile/Containers/Bundle/Application/EB384B23-1BCC-4E23-8FB7-E0349C4F52B9/Qanda.app/Qanda
Reason: image not found
The weird thing is not only is it running on the simulator but AMScrollingNavbar was installed with cocoapods then removed… So it shouldn't even be trying to search for it.
I have tried multiple things non of which have worked:
cleaned the project
restarted xCode
reset the Pods
deleted the App from the device and reinstalled
followed all these steps: https://forums.developer.apple.com/thread/25352
also tried this how to ENABLE_BITCODE in xcode 7?
Thanks!

Unit tests throw error when simulator is in SDK 5.1

My unit tests run fine when the target is set to 6.1, and the code itself is fine when I walk through the features in the simulator.
I think the problem is that the unit tests are expecting the 6.1 SDK to be there, but it's actually using the 5.1 SDK.
Here's the error:
dyld: Symbol not found: _objc_setProperty_nonatomic_copy
Referenced from: /Users/{my username}/Library/Developer/Xcode/DerivedData/{my app name}/Build/Products/Debug-Live-iphonesimulator/AgrianUnitTest.octest/AgrianUnitTest
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation
My first thought was to change the Base SDK in my Unit Tests target, but I don't have any options other than Latest and 6.1 (manually entering 5.1 results in "SDK not found").
Your Xcode location may not be up-to-date after some upgrade before. Try fixing the location. Run this in the terminal:
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/
export DEVELOPER_DIR=/Applications/Xcode.app

Resources