-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/notification service #12
Conversation
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
@maksmart96 посмотри, пожалуйста этот, твои правки учтены. |
@gochicus |
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
# Less than a week - token won`t be sent. | ||
# If `autoSendPushToken` value is false NotificationService won`t send the token to the server | ||
|
||
@UIApplicationMain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var sdk: PersonalizationSDK!
var notificationService: NotificationServiceProtocol?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
sdk = createPersonalizationSDK(shopId: "SHOP_ID", enableLogs: true, { error in
# Custom completionHandler
})
# Create instance of NotificationService with pre-created sdk
notificationService = NotificationService(sdk: sdk)
}
}
# During initialization `NotificationService ` will ask permission from the user to send notifications
# - UIApplication.shared.registerForRemoteNotifications()
# The client will have to sign protocols - UNUserNotificationCenterDelegate and implement the `application` method
# and call the `application` method inside of the NotificationService object application
extension AppDelegate: UNUserNotificationCenterDelegate {
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
# Additional custom code
notificationService?.didRegisterForRemoteNotificationsWithDeviceToken(deviceToken: deviceToken)
}
@maksmart96 Последним коммитом вс убрал, вот так сейчас выглядит.
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
@maksmart96 тут с проверками проблемы, Андрею мерждить придётся. Пожалуйста, сделай resolve своих ревью. |
какими проверками? какие проблемы? |
No description provided.