nicoonswift / TestingPushNotifications

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

Home Page:https://speakerdeck.com/nicoonguitar/ui-testing-dealing-with-push-notifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 10.1
  • Swift 4.2
  • iOS 12.1.2
  • 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

https://speakerdeck.com/nicoonguitar/ui-testing-dealing-with-push-notifications


Languages

Language:Swift 98.8%Language:Ruby 1.2%