How to skip library check in framework

I have build a framework name is HansTranslation.framework for iOS 18 only, because it is include Translation.

My app is okay when I call this framework on iOS 18 device, but it is crash on iOS 17.6. below is error info:

Symbol not found: _$s7SwiftUI4ViewP013_Translation_aB0E15translationTask_6actionQr0D00D7SessionC13C onfigurationVSg_yAIYactF Referenced from: <4E09A66F-7D9E-3793-A2D6-1BE167EAD3F5> /private/var/containers/Bundle/Application/90A1EF03-09DA-43B5-8946-8186CF9CC804/B uild SRT.app/Frameworks/HansTranslation.framework/HansTranslation (built for ios 18.0 which is newer than running OS) <8F146BA4-EBE8-32C5-9CD8-E30077AD8088> /System/Library/Frameworks/_Translation_SwiftUI. framework/_Translation_SwiftUI

I known that iOS 17.6 is NOT include "Translation_SwiftUI. framework", so there is crash.

I have notice that don't call this framework when iOS version less than iOS 18, my code control like API_AVAILABLE(ios(18.0)) or @available(iOS 18.0, *)).

I try that set "Build Phases" -> Embed Framework -> Copy only when installing -> ON, it is okay on iOS 17.6, but it is not work on iOS 18.

My framework in here: https://github.com/MingJieHan/HansTranslation

My question that how to do? first way that change option for HansTranslation.framework, let it not link Translation_SwiftUI automatically, not success.

second way that change my app option, let it not check library, I don't know how to do next step.

please help me or give me some idea for those.

Thanks.

Hi @fkdjskfjdskfsdf , probably it's not be successful, but the problem seems to be in the generation of the HansTranslation framework. Try to change the minimum deploy target of HansTranslation framework project generation to 17.6 , build and see if some warning are displayed.

Then, try to use the generated framework on iOS 18 and iOS 17.6 , if you are lucky should work

Bye Rob

How to skip library check in framework
 
 
Q