Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| initialize(): Promise<void> { | ||
| // The SDK exposes an initialize call which prepares the connection layer. | ||
| return GarminConnect.initialize(); | ||
| } | ||
|
|
||
| /** | ||
| * Sends a payload to a paired Garmin device. | ||
| */ | ||
| sendMessage(message: Record<string, unknown>): Promise<void> { |
There was a problem hiding this comment.
[P1] Guard Garmin connector when native module is unavailable
The new wrapper calls GarminConnect.initialize() and GarminConnect.sendMessage() directly. On iOS (and on Android projects that haven’t copied Garmin’s native SDK yet), react-native-garmin-connect resolves to undefined, so invoking either method will throw a runtime exception as soon as the connector is used. Other APIs in this package (sendMessage, watchEvents) already gate native calls behind platform checks to avoid crashing on unsupported platforms. The Garmin connector should similarly no-op or warn when the native module is missing so that importing the package in cross‑platform code doesn’t crash apps that aren’t set up for Garmin yet.
Useful? React with 👍 / 👎.
Summary
Testing
yarn test(fails: Cannot find module '@react-native/babel-preset')yarn lint(fails: ESLint couldn't find the plugin "eslint-plugin-ft-flow")https://chatgpt.com/codex/tasks/task_e_68b70272d14083208e9a5c615a5f92e1