PushDispatcher-vapor - Simple Api to dispatch push to APNS with p8 file

Overview

PushDispatcher - Vapor

The purpose of this application is to facilitate the testing of push notifications in your application, in the absence of functional options using the .p8 file and without the need to have access to the console of some triggering service. In this project you use Postman to send the payload. I'm developing an application for macOS too but I haven't finished it yet.

Dependencies

Run

With Xcode

  • Open Package.swift
  • Wait for Xcode Fetching SPM dependencies
  • Run App
  • In your console on Xcode you recieve this info: [ NOTICE ] Server starting on http://127.0.0.1:8080

With Terminal (macOS or Linux)

Run command vapor run serve in root project folder

  • In your Terminal you recieve this info: [ NOTICE ] Server starting on http://127.0.0.1:8080

Common errors

if you recieve this error in console:

[ NOTICE ] Server starting on http://127.0.0.1:8080
[ WARNING ] bind(descriptor:ptr:bytes:): Address already in use (errno: 48)
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: bind(descriptor:ptr:bytes:): Address already in use (errno: 48)
2022-01-25 15:45:20.004457-0300 Run[57078:478764] Swift/ErrorType.swift:200: Fatal error: Error raised at top level: bind(descriptor:ptr:bytes:): Address already in use (errno: 48)

Run in terminal lsof -i :8080 this command shows the processes running on port 8080 see the ones with the name Run and kill the processes

  • sudo kill 4944 for example

Testing with Postman

Example payload:

{
    "config": {
        "key": "/Users/myuser/AuthKey_XPTO.p8",
        "keyIdentifier": "XPTO",
        "teamIdentifier": "YXPTWREW99",
        "topic": "br.com.myapp"
    },
    "title": "Push Test Dispatcher",
    "subTitle": "Push body description",
    "deviceToken": "64ff01ef9af8a40c8bf4499d10489ef9a93a1ccd987933c767d52073df015e31"

}

I hope it helps

You might also like...
The Feed API challenge with swift
The Feed API challenge with swift

The Feed API challenge - iOSLeadEssentials.com It's time to put your skills to the test! You are called to implement the RemoteFeedLoader to load a co

iOS Application that gets the trending repositories data from Github API and displays it in a tableView.

Github-Trending-Repos iOS Application that gets the trending repositories data from Github API and displays it in a tableView. Follows MVC architectur

Flix is an app that allows users to browse movies from the The Movie Database API.
Flix is an app that allows users to browse movies from the The Movie Database API.

Flix is an app that allows users to browse movies from the The Movie Database API.

iOS App showing a list of Top Movies from The Movie Database API, with a movies searcher

TMDBTest App para iOS que muestra un listado de películas destacadas haciendo uso de la API de "The Movie Database". Además la app dispone de un busca

An app that allows users to browse movies from the The Movie Database API
An app that allows users to browse movies from the The Movie Database API

Flix Flix is an app that allows users to browse movies from the The Movie Database API. 📝 NOTE - PASTE PART 2 SNIPPET HERE: Paste the README template

Challenge-M2Y-TM4 - A challenge provided by Mobile2You, with the purpose of analyzing knowledge about UI, API consumption
Challenge-M2Y-TM4 - A challenge provided by Mobile2You, with the purpose of analyzing knowledge about UI, API consumption

Challenge-M2Y-TM4 Um desafio proporcionado pela Mobile2You, com proposito de ana

ITunesSearchApiDemo - A demo for using iTunes Search API

iTunesSearchApiDemo This is a demo for using iTunes Search API. For more informa

Flix - an app that allows users to browse movies from the The Movie Database API
Flix - an app that allows users to browse movies from the The Movie Database API

Flix Flix is an app that allows users to browse movies from the The Movie Database API. Flix Part 2 User Stories REQUIRED (10pts) (5pts) User can tap

This sample app use the Star Wars public api to show a list of characters

StarWars-MVVM In this sample app, I use the Star Wars public api to show a list of characters from the Star Wars movie series. There are two goals I w

Owner
Michel Anderson Lütz Teixeira
Coordenador de Engenharia at Compass.UOL
Michel Anderson Lütz Teixeira
SwiftUI Todo app example using a React/Redux monolithic state store with flux like dispatch/reduce actions

SwiftUI-Todo-Redux SwiftUI Todo Redux app example using a React/Redux monolithic state store with flux like dispatch/reduce actions Background SwiftUI

moflo 12 Nov 29, 2022
Demo Vapor TIL App

Demo Vapor TIL App

yoki 0 Nov 21, 2021
Demo of a simple ASP.NET Core web API written in Swift

Welcome! This repo is a demo which shows the use of Llama Swift with ASP.NET Core. Llama is my exploratory project to compile "other languages" for .N

Eric Sink 14 Mar 2, 2022
A simple application display album artwork from the iTunes API

iTunesTestApp In the test task, you need to develop a simple application for the iPhone. The application should display album artwork from the iTunes

Valery Veselov 1 Nov 2, 2021
A simple and lightweight resturant finder using the Yelp API

CiboKit A simple and lightweight resturant finder using the Yelp API What is CiboKit? CiboKit is used in our app, Allike, to find nearby restaurants u

Allike 4 Nov 13, 2021
AnimeSearch - A simple app that shows how to use Anilist GraphQL based API with Apollo

AnimeSearch A simple app that shows how to use Anilist GraphQL based API with Ap

Pedro J Fernandez 1 Apr 26, 2022
iOS App that browse the people from Star Wars Universe using GraphQL Api.

Ravn-Challenge-V2--OscarCastillo- iOS App that browse the people from Star Wars Universe using GraphQL Api. This project uses Apollo swift Client. htt

Oscar Castillo 4 Jun 9, 2021
Code Swift iOS app showcasing basic movies list from Orange TV API.

iOS Code Test - Optiva Media Code Swift iOS app showcasing basic movies list from Orange TV API. Built using XCode 13.0 (Swift 5) How to run the examp

Manu Martinez 1 Oct 17, 2021