苹果手表“没有这样的模块”Alamofire“”
Alamofire一直在为仅iPhone项目工作正常。
我没有手动安装ALAMOFIRE – 不是cocoa豆
现在我已经按照以下步骤添加了监视应用程序目标 – https://developer.apple.com/library/content/documentation/General/Conceptual/WatchKitProgrammingGuide/ConfiguringYourXcodeProject.html#//apple_ref/doc/uid/TP40014969-CH2- SW1IIm
“导入Alamofire”在iPhone的视图控制器上工作正常,但是当我尝试将其添加到“扩展”文件夹中的代码文件之一时出现以下错误…
No such module "Alamofire"
以下两个步骤解决了上述问题:
i)检查Podfile中的目标名称,它应该与要添加Library的扩展名相匹配。 在我的情况下,“AppleWatchApp扩展”,而不是“AppleWatchApp”。
ii)如下所述更改目标中BUILD SETTINGS中的框架searchpath 。