Skip to content

Remove manual geo handling in iOS after sentry-cocoa adds geo support in initWithDictionary: #6266

Closed

Description

@antonis

Description

Once getsentry/sentry-cocoa#8026 is released, SentryUser.initWithDictionary: will natively handle the "geo" key by deserializing it into SentryGeo. This means we can remove the manual geo handling in RNSentry.mm.

Changes needed

In packages/core/ios/RNSentry.mm (userFrom:otherUserKeys:):

  • Remove [filteredKeys removeObjectForKey:@"geo"] and the filteredKeys mutable copy — pass userKeys directly to initWithDictionary:
  • Remove the entire manual geo block (~20 lines: SentryGeo alloc, manual city/countryCode/region parsing, setGeo:)
  • Remove #import <Sentry/SentryGeo.h>

The method should simplify to:

SentryUser *userInstance = [[SentryUser alloc] initWithDictionary:userKeys];
if ([userDataKeys isKindOfClass:NSDictionary.class]) {
    [userInstance setData:userDataKeys];
}
return userInstance;

Prerequisite

Related

Activity

  1. linear-code commented on Jun 9, 2026

    @linear-code
  2. self-assigned this
    on Jun 9, 2026
  3. added a commit that references this issue on Jun 23, 2026
    52746b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions