Skip to content

Latest commit

 

History

History
392 lines (258 loc) · 41.7 KB

File metadata and controls

392 lines (258 loc) · 41.7 KB

Changelog

0.5.0 (2026-07-12)

⚠ BREAKING CHANGES

  • 📦 Package renamed to react-native-step-counter-newarch (previously @dongminyu/react-native-step-counter). Update your dependency and every import path. The unscoped react-native-step-counter name is blocked by npm's name-similarity check (it normalizes to the same string as the 2016 react-native-stepcounter fork of react-native-pedometer), so the New Architecture identity is signaled with a -newarch suffix. The GitHub repository is unchanged. (6f9caab)

Bug Fixes

  • 🐛 JSDoc type parsing: Corrected the @returns inline object type in the doc comments (;,) so jsdoc can parse the type expression and generate the API documentation. (a415320)

Documentation

  • 📝 Knowledge layer reconciled: Aligned CLAUDE.md, AGENTS.md, and the Serena memory files with the current code — public API surface, Jest preset, Node channel, React Native peer range, and the timestamp flow. (c53b351)
  • 📝 Regenerated the JSDoc API documentation. (e6b0054)

Chore Changes

  • 🔨 Quoted the NODE_BINARY command in the iOS example build for consistency. (b13954c)
  • 👷 Added native Android and iOS example build workflows. (10d9750)
  • 🔒 Resolved reported OSV advisories in transitive/dev dependencies via Yarn resolutions (ws, undici, js-yaml, joi, launch-editor, shell-quote, tar, @babel/core). The pin-blocked concurrent-ruby advisories — example iOS build tooling, not shipped in the package — are recorded in example/osv-scanner.toml.

0.4.0 (2026-05-24)

Features

  • Live step-count false-positive filter: Added createStepCountFilter() to drop burst updates that imply an unrealistic cadence, such as hand-rotation false positives, and rebase later cumulative step and distance values.

Bug Fixes

  • 🐛 Example app start flow: The example now checks capability and requests motion/activity permission before starting updates, and relies on the library-owned subscription cleanup instead of manually removing the returned subscription.
  • 📱 Example app layout stability: Reworked the example screen layout so the progress value and LogCat panel stay visible across Android and iOS viewport sizes.

Documentation

  • 📝 README setup guidance: Simplified the installation and platform setup docs, removed stale pnpm, walking_tracker, and New Architecture setup sections, and documented the Android accelerometer fallback plus the new live-update filter helper.

Chore Changes

  • 🔒 Patched vulnerable transitive dependencies and refreshed the test/build stack for the current React Native example app.
  • 🔨 Updated example app build, Podfile, Gradle, Gemfile, and generated-documentation organization after v0.3.1.

0.3.1 (2026-05-01)

Bug Fixes

  • 🐛 Android step count initialization regression: StepCounterService.updateCurrentSteps() used .equals(0.0) to detect an uninitialized baseline, but .equals() on a Kotlin Double performs reference equality on the boxed object and always returns false. The baseline was never established, so step deltas were computed from 0.0 on every sensor event instead of the first raw reading. Fixed by replacing .equals(0.0) with == 0.0 (value equality). (android/services/StepCounterService.kt)

  • 💥 AccelerometerService crash on stationary device: SensorFusionMath.normalize() divided each vector component by norm(vector) without guarding against a zero-magnitude input. A stationary device can produce a zero accelerometer vector, causing ArithmeticException and crashing the accelerometer fallback path. Fixed by returning a copy of the original vector when the norm is zero. (android/utils/SensorFusionMath.kt)

  • 🔒 iOS data race on shared step-counter state: _baselineSteps, _lastEmittedSteps, _baselineReady, and _sessionStartDate were read and written from the main thread (startStepCounterUpdate, stopStepCounterUpdate) and concurrently from CMPedometer background handler blocks with no synchronization. Introduced a dedicated serial dispatch queue (stateQueue) and wrapped all shared-state accesses in dispatch_sync(stateQueue, ^{...}) to eliminate the data race. (ios/StepCounter.mm)

