Skip to content

Commit

Permalink
Merge branch 'main' into switch-to-workflow-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
axi92 authored Nov 26, 2024
2 parents cc61146 + c20b425 commit 6c032a3
Show file tree
Hide file tree
Showing 27 changed files with 437 additions and 789 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

20 changes: 10 additions & 10 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,43 +37,43 @@
"types": [
{
"type": "feat",
"section": "Features"
"section": "🎉 Features"
},
{
"type": "fix",
"section": "Bug Fixes"
"section": "🐛 Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
"section": "⚡️ Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
"section": "⏪️ Reverts"
},
{
"type": "docs",
"section": "Documentation"
"section": "📝 Documentation"
},
{
"type": "style",
"section": "Styles"
"section": "🎨 Styles"
},
{
"type": "refactor",
"section": "Code Refactoring"
"section": "🔀 Code Refactoring"
},
{
"type": "test",
"section": "Tests"
"section": "🧪 Tests"
},
{
"type": "build",
"section": "Build System"
"section": "⚙️ Build System"
},
{
"type": "ci",
"section": "Continuous Integration"
"section": "🚀 Continuous Integration"
}
]
},
Expand Down
56 changes: 38 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,63 @@


## [1.0.1](https://github.com/evva-sfw/abrevva-react-native/compare/1.0.0...1.0.1) (2024-08-28)
## [2.0.0](https://github.com/evva-sfw/abrevva-react-native/compare/1.0.1...2.0.0) (2024-10-22)


### ⚠ BREAKING CHANGES

* rename package name

### chore

