Why linker link static libraries with errors? iOS

后端 未结 17 1289
自闭症患者
自闭症患者 2020-11-27 14:39

I have a problem with linking my mixed language framework to a project.

1) I create a framework with Swift and Objective-C classes.

2) The main logic was stored in the

相关标签:
17条回答
  • 2020-11-27 15:06

    I only forget to Add the new Framework to my pod file :)

     target 'Data' do
    inherit! :search_paths
     pod 'AlamofireObjectMapper', '~> 5.2'
    

    end

    0 讨论(0)
  • 2020-11-27 15:07

    https://stackoverflow.com/a/56187043/1848929 works like a charm.

    Just create empty swift file on your project then build your project. Thats it.

    0 讨论(0)
  • 2020-11-27 15:08

    if you come from lottie-react-native install instructions just add use_frameworks! to podFile #536 (comment)

    0 讨论(0)
  • 2020-11-27 15:09

    In case you encounter this error while using Xcode 11 beta 4 in combination with carthage see this workaround:

    https://github.com/Carthage/Carthage/issues/2825

    Basically it consists of creating a xcconfig with the fixes and inject these into each build.

    0 讨论(0)
  • 2020-11-27 15:10

    @AlVelig 's answer worked for me.

    My case is a Flutter Project, and I add a package (searchable_dropdown), which is write by Swift.

    The output warning is:

    Could not find auto-linked library 'swiftObjectiveC'

    Could not find auto-linked library 'swiftCore'

    ......

    0 讨论(0)
  • 2020-11-27 15:12

    If your Xcode version is >=12.2

    Go to

    BuildSettings -> Linking -> runpath search path and add

    /usr/lib/swift

    as your 1st argument like this enter image description here

    0 讨论(0)
提交回复
热议问题