特別なことを何もしていないのに、なぜこのエラーが発生するのか、少し混乱していNSInvalidArgumentException
ます。何か間違ったことをした場合に、コードを使用すると、次のようになります。ユーザー名の値を保存しました。このエラーが発生する理由を教えてください。さらに、定期的ではないため、エラーを見つけるのが難しくなっています。Mixpanel analytics
didreceivelocalnotifiaction
- (void)application:(UIApplication *)app didReceiveLocalNotification:(UILocalNotification *)notif {
// Handle the notificaton when the app is running
Mixpanel *mixp = [Mixpanel sharedInstance];
[mixp track:@"Notification Fired" properties:[NSDictionary dictionaryWithObject:notif.fireDate forKey:@"App Opens"]];
mixp.nameTag = [[NSUserDefaults standardUserDefaults] objectForKey:@"Username"];
[mixp identify:[[NSUserDefaults standardUserDefaults] objectForKey:@"Username"]];
}