Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

πŸ”§ Installation

Matthijs Logemann edited this page Jun 19, 2017 · 2 revisions

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

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!

βœ… How to use it?

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!

❗️ Force (re)install Curl

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

❌ Disable Curl version checker

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