No Such Module 'Parse'

2019-01-14 03:34发布

I am copying the parse frameworks to my Xcode project and checking the checkbox that says Copy files if needed.

Projects runs without a problem. But when if I move the Parse SDK folder to the trash Xcode says "No Such Module 'Parse'".

It should not say that because I am copying files not making file references to my project. How can I solve it?

6条回答
Ridiculous、
2楼-- · 2019-01-14 03:44

In my situation I had to keep on removing and then adding it every single build. The problem was that I had a space in my project file (NEVER DO THIS it creates so many problems). For example you name your app "Example App". This will make all the folders have spaces in them. So instead of having one row in Frameworks search paths your will have 2 since xcode will create another row when it sees the space. They will be $(PROJECT_DIR)/Example and App/parse-library-X.X.X due to an error in xcode. To fix this problem replace these 2 rows with one that reads $(PROJECT_DIR)/Example\ App/parse-library-X.X.X. Note the forward slash makes xcode read it as one file address with a space in it. This is also how you refer to folders/files in finder that have spaces in them.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-01-14 03:46

I had a similar issue but only one view controller was telling me there was no PARSE. I fixed it by copying everything below the import Parse statement, then adding a new view controller with the same name. Then I just pasted my code back in.

查看更多
唯我独甜
4楼-- · 2019-01-14 03:50

I just had this problem, and I got it to work by doing this:

I opened my Target > Build Settings > Search Paths > Framework Search Paths.

enter image description here

I added two values: $(PROJECT_DIR) and $(inherited)

I don't know why these were empty in the first place, but there you have it.

查看更多
Luminary・发光体
5楼-- · 2019-01-14 03:52

I was having the same issue.

In my case, using swift and CocoaPods, I didn't have to import Parse in my AppDelegate. I only needed to #import <Parse/Parse.h> #import <Bolts/BFTask.h> on my Bridging header.

查看更多
女痞
6楼-- · 2019-01-14 03:59

The issue for me was related to removing the comments in the podfile necessary for Swift to work. Check it out here.

"Replace the two commented lines with the following:

platform :ios, "8.0"

use_frameworks!

This tells CocoaPods that your project is targeting iOS 8.0 and will be using frameworks instead of static libraries."

http://www.raywenderlich.com/97014/use-cocoapods-with-swift

查看更多
老娘就宠你
7楼-- · 2019-01-14 04:01

Firstly, clean the project. Then delete all the Parse SDKs you have. Then add the sdks to the project and also move the actual framework to the Projects folder.

Hope that helps,

Julian

查看更多
登录 后发表回答