Skip to content

Not getting a push to start token #74

@nathan-charles

Description

@nathan-charles

Library Version

0.4.1

React Native Version

0.81.4

React Version

19.1.0

Expo Version

54.0.13

Minimal Reproduction

  useEffect(() => {
    const updateTokenSubscription = LiveActivity.addActivityTokenListener(
      ({ activityID, activityName, activityPushToken }) => {
        console.log(`Activity id: ${activityID}, activity name: ${activityName}, token: ${activityPushToken}`);
      },
    );

    const liveActivityStartTokenListener = LiveActivity.addActivityPushToStartTokenListener(
      ({ activityPushToStartToken }) => {
        console.log(`Push to start token: ${activityPushToStartToken}`);
        recordPushNotificationTokenMutation.mutate({
          type: 'push-to-start',
          pushToken: activityPushToStartToken,
          platform: Platform.OS as 'ios' | 'android',
        });
      },
    );

    return () => {
      updateTokenSubscription?.remove();
      liveActivityStartTokenListener?.remove();
    };
  }, []);

I am not receiving a push to start token unless I manually start an activity first. Should I still be able to fetch the token without manually calling startActivity so I can use push notifications to start an activity?

I also have push notifications enabled in the app config.

Additional Information (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions