Im trying to build a project after adding 3rd party framework, however I can't compile the project after adding the framework, I get Undefined symbols for architecture arm64: error when I try to compile on a device, but I can compile on a simulator. I have tried all other solutions I found on stackoverflow. any help is appreciated!
Here is what I have tried:
None of the solutions I tried worked for me.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_*", referenced from:
objc-class-ref in frameworkName.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: Undefined symbols for architecture arm64 - Sentiance. It means that framework is not included.
The error Undefined symbols for architecture arm64: "_OBJC_CLASS_$_SKAdImpression" during the iOS build usually happens if XCode or CocoaPods version is lower than required. To fix it update XCode to 12.5 or higher and CocoaPods to 1.10. 0 or higher.
You can fix the linker error by going to project -> target (your project name) -> build settings and change architectures to standard architectures (armv7, armv7s), and valid architectures to armv7, armv7s. Note though, this means you won't get the full power of the 64 bit processor.
Try adding this to your pod file
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
end
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With