Apple Watch“没有这样的模块'Alamofire'” [英] Apple Watch "No such module 'Alamofire'"

查看:173
本文介绍了Apple Watch“没有这样的模块'Alamofire'”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



我没有手动安装阿拉莫菲尔-不是可可豆



现在,我已按照以下步骤添加了一个监视应用程序目标-

解决方案

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


i)在Podfile中检查目标名称,该目标名称应与要添加库的扩展名
相匹配。



ii)在中更改框架搜索路径在目标
中建立设置
,如下所述。



Alamofire has been working fine for an iPhone only project.

I DID THE MANUAL INSTALL OF ALAMOFIRE - NOT COCOA PODS

Now I have added a watch app target following these steps - https://developer.apple.com/library/content/documentation/General/Conceptual/WatchKitProgrammingGuide/ConfiguringYourXcodeProject.html#//apple_ref/doc/uid/TP40014969-CH2-SW1IIm

"import Alamofire" works fine on the iPhone's view controller but when I try to add it to one of the code files in the " Extension" Folder the following error occurs...

No such module "Alamofire"

解决方案

Below 2 steps have resolved above issue :

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.

这篇关于Apple Watch“没有这样的模块'Alamofire'”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