@@ -31,8 +31,8 @@ final class SwiftyAPNSTests: XCTestCase {
3131 }
3232
3333 func testAlertPushExample( ) {
34- let payload = Payload ( alert: APSAlert . plain ( plain: " Test Alert notification. " ) )
35- var options = NotificationOptions . default
34+ let payload = APNSPayload ( alert: APSAlert . plain ( plain: " Test Alert notification. " ) )
35+ var options = APNSNotificationOptions . default
3636 options. type = . alert
3737 options. topic = topic
3838 let notification = APNSNotification . init ( payload: payload, token: token, options: options)
@@ -44,8 +44,8 @@ final class SwiftyAPNSTests: XCTestCase {
4444 alert. title = " Test "
4545 alert. subtitle = " Alert notification "
4646 alert. body = " with subtitle. "
47- let payload = Payload ( alert: APSAlert . localized ( alert: alert) )
48- var options = NotificationOptions . default
47+ let payload = APNSPayload ( alert: APSAlert . localized ( alert: alert) )
48+ var options = APNSNotificationOptions . default
4949 options. type = . alert
5050 options. topic = topic
5151 let notification = APNSNotification . init ( payload: payload, token: token, options: options)
@@ -56,8 +56,8 @@ final class SwiftyAPNSTests: XCTestCase {
5656 var alert = APSLocalizedAlert ( )
5757 alert. locKey = " REQUEST_FORMAT "
5858 alert. locArgs = [ " Jenna " , " Frank " ]
59- let payload = Payload ( alert: APSAlert . localized ( alert: alert) )
60- var options = NotificationOptions . default
59+ let payload = APNSPayload ( alert: APSAlert . localized ( alert: alert) )
60+ var options = APNSNotificationOptions . default
6161 options. type = . alert
6262 options. topic = topic
6363 let notification = APNSNotification . init ( payload: payload, token: token, options: options)
@@ -67,8 +67,8 @@ final class SwiftyAPNSTests: XCTestCase {
6767 func testAlertWithCustomActionsPushExample( ) {
6868 var alert = APSLocalizedAlert ( )
6969 alert. body = " Test Alert with custom action notification. "
70- let payload = Payload ( alert: APSAlert . localized ( alert: alert) , badge: 1 , sound: " default.wav " , category: " MESSAGE_CATEGORY " )
71- var options = NotificationOptions . default
70+ let payload = APNSPayload ( alert: APSAlert . localized ( alert: alert) , badge: 1 , sound: " default.wav " , category: " MESSAGE_CATEGORY " )
71+ var options = APNSNotificationOptions . default
7272 options. type = . alert
7373 options. topic = topic
7474 let notification = APNSNotification . init ( payload: payload, token: token, options: options)
@@ -79,7 +79,7 @@ final class SwiftyAPNSTests: XCTestCase {
7979 var alert = APSLocalizedAlert ( )
8080 alert. body = " Test Alert with custom payload notification. "
8181 let payload = CustomPayload1 ( alert: APSAlert . localized ( alert: alert) , badge: 1 , sound: " default.wav " , category: " MESSAGE_CATEGORY " , acme1: " bar " , acme2: 42 )
82- var options = NotificationOptions . default
82+ var options = APNSNotificationOptions . default
8383 options. type = . alert
8484 options. topic = topic
8585 let notification = APNSNotification . init ( payload: payload, token: token, options: options)
@@ -90,7 +90,7 @@ final class SwiftyAPNSTests: XCTestCase {
9090 var alert = APSLocalizedAlert ( )
9191 alert. body = " Test Alert with custom payload notification. "
9292 let payload = CustomPayload2 ( alert: APSAlert . localized ( alert: alert) , badge: 1 , sound: " default.wav " , category: " MESSAGE_CATEGORY " , acme1: [ " bang " , " whiz " ] )
93- var options = NotificationOptions . default
93+ var options = APNSNotificationOptions . default
9494 options. type = . alert
9595 options. topic = topic
9696 let notification = APNSNotification . init ( payload: payload, token: token, options: options)
@@ -99,7 +99,7 @@ final class SwiftyAPNSTests: XCTestCase {
9999
100100 func testBackgroundPushExample( ) {
101101 let payload = CustomPayload1 ( acme1: " bar " , acme2: 42 )
102- var options = NotificationOptions . default
102+ var options = APNSNotificationOptions . default
103103 options. type = . alert//.voip
104104 options. topic = topic
105105 //options.environment = .production
@@ -111,7 +111,7 @@ final class SwiftyAPNSTests: XCTestCase {
111111 var alert = APSLocalizedAlert ( )
112112 alert. body = " Test mutable conten payload notification. "
113113 let payload = CustomPayload3 ( alert: APSAlert . localized ( alert: alert) , badge: 1 , sound: " default.wav " , category: " MESSAGE_CATEGORY " , encrypted: " Ω^¬%gq∞NÿÒQùw " )
114- var options = NotificationOptions . default
114+ var options = APNSNotificationOptions . default
115115 options. type = . alert
116116 options. topic = topic
117117 let notification = APNSNotification . init ( payload: payload, token: token, options: options)
0 commit comments