Skip to content
A Swift command-line tool to easily send push notifications to the iOS simulator
Swift Ruby
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Create stale.yml Feb 8, 2020
.swiftpm/xcode/package.xcworkspace Basic setup works! Feb 7, 2020
Poes.xcodeproj Add CI integration and tests (#2) Feb 8, 2020
Sources supporting badge count (#10) Feb 14, 2020
Submodules Created a new release (#11) Feb 14, 2020
Tests
fastlane
.gitignore Add CI integration and tests (#2) Feb 8, 2020
.gitmodules Add CI integration and tests (#2) Feb 8, 2020
CODEOWNERS Add CI integration and tests (#2) Feb 8, 2020
Changelog.md Created a new release (#11) Feb 14, 2020
Dangerfile.swift
Gemfile Add CI integration and tests (#2) Feb 8, 2020
LICENSE
Package.resolved Basic setup works! Feb 7, 2020
Package.swift
README.md

README.md

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 send push notifications to the iOS simulator

USAGE: Poes <options>

OPTIONS:
  --body, -b            The body of the Push Notification
  --bundle-identifier   The bundle identifier to push to
  --mutable, -m         Adds the mutable-content key to the payload
  --title, -t           The title of the Push Notification
  --badge               The number to display in a badge on your app’s icon
  --verbose             Show extra logging for debugging purposes
  --help                Display available options

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

$ Poes --bundle-identifier 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

You can’t perform that action at this time.