I am getting an Undefined symbol: OBJC_CLASS$_Intro at link time when trying to build.
I can access the class Intro inside a swift file in Xcode using Xcode's intellisense, but it doesn't seem to recognize it at build time. Can someone with more experience with swift and Xcode give me a hand.
class OldLoginViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
NotificationCenter.default.addObserver(self, selector: #selector(OldLoginViewController.goIntro), name: NSNotification.Name("ROOTGOINTRO"), object: nil)
ClsUtil.skip(toViewController: self.navigationController!, viewControllerName: "Intro", isViewDidLoad: true)
}
var style : UIStatusBarStyle = UIStatusBarStyle.default;
@objc
override func viewDidAppear(_ animated: Bool) {
let intro = Intro()
self.navigationController?.pushViewController(intro, animated:false)
}
Obj C code:
#import "BaseViewController.h"
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface Intro : BaseViewController
@end
NS_ASSUME_NONNULL_END
Bridging header:
#ifndef ObjectiveCBridgingHeader_h
#define ObjectiveCBridgingHeader_h
#import "Base/Util/ClsUtil.h"
#import "Base/ViewController/BaseViewController.h"
#import "Intro/Intro.h"
#endif /* ObjectiveCBridgingHeader_h */
builds fine and accesses ClsUtil fine without the code involving intro, so I assume that the bridging header is set up correctly in project settings
ps - forgive the noobness. 4th day of iOS. Prior developer left and we don't have a developer to take care of iOS related issues or finish porting the prior app. I wanted to switch to using swift instead of obj c cause it looks cleaner/will give access to the latest tools.