• Stars
    star
    453
  • Rank 96,573 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Swift command-line tool to easily send push notifications to the iOS simulator

Poes

A Swift command-line tool to easily send push notifications to the iOS simulator.

Twitter: @twannl

Poes helps you with:

  • Generating a JSON payload for push notifications
  • Sending and testing push notifications in the simulator

Requirements

  • Xcode 11.4 beta 1 and up

Usage

$ poes --help
OVERVIEW: A Swift command-line tool to easily test push notifications to the
iOS simulator

USAGE: poes <subcommand>

OPTIONS:
  -h, --help              Show help information.

SUBCOMMANDS:
  send                    Send a push notification to an app installed on the
                          iOS Simulator
$ poes send --help
OVERVIEW: Send a push notification to an app installed on the iOS Simulator

USAGE: poes send <bundle-identifier> [--title <title>] [--body <body>] [--badge <badge>] [--is-mutable] [--verbose]

ARGUMENTS:
  <bundle-identifier>     The bundle identifier of the app to push to 

OPTIONS:
  -t, --title <title>     The title of the Push notification (default: Default
                          Title)
  -b, --body <body>       The body of the Push notification (default: Default
                          Body)
  -b, --badge <badge>     The number to display in a badge on your app’s icon 
  -i, --is-mutable        Adds the mutable-content key to the payload 
  --verbose               Show extra logging for debugging purposes 
  -h, --help              Show help information.

The bundle identifier is mandatory, all others have a default value. The following command can be enough to send out a notification:

$ poes send com.wetransfer.app --verbose
Generated payload:

{
  "aps" : {
    "alert" : {
      "title" : "Default title",
      "body" : "Default body"
    },
    "mutable-content" : false
  }
}

Sending push notification...
Push notification sent successfully

Installation using Mint

You can install Poes using Mint as follows:

$ mint install AvdLee/Poes

Development

  • cd into the repository
  • run swift package generate-xcodeproj (Generates an Xcode project for development)
  • Run the following command to try it out:
swift run Poes --help

FAQ

Why is it called "Poes"?

Poes is a Dutch word for a female cat. The pronunciation is the same as "Push" and pushing notifications is what we're doing here!

Why is there a PoesCore framework?

This makes it really easy to eventually create a Mac App with a UI around it 🚀

How do I create a Swift Package myself?

Check out my blog post Swift Package framework creation in Xcode.

Can I learn more about testing Push Notifications on the iOS simulator?

Yes! I've written a detailed blog post about this: Testing push notifications on the iOS simulator

More Repositories

1

appstoreconnect-swift-sdk

The Swift SDK to work with the App Store Connect API from Apple.
Swift
1,431
star
2

CombineSwiftPlayground

A Swift playground explaining the concepts of the new Combine framework
Swift
1,102
star
3

Roadmap

Publish your roadmap inside your app and allow users to vote for upcoming features
Swift
797
star
4

SwiftUIKitView

Easily use UIKit views in your SwiftUI applications. Create Xcode Previews for UIView elements
Swift
710
star
5

RocketSimApp

Enhancing the iOS simulator for productivity
Swift
425
star
6

CoreDataBestPractices

Best Practices in Core Data explained within a demo application
Swift
413
star
7

WhatTheErrorCode

Convert unreadable errors into understandable descriptions
Swift
143
star
8

Moya-SwiftyJSONMapper

Map objects through SwiftyJSON in combination with Moya
Swift
115
star
9

AsyncOperations

Asynchronous Operations in Swift explained in a Swift Playground
Swift
92
star
10

QR-Code-Custom

A playground demonstrating a way to create a custom QR code with a custom color and logo in Swift.
Swift
42
star
11

TaskGroupsResultBuilder

A @resultBuilder to use to bundle tasks together.
Swift
36
star
12

AppUpdately

Fetch the update available status for iOS or macOS apps based on the bundle identifier.
Swift
36
star
13

CombineWorkshop

Contains all files needed for my Combine workshop.
Swift
32
star
14

appstoreconnect-app

A Mac App to control App Store Connect!
Swift
28
star
15

CustomSwiftOperators

Demonstrating custom Swift operators. Including prefix, postfix, infix, and compound assignment operators.
Swift
18
star
16

CombineExtensions

A collection of Combine Extensions
Swift
16
star
17

ALLocalizables

Localizable label and buttons directly from the interface builder
Ruby
14
star
18

ALDataRequestView

A view representation for data requests. Support for ReactiveSwift and RXSwift
Swift
13
star
19

StockAnalyzerApp

Public repo for tracking bugs and features for the Stock Analyzer app
Swift
7
star
20

DataRacesActors

Slides and content from my SwiftLeeds talk "Understanding Data Races and Actors in Swift 5.5"
Swift
7
star
21

UIControl-Blocks

Use blocks with UIControls
Objective-C
6
star
22

Moya-JASONMapper

Map objects through JASON in combination with Moya
Swift
5
star
23

ImageCollectionViewer

Get FB Albums and show them in a gallery
Objective-C
4
star
24

ImageGen

A library to generate images easily based on text input
4
star
25

MeetupRaffle

Raffle a member from a meetup event
Swift
3
star
26

organizing-conferences-checklist

General tips on organising conferences, based on feedback from the community
1
star