Skip to content

Commit 55611cc

Browse files
committed
Conflicts resolution
2 parents 740f7d1 + 2a4ea56 commit 55611cc

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

CorePush.Tester/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private static async Task SendFcmNotificationAsync()
7272
notification = new { body = "Hello World!" }
7373
};
7474

75-
var response = await fcm.SendAsync(fcmReceiverToken, payload);
75+
var response = await fcm.SendAsync(payload);
7676
}
7777
}
7878
}

CorePush/Apple/ApnPushType.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace CorePush.Apple
2+
{
3+
public enum ApnPushType
4+
{
5+
Background,
6+
Alert,
7+
Voip
8+
}
9+
}

CorePush/Apple/ApnSender.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public async Task<ApnsResponse> SendAsync(
7070
string apnsId = null,
7171
int apnsExpiration = 0,
7272
int apnsPriority = 10,
73-
bool isBackground = false,
73+
ApnPushType apnPushType = ApnPushType.Alert,
7474
CancellationToken cancellationToken = default)
7575
{
7676
var path = $"/3/device/{deviceToken}";
@@ -87,7 +87,7 @@ public async Task<ApnsResponse> SendAsync(
8787
message.Headers.Add("apns-topic", settings.AppBundleIdentifier);
8888
message.Headers.Add("apns-expiration", apnsExpiration.ToString());
8989
message.Headers.Add("apns-priority", apnsPriority.ToString());
90-
message.Headers.Add("apns-push-type", isBackground ? "background" : "alert"); // required for iOS 13+
90+
message.Headers.Add("apns-push-type", apnPushType.ToString().ToLowerInvariant()); // required for iOS 13+
9191

9292
if (!string.IsNullOrWhiteSpace(apnsId))
9393
{

CorePush/Interfaces/IApnSender.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Task<ApnsResponse> SendAsync(
1212
string apnsId = null,
1313
int apnsExpiration = 0,
1414
int apnsPriority = 10,
15-
bool isBackground = false,
15+
ApnPushType apnPushType = ApnPushType.Alert,
1616
CancellationToken cancellationToken = default);
1717
}
1818
}

0 commit comments

Comments
 (0)