我开发了一个包含Swift和Objective-C文件的框架。当我在Swift项目中访问Swift类时,一切正常,但是当我尝试在Swift中访问Objective-C类时,我无法访问它,并且我也已经将Objective-C文件桥接到了Swift项目中。有人能帮我解决这个问题吗?
//swift project
import ObjCSwiftFramework
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let callingswiftfile = SwiftFile() //calling the swift file
let callingobjectivecfile = ObjectiveCFile()//**Use of unresolved identifier 'ObjectiveCFile'**
}
}
//Bridge file
#ifndef ObjCSwift_project_Bridging_Header_h
#define ObjCSwift_project_Bridging_Header_h
#import "ObjCSwiftFramework/ObjCSwiftFramework.h"
#endif
我也附加了框架截图供您参考。
![enter image description here](https://istack.dev59.com/AUMbL.webp)