aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick/components/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/configuration')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java
index c7747aa1d..1bb4694a2 100644
--- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java
+++ b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java
@@ -2,6 +2,8 @@ package com.juick.components.configuration;
import com.juick.components.Notifications;
import com.juick.configuration.DataConfiguration;
+import com.notnoop.apns.APNS;
+import com.notnoop.apns.ApnsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@@ -41,4 +43,9 @@ public class NotificationsAppConfiguration {
public Notifications push() {
return new Notifications(env, rest());
}
+ @Bean
+ public ApnsService apns() {
+ return APNS.newService().withCert(env.getProperty("ios_pkcs12_file"), env.getProperty("ios_pkcs12_password"))
+ .withSandboxDestination().build();
+ }
}