-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Hi, thanks for sharing this library.
I have a question. I just want to change the frequency property of the configuration, but write a lot of unnecessary duplicate code. It doesn't seem elegant enough.
The ArekLocalizationManager
is also not public, so it is not possible to construct data using it.
I wonder if we can make them public so that we can easily change the values.
func askForPermission() {
let tmp = ArekNotifications()
let configuration = ArekConfiguration(frequency: .OnceAWeek, presentInitialPopup: true, presentReEnablePopup: true)
let initialPopupData = ArekPopupData(title: R.string.localizable.arekNotifications_initial_title(),
message: R.string.localizable.arekNotifications_initial_message(),
image: "\(tmp.identifier)_image",
allowButtonTitle: R.string.localizable.arekNotifications_allow_button_title(),
denyButtonTitle: R.string.localizable.arekNotifications_deny_button_title(),
styling: nil)
let reEnablePopupData = ArekPopupData(title: R.string.localizable.arekNotifications_reenable_title(),
message: R.string.localizable.arekPhoto_reenable_message(),
image: "\(tmp.identifier)_image",
allowButtonTitle: R.string.localizable.arekNotifications_allow_button_title(),
denyButtonTitle: R.string.localizable.arekNotifications_deny_button_title(),
styling: nil)
let arek = ArekNotifications(configuration: configuration, initialPopupData: initialPopupData, reEnablePopupData: reEnablePopupData)
arek.manage { Log.info("APNs permission is \($0)") }
}
Metadata
Metadata
Assignees
Labels
No labels