Search code examples
swiftxcodetitaniumappcelerator

Appcelerator Titanium - Could not find or use auto-linked library 'swiftCore'


I am developing an Appcelerator Titanium iOS Module that uses a 3rd party framework (OpenCV).

So far, so good. I ran into some problems, but gradually managed to get through them (with help). Now, I am getting this annoying erros that states Could not find or use auto-linked library 'swiftCore' and other libraries. The module compiles with no problem, the error I get when trying to run the module in the App (I don't even get warns on XCode, 'it's all good man').

The error:

[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCore'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'    
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftos'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftFoundation'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftsimd'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftMetal'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftDarwin'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCompatibility50'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftDispatch'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftAVFoundation'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftAccelerate'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftUIKit'
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCoreMIDI'
[TRACE] Undefined symbols for architecture x86_64: // and here a lot of trace log....

I have already tried 3 things that I found here on SO.

First one: Create a Dummy .swift file on the project with a Project-Bridging-Header.h file as well, as mentioned in this answer.

Second one: Create an User Defined Build Setting LD_VERIFY_BITCODE with value NO, as mentioned in this answer.

Third one: Put $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) in the Library Search Paths, as mentioned in this answer.

All three options seems to work for a lot of people, but I still get those errors. Just to remind, The module builds perfectly, I get the errors when trying to run the App with the Module.

Please, can someone help me? I am struggling with this for a long time.


Solution

  • For my specific case, what solved the issue (I must thank the team/users of TiSlack which helped me through this) was to install the newer Titanium Mobile SDK (9.2.0). The errors are gone, the App runs now!