Improvements

  • 🔷 CounterType union type: The counterType field in StepCountData now uses the exported CounterType union ("STEP_COUNTER" | "ACCELEROMETER" | "CMPedometer") instead of the opaque string type, reflecting the actual values emitted by both native platforms. (src/NativeStepCounter.ts)

  • 🔷 Precise isStepCountingSupported() return type: Return type narrowed from Promise<Record<string, boolean>> to Promise<{ supported: boolean; granted: boolean }>, making the shape explicit and enabling direct destructuring without type assertions. (src/NativeStepCounter.ts, src/index.tsx)

Migration Notes

If you declare a local variable with type StepCountData and assign counterType directly (e.g. in test fixtures), replace the value with one of "STEP_COUNTER", "ACCELEROMETER", or "CMPedometer". Data received from native event callbacks is not affected—the native layer has always emitted only these three values.

0.3.0 (2026-02-20)

Features

  • 🏗️ NEW_ARCH enabled by default and TurboModule migration: The module/build setup is now aligned with the New Architecture baseline. (595aa1e, 347ff18, 494cc0b)
  • ⬆️ RN/build-chain upgrades: React Native was raised in stages (0.73.5 -> 0.79 -> 0.83.0), with Android/iOS build dependencies modernized. (c219866, c4d47ee, 045d211)
  • ♻️ iOS implementation/structure refresh: The iOS path was reworked and stabilized around an Objective-C++ (.mm) implementation. (8d2160b, f48ea09, 84ff756)

Bug Fixes

  • 🐛 Major compatibility/stability fixes applied: Focused fixes landed for sensor initialization, Pod/CI caching, and example app build stability. (0623c33, db16195, 241d438)
  • 🧩 Community feedback workflow tightened: Issue/PR templates and development docs were improved to make reported issues and PR handling clearer. (e09e32d, 739a808, 3ce3309)
  • 🎯 iOS step count accuracy overhauled: Replaced the simple cumulative monotonic filter with a two-phase baseline/delta approach. queryPedometerDataFromDate:toDate: first captures steps already taken since the session start (baseline), then startPedometerUpdatesFromDate: live-updates emit only the delta above that baseline. This eliminates the ~150-step jump caused by CMPedometer catch-up on session start, and prevents backward jumps caused by iOS interleaving activity-window updates. (323e1fa, cf8f0b8, eb12de9, df893c9)
  • 📡 iOS bridgeless mode (RCTHost) support: In New Architecture bridgeless mode _bridge is nil. Added @synthesize callableJSModules = _callableJSModules and a custom sendEventWithName:body: override that routes events through callableJSModules → RCTDeviceEventEmitter first, falling back to the legacy bridge path. Events now arrive correctly in both bridge-based and bridgeless New Architecture builds. (1b70808, cd2491b)
  • 🕐 iOS timestamp unit safety: Added a from > 1e12 guard to auto-detect accidentally passed millisecond timestamps and convert them to seconds, plus a non-positive fallback to "now" (c16d423). A 60-second future-timestamp clamp, preventing sessions from starting in the future, was added later the same day when the guard block was rewritten (323e1fa).
  • 🔌 JS subscription isolation: stopStepCounterUpdate previously called removeAllListeners, which silently removed subscriptions created outside the library (e.g. debug log components). The library now tracks only its own _activeSubscription and removes only that handle, leaving external subscribers intact. (df893c9, eb12de9)

Performance Improvements

  • ⚡️ Improved Android module performance/structure around the TurboModule path. (347ff18)

Documentation

  • 📝 Installation/development guides were refreshed for current RN versions and architecture expectations. (3ce3309)

Issue/PR Status (Updated at Release Finalization)

  • PR #39Closed/Merged: react-native peer range is fixed to >=0.71.0.
  • #47Closed: Resolved in v0.3.0 through Kotlin 2.0.21 + TurboModule migration, with Expo workflow limitations documented.
  • #52Closed: Reset is supported via stopStepCounterUpdate() -> startStepCounterUpdate(new Date()), including iOS baseline reset behavior.
  • #54Closed: React Native 0.63 is unsupported; minimum peer dependency is explicitly enforced as react-native >=0.71.0.
  • #56Closed: Fixed in v0.3.0 via callableJSModules integration and sendEventWithName:body: override.
  • #49Closed: App-killed background tracking is not supported; historical date usage guidance was clarified.
  • PR #58Closed: README already reflected the correct package name.
  • PR #57Closed: callableJSModules-based approach was already implemented in v0.3.0.
  • PR #51Closed: Covered by the current immediate-initialization strategy.

