You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While playing around the iOS sdk I came accross the issue where all my reports sent didn't include user information. After digging through, I discovered that the method restoreContextBeforeCrash didn't restore the context properly. In my case, I had only set the SentryClient.sharedClient.user property as I didn't need the tags and extra properties.
The initWithObjectsAndKeys method is a nil terminated variable list. In my case [[NSUserDefaults standardUserDefaults] objectForKey:@"sentry.io.tags"] was actually nil, thus preventing from going further.
Now there would be two solutions that I would propose you. One is to force the creation of NSUserDefaults entry in your initializer by calling [self setExtra:[NSDictionary new]];. Just like you do in the clearContext method.
The other solution would be to avoid the nil terminated varargs and use a mutable dictionary instead :
Platform:
Swift:
sentry-cocoa installed with:
Version of sentry-cocoa:
3.4.3
I have following issue:
While playing around the iOS sdk I came accross the issue where all my reports sent didn't include user information. After digging through, I discovered that the method
restoreContextBeforeCrash
didn't restore the context properly. In my case, I had only set theSentryClient.sharedClient.user
property as I didn't need the tags and extra properties.The reason is simple:
The
initWithObjectsAndKeys
method is anil
terminated variable list. In my case[[NSUserDefaults standardUserDefaults] objectForKey:@"sentry.io.tags"]
was actuallynil
, thus preventing from going further.Now there would be two solutions that I would propose you. One is to force the creation of NSUserDefaults entry in your initializer by calling
[self setExtra:[NSDictionary new]];
. Just like you do in theclearContext
method.The other solution would be to avoid the nil terminated varargs and use a mutable dictionary instead :
Hope I didn't miss any details, feel free to ask otherwise, thanks!
The text was updated successfully, but these errors were encountered: