I need to make swift static library for my requirement. I made swift static library which uses swift and Obj-c code. I have included Obj-c files via bridge file. I am able t
I've got the same error on my demo project when added first Swift file in my pod compiled as static library. For me solution was simple - just added empty Swift file to my demo project which was previously in Objective-C only. This solved all linker errors.
If create empty "Swift File" errors
This method may be useful, can try : https://blog.cpming.top/p/react-native-0-62-undefined-symbol
An update to Alex's answer:
In my case it was a React-Native project after adding a Swift Pods library. Maybe just the step 2 can work:
1) File -> New -> File
2) Select Swift File
3) Confirm Create Bridging Header
Build Settings
and set Always Embed Swift Standard Libraries
to YES
This answer worked for me: Add $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)
to the library search paths.