I refactored some code in my iOS app and have started receiving the following error
Undefined symbols for architecture x86_64: "OBJC_CLASS$_UBApplicationStartupReasonReporterNotificationRelay", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
So here is what I did..
Earlier I had all the files at root. To organise I moved all files under new folder vendor/ios-startup-reporter/{files}.{h,m}
Then created a file vendor/StartupReporter.h
which contains following content
#import "ios-startup-reporter/UBApplicationStartupReasonReporterNotificationRelay.h"
#import "ios-startup-reporter/UBApplicationStartupReasonReporter.h"
#import "ios-startup-reporter/UBApplicationStartupReasonReporterPriorRunInfo.h"
#import "ios-startup-reporter/UBApplicationStartupReasonReporterPriorRunInfoProtocol.h"
now, In AppDelegate When I import it like this (#import "vendor/StartupReporter.h"
)
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#import <UserNotifications/UNUserNotificationCenter.h>
#import "vendor/StartupReporter.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, UNUserNotificationCenterDelegate>
@property (nonatomic, strong) UIWindow *window;
@property (nonatomic, strong) UBApplicationStartupReasonReporterNotificationRelay *notificationRelay;
@end
I get the above error,
Can someone help me what I am doing wrong and how I can fix it?