Can I still use bridging header for cocoa pod frameworks?

I used to download Parse frameworks and bridge to my Swift project using bridging header file with this line:

#import <Parse/Parse.h>

Now I just switched to use cocoa pods and things get messed up when I include use_frameworks! in the Podfile. If I keep using the same bridging file, all of the PFObjects become unresolved identifier when build, with error like "Use of unresolved identifier 'PFUser'". This error goes away when I put

import Parse

at the top of each file. But that is pretty much every file since it is a Parse project, let alone other things to import such as ParseUI etc. Is there a way to import once for all as the bridging header used to do?

I tried to change the import line in the bridging header to:

import "Parse.h"

It gives me another error saying "duplicate interface definition for class 'Parse'":

MyApp/Pods/Parse/Parse/Parse.h:66:1: error: duplicate interface definition for class 'Parse'
@interface Parse : NSObject
^
/Library/Developer/Xcode/DerivedData/MyApp-dbdwtdjelpuomaaawugvjubngrvq/Build/Products/Debug-iphonesimulator/Parse.framework/Headers/Parse.h:66:12: note: previous definition is here
@interface Parse : NSObject
           ^

I checked other questions here but got no luck. Any help?

Edit: this weird error is shown in picture here: Xcode identified the class but the app cannot compile. 在这里输入图像描述

链接地址: http://www.djcxy.com/p/47388.html

上一篇: 触控板手势切换到标题/来源

下一篇: 我仍然可以为可可豆框架使用桥接标头吗?