Xcode显示错误' No这样的模块'即使我已安装Cocoapods并已安装Dialogflow的pod文件 [英] Xcode showing error 'No such module' even though I've installed Cocoapods and installed pod file of Dialogflow
问题描述
我一直在使用Dialogflow(以前是Api.AI)制作聊天机器人,但是现在在将项目集成到以Xcode用Swift编写的应用程序时遇到错误.我使用终端"sudo gem install cocoapods"并使用
您提供的图像中清楚地显示您已打开项目文件,而不是工作区中的文件.
I've been making a chatbot using Dialogflow formerly Api.AI but now encountering error while integrating the project to my app written in Swift in Xcode. I'd installed cocoapods using terminal "sudo gem install cocoapods" and using this version of Dialogflow to create the podfile.
All gone well but now when I'm importing inside Xcode in my app's AppDelegate.swift file using import ApiAI or import AI Xcode is showing me error that No such module. Please refer to image.
And on GitHub this library which is written in Swift, showing that it has depreciated and asking me to refer to API.AI's Apple Client library which is in Obj-C and unfortunately I've no expertise in Obj-C.
After installing a pod using Cocoa Pods, you must from that point forward open the workspace rather that the project file. The icons will appear differently in your project like so:
In the image you provided is clearly showing that you have opened the project file not the workspace one.
这篇关于Xcode显示错误' No这样的模块'即使我已安装Cocoapods并已安装Dialogflow的pod文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!