Skip to content

Settings.watchKeys(...) callback not fired when Settings.set() is used #21607

Closed
@benzman81

Description

@benzman81

Environment

React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 57.88 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
react-native-app-id: 0.0.5
react-native-cli: 2.0.1

Description

When registering a callback via Settings.watchKeys, then it is never called if a value for a watched key is changed via Settings.set(). Only if I add a Settings.bundle to Xcode and change the Value via the iOS Settings app, then the callback is called.

Reproducible Demo

Simply register a callback on "foo" via Settings.watchKeys and call Settings.set{foo:"new Value"} later. The callback will not be called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions