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
Copy file name to clipboardExpand all lines: README.md
+40-14Lines changed: 40 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,52 @@
1
+
## Who am I
2
+
3
+
This is demo repo is used by Solution Engineers when demo'ing Sentry's [React Native](https://docs.sentry.io/platforms/react-native) SDK's capabilties.
4
+
1
5
## Where do I begin
2
6
3
7
Please see [INSTALL.md](./Install.md) to get started with the setup.
4
8
9
+
## What next
10
+
* If you are ready to demo:
11
+
```
12
+
$git clone <this repo>
13
+
Edit App.js to add your Sentry's react-native's project's DSN key
14
+
$npx @sentry/wizard -i reactNative -p ios android
15
+
```
16
+
### Above will :
17
+
* Launch the [Sentry wizard](https://github.com/getsentry/sentry-wizard) allowing you to link with the correct Sentry react-native project.
18
+
* Create `ios/sentry.properties` and `android/sentry.properties`.
19
+
### Gotcha:
20
+
At this point, you may get an error like:
21
+
* `TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
22
+
23
+
From my test runs I've noted that it is safe to look past this error. A minor issue is that it blocks creation of `ios/sentry.properties`. So simply make a copy of `android/sentry.properties` and put it in `ios/sentry.properties`
Please see [Steps](#what-were-the-steps-again) or go through the [first ten commits](https://github.com/sentry-demos/sentry_react_native/commits/master) (and their git log) messages in chronological order, to see the exact commands that were run, step by step, to get all the autogenertaed files we needed as we kept in mind that "junk" does not belong in an SCM system.
38
+
Actually, its so not that many :-) . The size of this repo is approx. 1.3MB while the size of the [original react-native](https://github.com/sentry-demos/react-native) is approx 350MB.
9
39
10
-
Turns out react-native generates it own [.gitignore file](https://stackoverflow.com/questions/49099131/recommended-gitignore-for-react-native/49099219
11
-
), which is of course part of this repo, so only those [autogenerated files](https://stackoverflow.com/questions/48448426/why-dont-we-gitignore-ios-and-android-in-react-native) that are required for a baseline setup and the original demo code (files) are part of this repo. So now we are at point, where one can simply clone, make a few edits and like DSN, project name, auth token and be up and running.
40
+
Please see [Steps](#what-were-the-steps-again) or go through the [first ten commits](https://github.com/sentry-demos/sentry_react_native/commits/master) (and their git log) messages in chronological order, to see the exact commands that were run and what files that were autogenerated.
12
41
42
+
Please know that react-native generates it own [.gitignore file](https://stackoverflow.com/questions/49099131/recommended-gitignore-for-react-native/49099219
43
+
), which is of course part of this repo, so only those [autogenerated files](https://stackoverflow.com/questions/48448426/why-dont-we-gitignore-ios-and-android-in-react-native) that are required for a baseline setup and the original demo code (files) are part of this repo.
13
44
14
-
## Where's the "original" code
45
+
So now we are at point, where one can simply clone, make a few edits and like DSN, project name, auth token and be up and running.
15
46
16
-
Adam worked on App.js which I took as-is from him. Plus the 2 image files in the assets dir (which are also present in [original react-native repo ](https://github.com/sentry-demos/react-native/commit/269f58d63426065a4de67a3f22d2e774787cd996)
47
+
## Where's the "original" code
17
48
49
+
Adam worked on App.js which I took as-is from him. I also got from him the 2 image files in the assets dir (which are also present in [original react-native repo ](https://github.com/sentry-demos/react-native)
18
50
19
51
## What else
20
52
@@ -24,14 +56,13 @@ Since the assets are taken from there, and that it has its own App.js, it makes
24
56
25
57
### Update
26
58
27
-
So I took the major files from this working demo viz. package.json, package-lock.json, ios/Podfile, ios/Podfile.lock, because it is these files that make the deliverable self-contained, amongst other changes like DSN and put them on top of [original react-native repo ](https://github.com/sentry-demos/react-native/commit/269f58d63426065a4de67a3f22d2e774787cd996) , and I am getting comile errors for both ios and android.
59
+
So I took the major files from this working demo viz. `package.json`, `package-lock.json`, `ios/Podfile`, `ios/Podfile.lock`, because it is such files that make the deliverable self-contained, amongst other changes like DSN. When I put them on top of [original react-native repo ](https://github.com/sentry-demos/react-native/commit/269f58d63426065a4de67a3f22d2e774787cd996) , I am get comile errors for both ios and android versions.
28
60
29
-
At this time, I propose, we use this very repo (sentry_react_native) as the new working demo for RN stuff and forget about making them work on TOP of [original react-native repo](https://github.com/sentry-demos/react-native/commit/269f58d63426065a4de67a3f22d2e774787cd996) . That to me is now a hacker's or pure development exercise.
61
+
At this time, I propose, we use this very repo (sentry_react_native) as the new working demo for RN stuff and forget about making them work on TOP of [original react-native repo](https://github.com/sentry-demos/react-native) . That to me is now a hacker's or pure development exercise.
30
62
31
63
## What were the steps again
32
64
33
-
This is just the background steps to get to this repo in this state. You can simply clone and make minimal changes to DSN key to get up and running.
34
-
65
+
This is just the background steps to answer "How did we get here ?" . Below is not needed/related to the demoing this app.
35
66
```
36
67
npx react-native init sentry_react_native (where sentry_react_native is the project name) This generates the boiler plate code for the RN app
37
68
cd sentry_react_native
@@ -55,10 +86,5 @@ cd ios
55
86
pod install
56
87
cd ..
57
88
```
58
-
59
89
Ran git commit along the way and finally pushed to this repo.
0 commit comments