Sunday, March 15, 2026
HomeiOS Developmentios - Native notifications don't work on TestFlight builds

ios – Native notifications don’t work on TestFlight builds


I’ve constructed an app for shut household and mates to make use of. I am unable to add the app to the App Retailer as I am utilizing copyrighted materials/property so I am utilizing TestFlight to distribute the app to permit my household and mates to make use of it.
I’ve applied native notifications within the app utilizing UserNotifications, UNUserNotificationCenter, and so on.. I schedule two notifications per week that ought to be delivered on the identical time each week, every on separate days of the week. Nonetheless, my private system is the one one that’s really receiving these notifications, and everybody one in all my ‘customers’ who downloaded my app by way of TestFlight don’t get these notifications. I’ve verified that my ‘customers’ do have notifications turned on for my app.

Initially I adopted a YouTube video on methods to implement native notifications. The strategy proven within the video makes use of the completion handler APIs of UserNotification. I’ve additionally tried experimenting with utilizing the async APIs as an alternative since my app follows async await structure however this did not assist.

Though possibly not greatest follow, my implementation is as follows:

  1. When person hundreds app, run loop to schedule all ~30 notifications.
  2. In every iteration, create the notification with a novel identifier per notification.
  3. Take away any pending notifications matching that identifier.
  4. Add the created notification to the queue.

I additionally ask for person permission to ship notifications like this:

func checkForNotificationsPermission() {
        let notificationCenter = UNUserNotificationCenter.present()
        notificationCenter.getNotificationSettings { settings in
            swap settings.authorizationStatus {
            case .licensed:
                self.dispatchNotifications()
            case .notDetermined:
                notificationCenter.requestAuthorization(choices: [.alert, .sound]) { didAllow, error in
                    if didAllow {
                        self.dispatchNotifications()
                    }
                }
            default:
                return
            }
        }
    }

the place dispatchNotifications() follows steps 1-4 above.

My greatest assumption is that the notifications work for me as a result of I am the account that is tied to the developer account and I’ve some certificates to permit notifications however I do not know for positive. All of the folks utilizing my app by way of TestFlight are added to my App Retailer Join with the position of “Advertising”.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments