Skip to content

Commit d0174bd

Browse files
committed
Fixes #67 - Add user extra data on android
1 parent a89dec0 commit d0174bd

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

android/src/main/java/io/sentry/RNSentryModule.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ public void captureEvent(ReadableMap event) {
187187
builtUser.getId(),
188188
builtUser.getUsername(),
189189
null,
190-
builtUser.getEmail()
190+
builtUser.getEmail(),
191+
builtUser.getData()
191192
);
192193
eventBuilder.withSentryInterface(userInterface);
193194
}
@@ -243,6 +244,9 @@ private UserBuilder getUserBuilder(ReadableMap user) {
243244
if (user.hasKey("username")) {
244245
userBuilder.setUsername(user.getString("username"));
245246
}
247+
if (user.hasKey("extra")) {
248+
userBuilder.setData(((ReadableNativeMap)user.getMap("extra")).toHashMap());
249+
}
246250
return userBuilder;
247251
}
248252

docs/manual-setup.rst

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,6 @@ is happening on each platform.
77
iOS
88
---
99

10-
Since we use our `Swift Client
11-
<https://github.com/getsentry/sentry-swift>`_ in the background, your
12-
project has to embed the swift standard libraries.
13-
14-
Xcode Settings
15-
``````````````
16-
17-
The link step sets ``ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES`` in your Xcode
18-
project's build settings to ``YES``.
19-
20-
You will get this error message if that setting is not set::
21-
22-
dyld: Library not loaded: @rpath/libswiftCore.dylib
23-
Referenced from: [Redacted]/Sentry.framework/Sentry
24-
Reason: image not found
25-
2610
Build Steps
2711
```````````
2812

@@ -53,7 +37,7 @@ upload-dsym``) and consult the documentation on dsym handling instead (see
5337

5438
Note that uploading of debug simulator builds by default is disabled for
5539
speed reasons. If you do want to also generate debug symbols for debug
56-
builds you can pass `--allow-fetch` as a parameter to ``react-native-xcode``
40+
builds you can pass ``--allow-fetch`` as a parameter to ``react-native-xcode``
5741
in the above mentioned build phase.
5842

5943
Android

0 commit comments

Comments
 (0)