Apple Watch “No such module 'Alamofire'”

百般思念 提交于 2019-12-20 03:16:25

问题


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"


回答1:


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.



来源:https://stackoverflow.com/questions/39944607/apple-watch-no-such-module-alamofire

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!