0.2.5 (2024-03-16)

Bug Fixes

  • ➖ remove peer dependencies in package.json (b3e7191)
  • ➖ remove yarn-specific resolutions field that doesn't apply to npm developers (c16ea2f)
  • ⬆️ upgrade gradle versions and removing deprecated settings (d962093)
  • 🐛 merge forked branch 'Ugur-Atakan/main' (952c196), closes #40
  • 📌 cocoapods 1.15 introduced a bug which break the build (a634d22)

Performance Improvements

  • ➕ add @react-native/typescript-config package as dev dependencies (7845558)
  • ⬆️ apply audit and upgrade flags across packages (ab8a509)
  • ⬆️ replaced metro-react-native-babel-preset to @react-native/babel-preset (2b10ae5)
  • ⬆️ replaced metro-react-native-babel-preset to @react-native/babel-preset (26b1e19)
  • 📦️ upgrade npm packages version (fa0b47b)

0.2.4 (2024-01-06)

Performance Improvements

  • ⬆️ upgrade cocoapods version (5fd2625)
  • upgrade npm dependencies (17de3ea)

0.2.3 (2023-10-15)

Chore Changes

  • Add Example App Link and Notices

0.2.2 (2023-10-14)

Bug Fixes

  • 🚨 RNStepCounter -> StepCounter #29 (279c1f5)
  • android: 🔥 remove unnecessary Gradle scripts (06e6dc9)
  • both: 🔥 remove related to Concurrent React (f7abb92)
  • ios: 🔥 remove dev-staged StepCounterExample (5ae2eec)
  • remove required toolchain java 8 (a24c40a)
  • step counter module backward compatibility (e114df6)

Performance Improvements

  • deps: ⬆️ updated all dependencies (23c6f23)

Documentation

  • doc: 📝 changed contribute, license details (7fbf7b7)

0.2.1 (2023-08-25)

Bug Fixes

  • 🚨 RNStepCounter -> StepCounter (2441e3e)
  • 🚨 RNStepCounter -> StepCounter #29 (df1f904)

0.2.0 (2023-08-20)

