Build iOS plugin library (with third-party iOS frameworks inside) using SCONS

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kurtsev0103

Hi all. I have a plugin for iOS for logging in with Facebook for Godot. Inside the plugin is of course the Facebook SDK framework.

In order for everything to work in xCode I needed to put Allow Non-modular includes in Framework Modules in build setting YES.
And the build with xCode goes perfectly, without any problems

But, if I use scons, I see an error on the command line. As far as I understand, I need to add something to SConstruct to make it see the linked libraries.

scons: done reading SConscript files.
scons: Building targets ...
g++ -o GodotFacebookAuth/AuthResult.o -c -gdwarf-2 -O0 -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -D_DEBUG -DDEBUG=1 -DDEBUG_ENABLED -DPTRCALL_ENABLED -DGLES_ENABLED -std=gnu++14 -DNEED_LONG_INT -DLIBYUV_DISABLE_NEON -DIPHONE_ENABLED -DUNIX_ENABLED -DCOREAUDIO_ENABLED -fmodules -fcxx-modules -miphoneos-version-min=10.0 -fobjc-arc -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -fno-exceptions -Wno-ambiguous-macro -Wall -Werror=return-type -arch arm64 -isysroot -stdlib=libc++ -isysroot /Applications/ -DPTRCALL_ENABLED -I. -Igodot -Igodot/main -Igodot/core -Igodot/core/os -Igodot/core/platform -Igodot/platform/iphone -Igodot/modules -Igodot/scene -Igodot/servers -Igodot/drivers -Igodot/thirdparty GodotFacebookAuth/
In file included from GodotFacebookAuth/
GodotFacebookAuth/GodotFacebookAuth.h:10:9:{10:2-10:21}: fatal error: module 'FBSDKCoreKit' not found [4]
 @import FBSDKCoreKit;
1 error generated.
scons: *** [GodotFacebookAuth/AuthResult.o] Error 1
scons: building terminated because of errors.