gpt4 book ai didi

ios - Apple Watch "No such module ' Alamofire'”

转载 作者:行者123 更新时间:2023-11-28 08:26:07 30 4
gpt4 key购买 nike

Alamofire 在 iPhone 专用项目中运行良好。

我手动安装了 ALAMOFIRE - 不是 COCOA PODS

现在我已经按照这些步骤添加了一个 watch 应用程序目标 - https://developer.apple.com/library/content/documentation/General/Conceptual/WatchKitProgrammingGuide/ConfiguringYourXcodeProject.html#//apple_ref/doc/uid/TP40014969-CH2-SW1IIm

“import Alamofire”在 iPhone 的 View Controller 上运行良好,但是当我尝试将它添加到“Extension”文件夹中的代码文件之一时,出现以下错误...

No such module "Alamofire"

My Directory

最佳答案

以下 2 个步骤已解决上述问题:

i) Check the target name in the Podfile it should match with extension that you are adding Library to it. "AppleWatchApp Extension" instead of "AppleWatchApp" in my case .

ii) Change the framework search Path in BUILD SETTINGS in the target as mention below.

enter image description here

关于ios - Apple Watch "No such module ' Alamofire'”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39944607/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com