It's not a dup of this question
I imported Objective-C files into a Swift project. But there is a login controller that has a callback invoking AppDelegate.
But the AppDelegate is a Swift file.
According to the Apple's guideline, I added an ExampleProject-Swift.h
header file then imported this header file in the login controller.
But it doesn't seem to be the right way.
And in the AppDelegate.swift
file
The code below is what I did in the ExampleProject-Swfit.h
header.
#ifndef ExampleProject_swift_h
#define ExampleProject_swift_h
#import "AppDelegate.swift"
#endif /* ExampleProject_swift_h */
BTW, to use an Objective-C file, I already created an ExampleProject-Bridging-Header.h
.
I don't know what's really going on here, anyone has any idea about how to solve this problem?
Thank you for reading my question.