Skip to content

mikedinicola/TestingPushNotifications

 
 

Repository files navigation

UITesting: Dealing with Push Notifications

Platforms Swift version

Talk given at CocoaHeads Nantes 15/02/2018

Talk's keynote

Based on Jörn Schoppe idea for testing push notifications with UI Tests, I took a step forward in order to handle notifications with actions and text inputs. In the project the notifications are handled from the Springboard, but by using userNotificationCenter(_:willPresent:withCompletionHandler:) we could interact with the received notifications while the app is in the foreground.

Also a UI Test example on interacting with the Control Center from the Springboard is added.

Getting Started

Prerequisites

  • Xcode 9.3
  • Swift 4.0
  • iOS 11.2.5+
  • CocoaPods

Running the project

Remember to setup the app in Apple Developer website

  • Create the project's AppID (or set a new one) on your Apple's developer account
  • Generate APNS certificate for development environment
  • Add certificate to Keychain and extract the .p12 file from it. Don´t forget the password !
  • Add the .p12 to UITest project's target.
  • Remember to setup NWPusher to push the payload in sandbox environment

Videos

Links of interest

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

About

Demo project for talk given at CocoaHeads Nantes 15/02/2018

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 98.7%
  • Ruby 1.3%