Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
242 views
in Technique[技术] by (71.8m points)

ios - Error in JSQMessages.h

I added JSQMessageViewController to my project. I went to the bridging header file and added #import "JSQMessagesViewController/JSQMessages.h" and I get the following error in JSQMessages.h.

Why is Xcode not able to find it?

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This answer might be more opinion based, but I would delete your jsqmessagesviewcontroller folder, then when you drag it into your project just choose create groups instead of folders. Then you won't have to worry about subdirectory issues

EDIT:

Make sure it looks like this when you drag it into xcode (Copy items if needed, create groups and add to targets 'name of project' (not the Tests target) ) Drag-n-drop folder into xcode

Then you should be able to see this when in autocompletion when your typing your includes:

autocomplete

And you should also see the JSQMessagesViewController files in compile sources like so (I highlighted some to show you): selected jsqmessagesviewcontroller files

If those files aren't in there, click the plus at the bottom of compile sources and select all the files in the jsqmessagesviewcontroller subdirectory and click add.

Hope this helps!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...