Skip to content

Conversation

fabOnReact
Copy link
Owner

Summary

  • add react-native-watch-connectivity dependency
  • introduce AppleWatchConnector for session activation and iOS messaging
  • document Apple Watch Xcode setup and pairing instructions

Testing

  • yarn lint (fails: ESLint couldn't find the plugin "eslint-plugin-ft-flow")
  • yarn add -D eslint-plugin-ft-flow (fails: tunneling socket could not be established, statusCode=403)
  • yarn test (fails: Cannot find module '@react-native/babel-preset')
  • yarn typecheck

https://chatgpt.com/codex/tasks/task_e_68b70279fe1c8320be435d92b67297ad

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 +24 to +36
const iosAddListener: AddListener = (event, cb) => {
if (!event) {
throw new Error('Must pass event');
}

let watchEvents: WatchEvents = {
addListener: _addListenerMock,
on: _addListenerMock,
switch (event) {
case 'message':
break;
default:
throw new Error(`Unknown watch event "${event}"`);
}

const sub = appleWatchEvents.addListener(event, cb);

Choose a reason for hiding this comment

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

[P1] Activate WCSession before registering iOS listeners

The new iOS code registers event listeners directly via appleWatchEvents.addListener but never activates the underlying WatchConnectivity session. Activation currently only happens inside AppleWatchConnector.sendMessage, so an app that starts by listening for incoming watch messages (without sending anything first) will never activate the session and will miss all events. Call appleWatchConnector.activateSession() before subscribing so inbound watch messages are received even when no outbound message is sent.

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