An older Flutter project compiles without issues in Xcode 14, but encounters errors in Xcode 15.
The error is:
❌ Undefined symbols for architecture arm64
Symbol: OBJC_CLASS$_AutoOrientationPlugin
Referenced from: objc-class-ref in GeneratedPluginRegistrant-xxxx.o
❌ ld: symbol(s) not found for architecture arm64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
There is another warning, which I think may be related to this, but the project is too old and I didn’t want to deal with it before:
ld: object file (/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProducts
Path/Release-iphoneos/libPods-Runner.a(Pods-Runner-dummy.o)) was built for newer iOS version (12.0) than being linked (9.0)
This should be due to the global iOS compilation version being set to 9.0, that is, in the podfile:
platform :ios, ‘9.0’
But inside the post-install hook, I set:
config.build_settings[‘IPHONEOS_DEPLOYMENT_TARGET’] = ‘12.0’
My flutter version is flutter_macos_2.10.5-stable.
I have tried setting other linker flags to ld64 or ld-classic, but that didn’t work.
I am a novice app/iOS developer who has temporarily taken over this outdated project. I hope to get a solution from the community.
user10298398 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.