Skip to main content
Question

How to request iOS provisional notifications in React Native?

  • February 2, 2024
  • 1 reply
  • 123 views

According to the docs https://customer.io/docs/journeys/device-tokens/, the SDK supports provisional notifications.

Beginning in iOS 12, you can request provisional authorization and send provisional push notifications—messages that don’t have an alert or play sounds. Our native iOS SDK supports provisional push notifications, but our other iOS-supporting SDKs do not support provisional push.

 

Unfortunately, there is no example of how to request provisional notifications. This is possible Expo Notifications, but not in Customer IO’s React native SDK.

ExpoNotifications.requestPermissionsAsync({
  ios: {
    allowAlert: true,
    allowBadge: true,
    allowSound: true,
    allowProvisional: true,
  },
});

But the only options in customer.io are:

CustomerIO.showPromptForPushNotifications({
  ios: { 
    sound: true, 
    badge: true 
  },
});

Looking at the code in GH, I don’t see support for provisional notifications. 

https://github.com/customerio/customerio-reactnative/blob/dac19e8d8c17a82682b7ae73ddfb400be5c3d750/ios/CustomerioReactnative.swift#L179

1 reply

Penny
  • 133 replies
  • February 2, 2024

Hi @ypgrandstand 

Unfortunately, we do not support provisional push notifications in react native at the moment but we’ve logged this as a feature request on your behalf so our team can continue to track feedback for future product development considerations.

In the meantime, I believe you’ve also opened a Github issue directly in our React Native repo and our mobile developers will respond directly on the workaround you shared! 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings