-
Notifications
You must be signed in to change notification settings - Fork 37
π§ Installation
The installation of VaporAPNS is really easy! Just add the following line to your Package.swift
dependencies list:
.Package(url:"https://github.com/matthijs2704/vapor-apns.git", majorVersion: 2, minor: 0)
Curl is a required dependency by VaporAPNS. The version installed needs to support HTTP/2, which most default installed versions of Curl do not do. Luckily VaporAPNS contains an installer for it so you always have a working version of Curl installed on your system!
Just install VaporAPNS as stated above, initialise an instance of VaporAPNS in your main.swift
and then run your project. If there is something wrong with your current Curl installation it'll tell you and by typing a simple y
, it'll do all hard work for you and get you up and running! π After installation or if it doesn't say anything at all, you're good to go!
You can force (re)install Curl by setting forceCurlInstall
to true
on your VaporAPNS options.
var options = try! Options(topic: "<your topic>", teamId: "<your teamId>", keyId: "<your keyId>", keyPath: "<your path to key>")
options.forceCurlInstall = true
If you don't want to use the automated installer, you're able to disable it completely by setting disableCurlCheck
to true
on your VaporAPNS options. It's enabled by default to make it as easy as possible to get started for most people. You can update Curl manually as described here.
var options = try! Options(topic: "<your topic>", teamId: "<your teamId>", keyId: "<your keyId>", keyPath: "<your path to key>")
options.disableCurlCheck = true