Skip to content

Commit

Permalink
Merge pull request #322 from heap/develop
Browse files Browse the repository at this point in the history
Dev -> Master
  • Loading branch information
semmerich-heap authored Jun 29, 2022
2 parents fe2cbdc + 9d1db5b commit b8d49f4
Show file tree
Hide file tree
Showing 27 changed files with 20,068 additions and 83,745 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ __BEGIN_UNRELEASED__
### Security
__END_UNRELEASED__

## [0.21.0] - 2022-06-29

### Added

- Added `getSessionId()` method for fetching the current Heap Session ID from the underlying native SDK.
- Added Expo config plugin to support Android in managed workflows.

## [0.20.0] - 2022-04-28

### Changed
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ React Native tracker for [Heap](https://heapanalytics.com).

Thanks for using Heap's React Native SDK! If you're having any issues, please reach out to customer support at <[email protected]>. For the best service, include "React Native" in the subject and your app id or customer email address in the body. Also, feel free to file a github issue or open a PR! If you do so, be sure to include a link in your request to customer support. Our engineering team checks for new PRs and github issues and tries to respond as soon as possible.

## Getting Started

## Getting Started Expo Managed Workflow
```bash
expo install @heap/react-native-heap
```

## Getting Started Expo Bare Workflow or Non Expo app

```bash
npm install @heap/react-native-heap
Expand Down Expand Up @@ -38,3 +44,4 @@ See our [docs](https://docs.heap.io/docs/react-native).
## Acknowledgements

Thank you to [Mark Miyashita](https://github.com/negativetwelve) for creating [negativetwelve/react-native-heap-analytics](https://github.com/negativetwelve/react-native-heap-analytics), which was the initial basis for this library!

1 change: 1 addition & 0 deletions __mocks__/react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ reactNative.NativeModules = {
autocaptureEvent: jest.fn(),
setAppId: jest.fn(),
getUserId: jest.fn(),
getSessionId: jest.fn(),
identify: jest.fn(),
resetIdentity: jest.fn(),
addUserProperties: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public void getUserId(Promise promise) {
promise.resolve(Heap.getUserId());
}

@ReactMethod
public void getSessionId(Promise promise) { promise.resolve(Heap.getSessionId()); }

@ReactMethod
public void resetIdentity() {
Heap.resetIdentity();
Expand Down
1 change: 1 addition & 0 deletions app.plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/plugin/build/withHeap');
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ export function resetIdentity(): void;
*/
export function getUserId(): Promise<string>;

/**
* Returns a promise that resolves to the stringified version of the numeric session ID associated with user's current session.
* If called before Heap is initialized it will return a promise that resolves to null.
*/
export function getSessionId(): Promise<string|null>;

/**
* Returns an HOC of a navigation container that autotracks pageviews on navigation change.
*
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/drivers/TestDriver063/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ PODS:
- React-cxxreact (= 0.63.4)
- React-jsi (= 0.63.4)
- React-jsinspector (0.63.4)
- react-native-heap (0.20.0):
- react-native-heap (0.21.0):
- Heap (~> 8.2)
- React
- react-native-safe-area-context (3.3.2):
Expand Down Expand Up @@ -381,8 +381,8 @@ SPEC CHECKSUMS:
React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31
React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949
React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a
react-native-heap: f78f99cd5b74f04521560f7eb54949791432630e
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
react-native-heap: 3cf90b1867d7c7890653bb87cc860148c09bd5ac
react-native-safe-area-context: 5cf05f49df9d17261e40e518481f2e334c6cd4b5
React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336
React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b
React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0
Expand All @@ -393,11 +393,11 @@ SPEC CHECKSUMS:
React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c
React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d
ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNCMaskedView: f127cd9652acfa31b91dcff613e07ba18b774db6
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d
Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6

PODFILE CHECKSUM: 390006146a19c973c8fd37d495b45b5081c96a93

COCOAPODS: 1.11.3
COCOAPODS: 1.9.3

Large diffs are not rendered by default.

Loading

0 comments on commit b8d49f4

Please sign in to comment.