[ad_1]
I’m a react-native developer, attempting to combine native iOS library.
Hyperlink to library: https://github.com/uber/startup-reason-reporter
In that they’ve this instruction
// Decide whether or not the app crashed on a previous launch
BOOL crashedOnPriorLaunch = ...
// Initialize a storage mechanism implementing UBApplicationStartupReasonReporterPriorRunInfoProtocol
id<UBApplicationStartupReasonReporterPriorRunInfoProtocol> runInfo = ...
// Initialize the notification relay
id<UBApplicationStartupReasonReporterNotificationRelayProtocol> = [[UBApplicationStartupReasonReporterNotificationRelay alloc] init]
// Initialize the startup motive reporter
UBApplicationStartupReasonReporter *startupReasonReporter = [[UBApplicationStartupReasonReporter alloc] initWithPreviousRunDidCrash:crashedOnPriorLaunch
previousRunInfo:runInfo
notificationRelay: notificationRelay
debugging:[UBBuildType isDebugBuild]];
// Revenue
UBStartupReason startupReason = startupReasonReporter.startupReason
// ...
// In AppDelegate join notification relay to app lifecycle strategies
- (void)applicationDidBecomeActive:(UIApplication *)software
{
[self.notificationRelay updateApplicationStateNotification:[NSNotification notificationWithName:UIApplicationDidBecomeActiveNotification object:nil]];
}
- (void)applicationWillResignActive:(UIApplication *)software
{
[self.notificationRelay updateApplicationStateNotification:[NSNotification notificationWithName:UIApplicationWillResignActiveNotification object:nil]];
}
- (void)applicationWillTerminate:(UIApplication *)software
{
[self.notificationRelay updateApplicationStateNotification:[NSNotification notificationWithName:UIApplicationWillTerminateNotification object:nil]];
}
Once I put this in AppDelegate.m, it says this
// In AppDelegate join notification relay to app lifecycle strategies
- (void)applicationDidBecomeActive:(UIApplication *)software
{
[self.notificationRelay updateApplicationStateNotification:[NSNotification notificationWithName:UIApplicationDidBecomeActiveNotification object:nil]];
}
- (void)applicationWillResignActive:(UIApplication *)software
{
[self.notificationRelay updateApplicationStateNotification:[NSNotification notificationWithName:UIApplicationWillResignActiveNotification object:nil]];
}
- (void)applicationWillTerminate:(UIApplication *)software
{
[self.notificationRelay updateApplicationStateNotification:[NSNotification notificationWithName:UIApplicationWillTerminateNotification object:nil]];
}
Property ‘notificationRelay’ not discovered on object of sort ‘AppDelegate
*
Any concept why this might be occurring?
[ad_2]
