我有一个使用Swift和pods(firebase)构建的应用程序。我有18个三角形和100个红色错误,这些是以前没有的。它们仅在我尝试存档我的应用程序时出现。
我已经尝试了所有这些方法(添加搜索路径,添加空白swift文件,删除框架路径)
将Swift Static库与Objective-C项目一起使用时会出错
ld: warning: Could not find or use auto-linked library 'swiftFoundation'
ld: warning: Could not find or use auto-linked library 'swiftsimd'
ld: warning: Could not find or use auto-linked library 'swiftGLKit'
ld: warning: Could not find or use auto-linked library 'swiftMetal'
ld: warning: Could not find or use auto-linked library 'swiftSpriteKit'
ld: warning: Could not find or use auto-linked library 'swiftDarwin'
ld: warning: Could not find or use auto-linked library 'swiftUIKit'
ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
ld: warning: Could not find or use auto-linked library 'swiftCore'
ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
ld: warning: Could not find or use auto-linked library 'swiftModelIO'
ld: warning: Could not find or use auto-linked library 'swiftDispatch'
ld: warning: Could not find or use auto-linked library 'swiftAVFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
Run Code Online (Sandbox Code Playgroud)
环境:Xcode 11 beta 4 /目标:iOS 12及更高版本
我的 ObjectiveC 项目包含一个 Swift pod,然后抛出上述错误。我发现我所要做的就是将一个 swift 头文件添加到我的项目的基础中,然后它突然就全部构建好了。
对我而言,当我进入目标项目的构建设置并搜索“swift”时,当我知道我应该看到更多结果时,我只看到了非常少的结果——在添加了头文件之后我突然在这里看到了更多的选择。以下是我采取的步骤。
我不确定名称是否重要,也不确定文件的位置,但这对我有用!
就我而言,这是添加 Swift Pods 库后的 React-Native 项目。