* rename package name ([5cb649d](https://github.com/evva-sfw/abrevva-react-native/commit/5cb649d521859fbfec62ec006cb8b99da4d47a53))


### Features

* replaced manual disengage logic with AbrevvaSDK disengage function ([#46](https://github.com/evva-sfw/abrevva-react-native/issues/46)) ([b16cf3b](https://github.com/evva-sfw/abrevva-react-native/commit/b16cf3baa897c098d8cf6b431e7c03aa91054395))


### Bug Fixes

* corrected output Path for decryptFileFromURL (android) ([#44](https://github.com/evva-sfw/abrevva-react-native/issues/44)) ([308c8f2](https://github.com/evva-sfw/abrevva-react-native/commit/308c8f29c059dae8e0ed55b63d15f8b7775736bf))
* removed cryptoswift from podfile and formating ([0b6d2c5](https://github.com/evva-sfw/abrevva-react-native/commit/0b6d2c512ec5411b5f2c3cc39eb76844c8849a39))
* removed nfc ([9384a65](https://github.com/evva-sfw/abrevva-react-native/commit/9384a65b4f6d0532964c2690c73cfdbd2dd985d4))
* removed nfc traces ([bbb4042](https://github.com/evva-sfw/abrevva-react-native/commit/bbb404217a60bf514bbdb7c21072bd110f23c41d))
* removed whitespace in string, since toInt throws otherwise ([82e3d6d](https://github.com/evva-sfw/abrevva-react-native/commit/82e3d6d21dd8351610762d382e5ba420e9f34327))


### Documentation

* format readme and add shields.io ([#41](https://github.com/evva-sfw/abrevva-react-native/issues/41)) ([a4efc62](https://github.com/evva-sfw/abrevva-react-native/commit/a4efc6297e72901b61b61ea410ec09b16df15d10))
* change deprecation alert to important ([1ee4c06](https://github.com/evva-sfw/abrevva-react-native/commit/1ee4c06ebb01a546e77c1cc027fff147b4b414c6))


### Build System
### Continuous Integration

* add npm-compatibility-check test ([#43](https://github.com/evva-sfw/abrevva-react-native/issues/43)) ([5b18750](https://github.com/evva-sfw/abrevva-react-native/commit/5b187502a987ca58d0ee1d1061a9e92796797be6))
* add yarn cache to github workflow caching ([#42](https://github.com/evva-sfw/abrevva-react-native/issues/42)) ([b952769](https://github.com/evva-sfw/abrevva-react-native/commit/b9527693868e6a3153c4e036195301a30708cbec))
* fix workflow cache names ([#40](https://github.com/evva-sfw/abrevva-react-native/issues/40)) ([e72bde1](https://github.com/evva-sfw/abrevva-react-native/commit/e72bde1640ae5cfac07aaa8c7752cb364bc0ac08))
* fix test-android gradle target ([cb28d88](https://github.com/evva-sfw/abrevva-react-native/commit/cb28d883cdf3b882e4e8c0b065ec9f9527afc9bf))
* fix version in filename for release ([#45](https://github.com/evva-sfw/abrevva-react-native/issues/45)) ([9e6dbaf](https://github.com/evva-sfw/abrevva-react-native/commit/9e6dbafee8f7f7b748104354213f1d050ddcd6a7))
* reconfigure auto-changelog to only track merge commits ([#52](https://github.com/evva-sfw/abrevva-react-native/issues/52)) ([089cd1a](https://github.com/evva-sfw/abrevva-react-native/commit/089cd1a9d25300fd831157997271bcf585e18c3a))

### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [2.0.0](https://github.com/evva-sfw/abrevva-react-native/compare/1.0.1...2.0.0)

- chore!: rename package to @evva/ instead of @evva-sfw/ [`#60`](https://github.com/evva-sfw/abrevva-react-native/pull/60)
- fix!: removed broken nfc code [`#61`](https://github.com/evva-sfw/abrevva-react-native/pull/61)
- chore(deps-dev): bump @release-it/conventional-changelog from 8.0.1 to 8.0.2 [`#56`](https://github.com/evva-sfw/abrevva-react-native/pull/56)
- ci: reconfigure auto-changelog to only track merge commits [`#52`](https://github.com/evva-sfw/abrevva-react-native/pull/52)
- chore(deps-dev): bump commitlint from 19.4.0 to 19.4.1 [`#48`](https://github.com/evva-sfw/abrevva-react-native/pull/48)
- chore(deps-dev): bump @commitlint/config-conventional from 19.2.2 to 19.4.1 [`#50`](https://github.com/evva-sfw/abrevva-react-native/pull/50)
- chore(deps-dev): bump react-native-builder-bob from 0.29.1 to 0.30.0 [`#49`](https://github.com/evva-sfw/abrevva-react-native/pull/49)
- feat: replaced manual disengage logic with AbrevvaSDK disengage function [`#46`](https://github.com/evva-sfw/abrevva-react-native/pull/46)
- ci: fix version in filename for release [`#45`](https://github.com/evva-sfw/abrevva-react-native/pull/45)

#### [1.0.1](https://github.com/evva-sfw/abrevva-react-native/compare/1.0.0...1.0.1)

> 28 August 2024
- fix: corrected output Path for decryptFileFromURL (android) [`#44`](https://github.com/evva-sfw/abrevva-react-native/pull/44)
- build: add npm-compatibility-check test [`#43`](https://github.com/evva-sfw/abrevva-react-native/pull/43)
- build: add yarn cache to github workflow caching [`#42`](https://github.com/evva-sfw/abrevva-react-native/pull/42)
Expand All @@ -47,16 +78,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: add attest provenance with lint and release workflow [`#29`](https://github.com/evva-sfw/abrevva-react-native/pull/29)
- fix: minor adjustments to scan timeout [`#28`](https://github.com/evva-sfw/abrevva-react-native/pull/28)
- feat: tests for android & ios [`#23`](https://github.com/evva-sfw/abrevva-react-native/pull/23)
- chore: release 1.0.0 [`4ecb13c`](https://github.com/evva-sfw/abrevva-react-native/commit/4ecb13c555bf899f3ad45900c4c9e62f9ed0aa80)

#### [0.1.5](https://github.com/evva-sfw/abrevva-react-native/compare/0.1.4...0.1.5)

> 22 August 2024
- chore: add CHANGELOG.md [`b337c52`](https://github.com/evva-sfw/abrevva-react-native/commit/b337c5234d389eb3a538de817639afe6b4005616)
- chore: release 0.1.5 [`3a77838`](https://github.com/evva-sfw/abrevva-react-native/commit/3a778385e035379153759d0c368872c4c3f09309)
- ci: enable npm upload on release [`56973c1`](https://github.com/evva-sfw/abrevva-react-native/commit/56973c101119399c3df4b567396efe8e403d56c7)

#### [0.1.4](https://github.com/evva-sfw/abrevva-react-native/compare/0.1.0...0.1.4)

> 22 August 2024
Expand All @@ -66,9 +92,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore: moved eslint config to package.json [`#25`](https://github.com/evva-sfw/abrevva-react-native/pull/25)
- chore: minor UI improvements [`#24`](https://github.com/evva-sfw/abrevva-react-native/pull/24)
- chore(deps): bump rexml from 3.2.9 to 3.3.3 in /example [`#22`](https://github.com/evva-sfw/abrevva-react-native/pull/22)
- ci(release-it): checkout via ssh [`fd05e9a`](https://github.com/evva-sfw/abrevva-react-native/commit/fd05e9a0b3da6412acd1f3bdc508ea51e2541fb4)
- ci(release-it): fix release github token for workflow [`425ad0a`](https://github.com/evva-sfw/abrevva-react-native/commit/425ad0ae88de58f74c6efcd8ee449a1121e10477)
- ci: disable npm publish for debugging release-it workflow [`7fdd9d3`](https://github.com/evva-sfw/abrevva-react-native/commit/7fdd9d338e993bbdcb257dfad5ea5c6d68072505)

#### 0.1.0

Expand All @@ -90,6 +113,3 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix: added missing yarn files [`#6`](https://github.com/evva-sfw/abrevva-react-native/pull/6)
- chore: fix internal links [`#3`](https://github.com/evva-sfw/abrevva-react-native/pull/3)
- Update LICENSE [`#4`](https://github.com/evva-sfw/abrevva-react-native/pull/4)
- Initital Project upload [`3524503`](https://github.com/evva-sfw/abrevva-react-native/commit/352450306f13773405be10d5f50c53d14d9dea6f)
- chore(deps-dev): bump @release-it/conventional-changelog [`335c87f`](https://github.com/evva-sfw/abrevva-react-native/commit/335c87f2fed18199e73679b47a699e9cdba2e0a6)
- refactor: added interfaces and restructured app accordingly [`436c12b`](https://github.com/evva-sfw/abrevva-react-native/commit/436c12bf624efcbccd694bf577c3d0e2c4591d32)
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ test-ios:
test || exit 1

test-android:
cd example/android && ./gradlew :evva-sfw_abrevva-react-native:testDebugUnitTest || exit 1
cd example/android && ./gradlew :evva_abrevva-react-native:testDebugUnitTest || exit 1
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
<p align="center">
<h1 align="center">EVVA React-Native Module</h1>
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@evva-sfw/abrevva-react-native">
<img alt="NPM Version" src="https://img.shields.io/npm/v/%40evva-sfw%2Fabrevva-react-native"></a>
<a href="https://www.npmjs.com/package/@evva-sfw/abrevva-react-native">
<img alt="NPM Downloads" src="https://img.shields.io/npm/dy/%40evva-sfw%2Fabrevva-react-native"></a>
<img alt="GitHub package.json dynamic" src="https://img.shields.io/github/package-json/packageManager/evva-sfw/abrevva-react-native">
<img alt="NPM Unpacked Size (with version)" src="https://img.shields.io/npm/unpacked-size/%40evva-sfw%2Fabrevva-react-native/latest">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/evva-sfw/abrevva-react-native">
<a href="https://github.com/evva-sfw/abrevva-react-native/actions"><img alt="GitHub branch check runs" src="https://img.shields.io/github/check-runs/evva-sfw/abrevva-react-native/main"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-EVVA_License-yellow.svg?color=fce500&logo=data:image/svg+xml;base64,PCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0MCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgNjQwIDEwMjQiPgo8ZyBpZD0iaWNvbW9vbi1pZ25vcmUiPgo8L2c+CjxwYXRoIGZpbGw9IiNmY2U1MDAiIGQ9Ik02MjIuNDIzIDUxMS40NDhsLTMzMS43NDYtNDY0LjU1MmgtMjg4LjE1N2wzMjkuODI1IDQ2NC41NTItMzI5LjgyNSA0NjYuNjY0aDI3NS42MTJ6Ij48L3BhdGg+Cjwvc3ZnPgo=" alt="EVVA License"></a>

</p>
# Abrevva React-Native Module

[![NPM Version](https://img.shields.io/npm/v/%40evva%2Fabrevva-react-native)](https://www.npmjs.com/package/@evva/abrevva-react-native)
[![NPM Downloads](https://img.shields.io/npm/dy/%40evva%2Fabrevva-react-native)](https://www.npmjs.com/package/@evva/abrevva-react-native)
![GitHub package.json dynamic](https://img.shields.io/github/package-json/packageManager/evva-sfw/abrevva-react-native)
![NPM Unpacked Size (with version)](https://img.shields.io/npm/unpacked-size/%40evva%2Fabrevva-react-native/latest)
![GitHub last commit](https://img.shields.io/github/last-commit/evva-sfw/abrevva-react-native)
[![GitHub branch check runs](https://img.shields.io/github/check-runs/evva-sfw/abrevva-react-native/main)]([URL](https://github.com/evva-sfw/abrevva-react-native/actions))
[![EVVA License](https://img.shields.io/badge/license-EVVA_License-yellow.svg?color=fce500&logo=data:image/svg+xml;base64,PCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0MCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgNjQwIDEwMjQiPgo8ZyBpZD0iaWNvbW9vbi1pZ25vcmUiPgo8L2c+CjxwYXRoIGZpbGw9IiNmY2U1MDAiIGQ9Ik02MjIuNDIzIDUxMS40NDhsLTMzMS43NDYtNDY0LjU1MmgtMjg4LjE1N2wzMjkuODI1IDQ2NC41NTItMzI5LjgyNSA0NjYuNjY0aDI3NS42MTJ6Ij48L3BhdGg+Cjwvc3ZnPgo=)](LICENSE)

> [!IMPORTANT]
> This package was renamed please use the new package name! __@evva/abrevva-react-native__
The EVVA React-Native Module is a collection of tools to work with electronical EVVA access components. It allows for scanning and connecting via BLE.

Expand Down Expand Up @@ -41,7 +37,7 @@ The EVVA React-Native Module is a collection of tools to work with electronical
## Installation

```
yarn add @evva-sfw/abrevva-react-native
yarn add @evva/abrevva-react-native
```

### iOS
Expand All @@ -59,7 +55,7 @@ Perform a gradle sync.
To start off first import `AbrevvaBle` from this module

```typescript
import { AbrevvaBle } from '@evva-sfw/abrevva-react-native';
import { AbrevvaBle } from '@evva/abrevva-react-native';

async function scanForBleDevices(androidNeverForLocation: Boolean = true, timeout: Number) {
await AbrevvaBle.initialize(androidNeverForLocation);
Expand Down
2 changes: 1 addition & 1 deletion abrevva-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pod::Spec.new do |s|

s.dependency "CocoaMQTT"
s.dependency "CryptoSwift"
s.dependency "AbrevvaSDK", '~> 1.0.23'
s.dependency "AbrevvaSDK", '1.0.31'

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ repositories {
def kotlin_version = getExtOrDefault("kotlinVersion")

dependencies {
implementation group: "com.evva.xesar", name: "abrevva-sdk-android", version: "1.0.19"
implementation group: "com.evva.xesar", name: "abrevva-sdk-android", version: "1.0.21"

implementation "com.facebook.react:react-native:0.20.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
Expand Down
1 change: 0 additions & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.evva.xesar.abrevva.reactnative">

<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.annotation.RequiresPermission
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import com.evva.xesar.abrevva.ble.BleManager
import com.evva.xesar.abrevva.nfc.toHexString
import com.evva.xesar.abrevva.util.bytesToString
import com.evva.xesar.abrevva.util.stringToBytes
import com.facebook.react.bridge.Arguments
Expand Down Expand Up @@ -448,12 +447,10 @@ class AbrevvaBleModule(reactContext: ReactApplicationContext) :
if (scanRecordBytes != null) {
try {
// Extract EVVA manufacturer-id
val arr = byteArrayOf(0x01)
arr.toHexString()
val keyHex = byteArrayOf(scanRecordBytes.getByte(6)!!).toHexString() + byteArrayOf(
val keyHex = byteArrayOf(scanRecordBytes.getByte(6)!!) + byteArrayOf(
scanRecordBytes.getByte(5)!!
).toHexString()
val keyDec = keyHex.toInt(16)
)
val keyDec = bytesToString(keyHex).replace(" ", "").toInt(16)

// Slice out manufacturer data
val bytes = scanRecordBytes.copyOfRange(7, scanRecordBytes.size)
Expand Down
Loading

0 comments on commit 6c032a3

Please sign in to comment.