Closed mackoj closed 3 years ago
In order to have this bug to occur you have to first build and run the project with this.
.package(url: "https://github.com/vapor/apns.git", from: "1.0.0"),
Then build and run the project with this.
.package(url: "https://github.com/vapor/apns.git", from: "1.0.0"),
.package(url: "https://github.com/kylebrowning/APNSwift.git", .branch("master")),
Because if you do it in the reverse order the compiler will work as expected and tell you that the implementation of send
in Application+APNS.swift
and Request+APNS.swift
is not good. because the protocol APNSwiftClient
(kylebrowning/APNSwift
) have changed in 2.2.0 and so it missing the apnsID parameter.
Hi,
For this to work properly please consider tagging vapor/apns
@siemensikkema or @kylebrowning thanks.
Done
Fix for https://github.com/kylebrowning/APNSwift/issues/100
When using the code below with
.package(url: "https://github.com/vapor/apns.git", from: "1.0.0"),
and themaster
branch ofkylebrowning/APNSwift
. It make an infinite recursion.Because in
Application+APNS.swift
inextension Application.APNS: APNSwiftClient
it called the bad send line 78$0.send
. In order to fix it it should have called the send with apnsID parameter.This is the real fix -> https://github.com/vapor/apns/pull/26
When using
vapor/apns
andkylebrowning/APNSwift
in master it worked as expecte, no infinite recursion.When using
vapor/apns
1.0.0 andkylebrowning/APNSwift
in master it had the infinite recursion issue.When using
vapor/apns
1.0.0 with the default version ofkylebrowning/APNSwift
2.1.0 in master it worked as expected, no infinite recursion.When vapor/apns will update to 1.1.0 and
kylebrowning/APNSwift
to 2.2.0 the issue will not exist anymore.