hello,my app encounter a symbol not found problem that only occurs on iOS 14 and lower iOS version,the app just crash when launching, for iOS 15 and above iOS version, everything is ok. The app is built with XCode 15.2 and the min deployment target is iOS 12. The Crash report is here:
thanks in advance
Glad you got this sorted.
the crash report seems not relevant to the cause of the problem.
No, a crash like this is a pretty common symptom of the problem you’ve described. The compiler uses your deployment target to know which symbols it can rely on. If a symbol might be missing, it can sometimes emit some back deployment magic to allow your code to run [1]. If you have a deployment target mismatch, the compiler might not include this back deployment magic but rather rely on that symbol. If you then run it on an older release, where that symbol isn’t present, you get an error like this.
Notably, the missing symbol here was:
% c++filt '__ZTTNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEE'
VTT for std::__1::basic_ifstream<char, std::__1::char_traits<char>>
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] How this works varies by compiler. The Swift compiler has explicit support for it. In C++, this typically is done with various library-level tricks.