Iterable / iterable-swift-sdk

Iterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
https://iterable.com/
MIT License
87 stars 74 forks source link

Take into consideration not determined status into checking notifications access status #825

Open piotrtorczynski opened 1 month ago

piotrtorczynski commented 1 month ago

✏️ Description

let config = IterableConfig()
config.autoPushRegistration = false
IterableAPI.initialize(apiKey: apiKey, launchOptions: launchOptions, config: config)

If you take into consideration that the user has autoPushRegistration set to false, the SDK will return notificationsEnabled set to true due to this bug. If autoPushRegistration is set to false, the user often has UNAuthorizationStatus set to .notDetermined.

This change fixes this issue so that by default SDK should return the proper value