setBadgeCount does not work on Testflight app

  1. SDK Version: 39
  2. Platforms(Android/iOS/web/all): iOS

I have an app in the Managed Workflow which uses Notifications.setBadgeCountAsync. It does not use Push Notifications, just “local” notifications in form of the app icon badge.

This works great in the Expo Go app. However, when I publish the app through Testflight, the badge does not appear.

In the device settings, the app is not listed under Notifications, so I cannot grant the app the right to show notifications.

Do I need to somehow enable the notifications?

This might be related, we are getting status=undetermined when asking for notifications permission. However, the user does not get asked by the app. When we ask again, we get undetermined again

However, our app ID has Push Notifications enabled. Our Provisioning Profile has Push Notifications listed.

I tried adding the Push Notifications Certificates manually (there were 0 certificates listed, seems Expo did not create them), and then ran expo build:ios with the -c flag, but that did not help. Permissions.askAsync returns undetermined anyway, and the notifications are not shown.

Please also note that I cannot enable the notifications in the Settings app, as our Testflight app is not listed under the notifications section.

Please also note that we get status=undetermined with both Permissions.USER_FACING_NOTIFICATIONS and Permissions.NOTIFICATIONS. We only need the former (we don’t need Push Notifications), but both of them return status=undetermined.

Btw, yarn complains about

warning "expo-notifications > expo-application@2.3.0" has unmet peer dependency "@unimodules/core@*".

But I installed expo-notifications via expo install.

This has been resolved, but unfortunately we have no idea why it didn’t work in the first place.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.