Skip to content

Conversation

fabOnReact
Copy link
Owner

Summary

  • install Garmin connector package
  • add GarminConnector wrapper around Garmin SDK
  • document Garmin SDK setup in README

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Comment on lines +21 to +29
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> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant