Curl +nghttp2 not detected
edwinveger opened this issue · 3 comments
I've just added VaporAPNS to my project. After the warning that my curl version lacked HTTP2, I follow the steps as layed out here in order to have a curl version with HTTP2 on my system.
I expected this to resolve the issue, but VaporAPNS is still complaining with the same message (Your current version of curl lacks HTTP2!
).
Curiously, if I tell it to install HTTP2, it also says It doesn't look like you have Homebrew installed!
which is not true :). Is it perhaps looking in the wrong place? Do I maybe need additional linker flags to tell it where to look?
Running on macOS 10.12.4.
Hey :)
If you're sure you have the right curl version installed, you could disable the check as described in the Wiki.
I'm not sure why the check doesn't work right for you, but I guess everyones developer environment is different ;) AFAICR, I'm using 'where' to check if brew is installed so I don't think there is much to be done as an issue about this...
Alright, thanks for your quick reply. I disabled the curl check, and now I’m seeing networkError(VaporAPNS.SimpleError.string("Problem with the local SSL certificate”))
. I've googled this but can't make sense of it.
I’ve generated my push certificates / keys using fastlane pem
, and I am using the following code to setup VaporAPNS.
let bundleIdentifier = "com.myBundleID"
let teamIdentifier = “*******”
let filename = "development_com.myBundleID.debug"
let pem = drop.workDir + "Resources/" + filename + ".pem"
let pKey = drop.workDir + "Resources/" + filename + ".pkey"
let cert = drop.workDir + "Resources/aps_development.cer"
var options = try! Options(topic: bundleIdentifier, certPath: cert, keyPath: pKey)
options.disableCurlCheck = true
let vaporAPNS = try VaporAPNS(options: options)
I’m thinking of three possible causes.
- curl can’t find the root CA for APNS. I ran into a similar issue when running a php script I found on raywenderlich a couple of months back.
- Curl still finds the wrong version.
- Something wrong with my own
pem
-generated certificates + keys.
I'm not sure how/why, but when I moved to v2 and used Authentication keys instead of certificates, it worked flawlessly. Thanks for making push notifications a breeze with Vapor!