Skip to content

Commit 68d76c1

Browse files
Implement Transitional API
Update HyperTrack Android SDK to 6.4.0. Update HyperTrack iOS SDK to 4.14.0. Update method descriptions. Update LICENSE. Update README according to specs for wrappers. Update CONTRIBUTING according to specs for wrappers. Update package description. Rename plugin native classes names. Fix parsing geotag data.
1 parent b6229a6 commit 68d76c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+16496
-11659
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ node_modules/
5353
npm-debug.log
5454
yarn-debug.log
5555
yarn-error.log
56+
.yarn/*
57+
5658

5759
# BUCK
5860
buck-out/

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

CHANGELOG.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
# Changelog
2-
All notable changes to this project will be documented in this file.
32

43
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
54
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
65

6+
## [9.0.0] - 2023-02-17
7+
8+
### Changed
9+
- Updated HyperTrack iOS SDK to 4.14.0
10+
- Updated HyperTrack Android SDK to 6.4.0
11+
- `createInstance()` renamed to `initialize()`
12+
- `getDeviceID()` renamed to `getDeviceId()`
13+
- `syncDeviceSettings()` renamed to `sync()`
14+
- `setDeviceName()` renamed to `setName()`
15+
- `subscribeToErrors()` callback now has param type (`HyperTrackError`)
16+
- `LocationError` now has different structure
17+
18+
### Added
19+
- `initialize()` configuration params for
20+
- Debug logging
21+
- Background location permissions request for Android
22+
- Mock locations
23+
- `subscribeToAvailability()`
24+
25+
### Removed
26+
- `enableDebugLogging()` (use `initialize()` param `loggingEnabled` istead)
27+
- `setTripMarker()` (use `addGeotag` instead)
28+
729
## [8.2.2] - 2022-10-10
830
### Fixed
931
- Deployment target for iOS changed to 11, to comply with native iOS SDK.

CONTRIBUTING.md

Lines changed: 32 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
# Contributing
22

3-
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.
3+
## FAQ
4+
5+
### How to update the HyperTrack SDK version and make a release?
6+
7+
1. Update SDK version constant
8+
- android
9+
- android/gradle.properties - HyperTrackSdk_HyperTrackSDKVersion
10+
- ios
11+
- hypertrack-sdk-react-native.podspec
12+
- s.dependency 'HyperTrack/Objective-C', '**version**'
13+
14+
2. Increment wrapper version
15+
16+
- package.json
17+
- version
18+
19+
3. Update CHANGELOG.md
20+
4. Update badge in README.md
21+
5. Commit
22+
5. Create a version tag
23+
6. Push branch and tags
24+
7. Create a Github repo release
25+
- Release title should be the current version tag
26+
8. `yarn release`
27+
- will generate docs
28+
9. `yarn npm publish`
29+
30+
### How to change build config
31+
32+
#### Android
33+
34+
Change Android build config in `android/gradle.properties`
435

536
## Development workflow
637

@@ -25,37 +56,12 @@ To fix formatting errors, run the following:
2556
yarn lint --fix
2657
```
2758

28-
Remember to add tests for your change if possible. Run the unit tests by:
29-
30-
```sh
31-
yarn test
32-
```
33-
3459
### Linting and tests
3560

3661
[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)
3762

3863
We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
3964

40-
### Publishing to npm
41-
42-
We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc.
43-
44-
To publish new versions, run the following:
45-
46-
```sh
47-
yarn release
48-
```
49-
50-
### Scripts
51-
52-
The `package.json` file contains various scripts for common tasks:
53-
54-
- `yarn bootstrap`: setup project by installing all dependencies.
55-
- `yarn typescript`: type-check files with TypeScript.
56-
- `yarn lint`: lint files with ESLint.
57-
- `yarn test`: run unit tests with Jest.
58-
5965
### Sending a pull request
6066

6167
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
@@ -68,87 +74,3 @@ When you're sending a pull request:
6874
- Follow the pull request template when opening a pull request.
6975
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
7076

71-
## Code of Conduct
72-
73-
### Our Pledge
74-
75-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
76-
77-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
78-
79-
### Our Standards
80-
81-
Examples of behavior that contributes to a positive environment for our community include:
82-
83-
- Demonstrating empathy and kindness toward other people
84-
- Being respectful of differing opinions, viewpoints, and experiences
85-
- Giving and gracefully accepting constructive feedback
86-
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
87-
- Focusing on what is best not just for us as individuals, but for the overall community
88-
89-
Examples of unacceptable behavior include:
90-
91-
- The use of sexualized language or imagery, and sexual attention or
92-
advances of any kind
93-
- Trolling, insulting or derogatory comments, and personal or political attacks
94-
- Public or private harassment
95-
- Publishing others' private information, such as a physical or email
96-
address, without their explicit permission
97-
- Other conduct which could reasonably be considered inappropriate in a
98-
professional setting
99-
100-
### Enforcement Responsibilities
101-
102-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
103-
104-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
105-
106-
### Scope
107-
108-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
109-
110-
### Enforcement
111-
112-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
113-
114-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
115-
116-
### Enforcement Guidelines
117-
118-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
119-
120-
#### 1. Correction
121-
122-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
123-
124-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
125-
126-
#### 2. Warning
127-
128-
**Community Impact**: A violation through a single incident or series of actions.
129-
130-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
131-
132-
#### 3. Temporary Ban
133-
134-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
135-
136-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
137-
138-
#### 4. Permanent Ban
139-
140-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
141-
142-
**Consequence**: A permanent ban from any sort of public interaction within the community.
143-
144-
### Attribution
145-
146-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
147-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
148-
149-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
150-
151-
[homepage]: https://www.contributor-covenant.org
152-
153-
For answers to common questions about this code of conduct, see the FAQ at
154-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

LICENSE renamed to LICENSE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# License
2+
13
MIT License
24

35
Copyright (c) 2019 HyperTrack

README.md

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,39 @@
11
# React Native HyperTrack SDK
22

3-
![GitHub](https://img.shields.io/github/license/hypertrack/sdk-react-native.svg) ![npm](https://img.shields.io/npm/v/hypertrack-sdk-react-native.svg) ![iOS SDK](https://img.shields.io/badge/iOS%20SDK-4.13.0-brightgreen.svg) ![Android SDK](https://img.shields.io/badge/Android%20SDK-6.3.0-brightgreen.svg)
3+
![GitHub](https://img.shields.io/github/license/hypertrack/sdk-react-native.svg)
4+
![npm](https://img.shields.io/npm/v/hypertrack-sdk-react-native.svg)
5+
![iOS SDK](https://img.shields.io/badge/iOS%20SDK-4.14.0-brightgreen.svg)
6+
![Android SDK](https://img.shields.io/badge/Android%20SDK-6.4.0-brightgreen.svg)
47

58
[HyperTrack](https://www.hypertrack.com) lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons.
69

7-
React Native HyperTrack SDK is a wrapper around native iOS and Android SDKs that allows to integrate them into React Native apps.
10+
React Native HyperTrack SDK is a wrapper around native iOS and Android SDKs that allows to integrate HyperTrack into React Native apps.
811

9-
## Installation
10-
11-
For information about how to get started with React Native SDK, please visit this [HyperTrack Guide](https://www.hypertrack.com/docs/install-sdk-react-native).
12-
13-
## Documentation
14-
15-
[https://hypertrack.github.io/sdk-react-native/](https://hypertrack.github.io/sdk-react-native/)
12+
For information about how to get started with React Native HyperTrack SDK, please check this [Guide](https://www.hypertrack.com/docs/install-sdk-react-native).
1613

17-
## FAQ
18-
19-
link to FAQ
20-
21-
## Support
14+
## Installation
2215

23-
Join our [Slack community](https://join.slack.com/t/hypertracksupport/shared_invite/enQtNDA0MDYxMzY1MDMxLTdmNDQ1ZDA1MTQxOTU2NTgwZTNiMzUyZDk0OThlMmJkNmE0ZGI2NGY2ZGRhYjY0Yzc0NTJlZWY2ZmE5ZTA2NjI) for instant responses. You can also email us at help@hypertrack.com.
16+
[Install from NPM](https://www.npmjs.com/package/hypertrack-sdk-react-native)
2417

25-
#### How to update the HyperTrack SDK version?
18+
## Sample code
2619

27-
1. Update SDK constant
20+
[Quickstart React Native app](https://github.com/hypertrack/quickstart-react-native)
2821

29-
- android
30-
- android/gradle.properties - HyperTrackSdk_HyperTrackSDKVersion
31-
- ios
32-
- hypertrack-sdk-react-native.podspec
33-
- s.dependency 'HyperTrack/Objective-C', '**version**'
22+
## Wrapper API Documentation
3423

35-
2. Increment wrapper version
36-
- package.json
37-
- version
38-
3. Update changelog
39-
4. Update badge in README.md
40-
5. Create a version tag
41-
6. Commit and push
42-
7. Create a release
43-
- Release title should be the current version tag
44-
8. npm publish
24+
[Wrapper API Documentation](https://hypertrack.github.io/sdk-react-native/)
4525

46-
### How to change build config
26+
## Requirements
4727

48-
Change Android build config in `android/gradle.properties`
28+
### Android
4929

50-
### Old React Native versions specifics:
30+
- Gradle version 6.7.1+
31+
- compileSdkVersion 31+
5132

52-
#### Android
33+
### iOS
5334

54-
- Gradle version should be 6.7.1 or higher
55-
- compileSdkVersion should be 31 or higher
35+
- iOS version 12.4+
5636

57-
#### iOS
37+
## Contributing
5838

59-
- Platform version should be 12.4 or higher
39+
If you want to contribute check [CONTRIBUTING.md](CONTRIBUTING.md)

0 commit comments

Comments
 (0)