Closed nicktrienensfuzz closed 3 years ago
can you try with 2.1.0
so we can rule out its not the recent release?
Sorry I meant 2.1.0
@mackoj This is related to what we just merged, I've deleted 2.2.0 for now.
Ok thanks @kylebrowning I will look into it sorry @nicktrienensfuzz for the bug
Hi, @nicktrienensfuzz sorry for the inconvenience but I did't succeed reproducing this bug, maybe you can help me to reproduce it.
I have cloned https://github.com/vapor/apns.git run APNSTests
and change APNSwiftConfiguration
to something that will work and add my device token and it's working.
I have cloned https://github.com/kylebrowning/APNSwift and try it's test APNSwiftExample
and change APNSwiftConfiguration
to something that will work and add my device token and it's working. I have tried all send
variation and didn't reproduce this bug.
In both cases I did received the notifications.
I used this sample code from the vapor doc site, https://docs.vapor.codes/4.0/apns/
try app.apns.send(
.init(title: "Hello", subtitle: "This is a test from vapor/apns"),
to: "6a9201adcaa835-------------3"
)
it is working now, using 2.1.0
Looks like it might have been bad usage on my part too, I was using that in a route so I should have been accessing the .apns
property on the Request
app.get("test") { req in
req.apns.send(
.init(title: "Hello", subtitle: "This is a test from vapor/apns"),
to: "6a9201adcaa8358e92a01d5e1ba0ccdaad061ccfb7797293da53df807c1c53"
).map { "sent" }
}
Thank you so much for your quick response
This issue still exists in master.
I'm reproducing it now and working on a fix.
@kylebrowning and @nicktrienensfuzz I tried to explain the issue and give a fix here.
I think this is resolved.
Describe the bug send class it's self to maximum stack size in xcode
To Reproduce included via .package(url: "https://github.com/vapor/apns.git", from: "1.0.0")
This function seems to call it's self forever
Expected behavior Hope to see a sent notification
Screenshots
Platform:
Additional context Add any other context about the problem here.