Features

  • upgrade react-native-reanimated from 2.17.0 to 3.2.0 (#23) (31aa2c8)

Bug Fixes

  • 🎨 redefine of namespace StepCounter (b8931ea)
  • 🚚 modified Android Code and Some Namespaces (5dcfa6d)
  • 🚨 updated eslint, editorconfig, git, prettier, nvm, watchman, commitlint, ts (a0a2bfb)
  • upgrade react-native from 0.71.6 to 0.71.7 (531f12c)
  • upgrade react-native-gesture-handler from 2.10.2 to 2.11.0 (27b5a5e)
  • upgrade react-native-gesture-handler from 2.9.0 to 2.10.0 (e66302e)
  • upgrade react-native-reanimated from 2.15.0 to 2.16.0 (07283ba)

Performance Improvements

  • ⚡️ updated iOS example application configuration (81561af)

Documentation

  • 📝 reformatted jsdoc generated api-document (4d52438)
  • example: 📝 jsdoc-theme updated (f7196b6)

0.1.16 (2023-04-11)

0.1.15 (2023-04-08)

0.1.14 (2023-04-08)

0.1.13 (2023-04-08)

Documentation

  • react: 📝 all codes are documented now (1ab93b0)

0.1.12 (2023-04-07)

Bug Fixes v0.1.12

  • example: 🔥 remove high vulnerability dependencies (1cfdc7e), closes #2

Performance Improvements v0.1.12

  • example: ➕ install react-native-gesture-handler from peer-dependencies (897547d)
  • example: ⬆️ upgraded all dependencies (react-native,trunk.io,node-version,gem,pods) (cbe50f3)

Documentation v0.1.12

  • example: 📝 updated document build system (d685238)

0.1.11 (2023-03-15)

Bug Fixes v0.1.11

  • ⬇️ iOS platform minimum target reduced, fix some typo of documents (bc1366a)

0.1.10 (2023-03-14)

Performance Improvements v0.1.10

  • iOS: ⬆️ all .m files in StepCounter folder should be renamed to .mm (983be85), closes #1

Documentation v0.1.10

  • react: ✏️ @yusungLEVIT reported typo fixed (09a3056), closes #8
  • react: 📝 wrote a detailed document on importing turbo-module (8d8800a), closes #10

0.1.9 (2023-03-09)

Features v0.1.9

  • android: ⚡️ Stabilize Android functionality (43dc577)

0.1.8 (2023-03-08)

Performance Improvements v0.1.8

  • android: ⚡️ implementation of the Lifecycle Event Listener (dfe9358)

0.1.7 (2023-03-06)

Performance Improvements v0.1.7

  • iOS: ⚡️ issue with the RCTCallableJSModule solved (eecdfd2), closes #2

0.1.6 (2023-03-06)

Bug Fixes

  • example: 🐛 xcode build was trying to locate an "extension point" (6f232f5)
  • iOS: 🚑️ implementation of the sendEvent method (de70534), closes #1

Features

  • iOS: ✨ step detector was also implemented in iOS to increase Step Counter efficiency (625889c)

0.1.5 (2023-03-04)

Bug Fixes v0.1.5

  • android: 🔨 accelerometer permission removed (4105c89)
  • android: 🔨 add some useful npm scripts (a525d69)

Features v0.1.5

  • example: ✨ write example codes and make some test-visible property (6297b95)

0.1.4 (2023-03-04)

Features v0.1.4

  • android: 🔨 move initialize service code for demo app (dfb11cf)

0.1.3 (2023-03-03)

Bug Fixes v0.1.3

  • android: 🏗️ make new-architecture non-require (f5442f5)
  • android: 🔨 gradle project problems solved (16ae7ea)
  • android: 🚑 accelerometer filter hotfix (317a1b9)
  • ios: 🏗️ make new-architecture non-require (c674a9c)
  • iOS: 🐛 iOS implemented codes Fixed (9d5cfb0)

Features v0.1.3

  • iOS: ✨ rewrite implementation iOS specific codes (78de416)
  • iOS: 🐛 event emitter is working now (cd3a1a9)

0.1.2 (2023-03-01)

Performance Improvements v0.1.2

  • 🔖 release new package version v0.1.1 (f56bf11)

0.1.1 (2023-03-01)

Documentation v0.1.1

  • app: 📝 modified README.md for the new interface (94a2434)
  • android: 📝 Completed documentation of Android codes.. (a74a952)
  • all: ✏️ move declaration JSDoc & write README (d9f24f4)
  • app: 📝 updated documents and example codes (7cfe93b)
  • example: 📝 edit typescript example app code (8672b2a)
  • package: 📝 edit README.md for deployment of package (17966ee)

New Feature

  • react: ✨ make main methods for module & configs release (d168036)
  • example: ✨ android implement starting (fd0e7ba)
  • example: ✨ feature interface is changing (d3f0329)
  • example: ⚡️ Users can see how far they've walked all day today. (f903321)
  • example: 🐛 Debug Configuration changed (4a83d28)
  • iOS: ✨ iOS CoreMotion Module Implemented (282ef50)
  • android: ✨ completed step-counter (f7b106f)
  • android: 🏗️ split accelerometer and step_counter (b35b1a3)

Bug Fixes v0.1.1

  • android: 🐛 accelerometer step counting fixing. (3e0c95c)
  • android: 🐛 accelerometer step counting fixing. (b33f27a)
  • android: 🔥 remove useless permission services (before stash) (308371f)
  • android: 🔥 remove useless permission services: resolved (e42089b)
  • android: 🚀 Debug behavior, but not satisfactory (7014b87)
  • android: 🐛 Service does not need to have react context:1 (4c56649)
  • android: 🐛 Service does not need to have react context:2 (f7b673a)
  • android: 🐛 Service does not need to have react context:3 (f1ea15b)
  • android: ⚡️ codes that implemented Service class are removed (541a70e)
  • android: 🐛 there was a time unit problems (ns, ms..). so fixed it (c93b840)
  • android: 🚑 sensor accuracy was too high (dd0193f)
  • android: 🚑️ too much high accuracy issue resolved (3cdda1d)

0.1.0 (2023-02-27)

Other Changes pre-release

  • all: 🎉 initial commit (100b61f)
  • all: 🔧 set configuration file with trunk (ae7c140)
  • all: ➕ update and install dependencies (4e205d3)
  • all: ♻️ simple format w/Trunk (786333f)
  • all: 🚨 disable some linters (342cb80)
  • react: 🍻 drunkenly wrote implementation TS code. (ac6af00)
  • all: 🔧 lint option setting changed (846d6b4)
  • android: 🧱 step-counter-module android frame (0b49162)
  • android: 🍻 step-counter-module android modules (79c7c23)
  • android: 🏗️ convert all .java to .kt (aa970e0)
  • android: 🏗️ finished migration to kotlin (c07575f)
  • android: 🩹 make it better kotlin grammar (5f21468)
  • android: 🚧 building android project architecture (311e6e8)
  • all: ➖ Remove a dependency (f0de273)
  • react: 🤡 implement methods listing (f5cd33e)
  • android: 🧱 android implement methods creating (6ae94ab)
  • all: 🔨 upgrade specific versions (fe73f2e)
  • android: 🚧 WIP: fixed manifest error (d23d2f9)
  • android: 🐛 WIP: android step-counter bug-fixed (cb274d3)
  • android: 🚧 WIP: re-implement permission service (1e32147)
  • all: 🚧 WIP: do not re-invent the wheel (2ee6670)
  • android: 🚧 WIP: PermissionService, StepCounterService fixing (201d65d)
  • android: ⚰️ remove non-safe non-null(!!) syntax (ce925d3)
  • android: 🚧 WIP: permission asking modal doesn't work. (cedac10)
  • android: 🐛 referenced by google-android-simple-pedometer (6fe674f)
  • android: 🐛 some critical error caused (a5c66c2)
  • android: ♻️ permission codes completed & add native-spec (cda5f48)
  • android: 🐛 Fixed android bugs (a893d25)
  • android: ⚰️ Remove dead code (209b83e)
  • react: 🥅 TypeScript Bridge error caught (2fc2506)
  • iOS: 🚸 iOS code implementation (3199acb)
  • android: 🐛 critical bugs resolved. (739cd91)
  • all: 🔧 git workflow and git ignore settings changed (b48debb)
  • iOS: 🐛 update node_modules and pods. (c50765b)
  • android: 🔧 fix some typo (hardware.sensor) (46dab76)
  • all: 🔥 disabled TypeScript beta version's experimental features (e04d261)
  • android: ✨ all logic of android implemented. (f8e7b73)
  • android: ⚡️ step counter delay configured (e639284)
  • android: ⚡️ improve android developing performance (7bd1785)
  • android: 🔥 moved permissions feature to library (35d804c)
  • android: 👷 add gradlePluginPortal repo (47cd8f2)
  • android: 🐛 all time units are changed to milliseconds (9f096cb)
  • app: 🔥 remove native permission codes (512399c)
  • iOS: 🔥 remove unused swift codes (b414ff9)
  • android: 🔧 add google service API (63c0cb1)

Code Refactoring pre-release

  • android: ♻️ deduplicate android codes & added javadoc & JSDoc (31bf912)
  • react: 🥅 TypeScript Bridge source changed (c4a7dbc)
  • android: 🐛 Fixed android native bugs (1a542e4)
  • android: 🐛 change visibility of methods (59a3016)
  • android: ✨ Android Accelerometer Event Convert (d017598)
  • all: 🏗️ configure architecture (ec76a6c)

Revert pre-release

  • android: 🐛 step detector codes revert to previous (c133326)