Do I need a paid Apple Developer Program Membership to use push notifications?

Yes.
Anyone with an Apple ID can use Xcode and build an app. They can even install it on iPhones connected to their Mac. What they can not do is access the parts of the Apple Developer website that control certificates, identifiers, and profiles. Those are required to work with push notifications. A paid Apple Developer Membership is necessary to use push notifications.

A free developer account can still work with notifications using local notifications. Local notifications can be a great tool for prototyping push notifications. In many cases,​ local notifications are a better choice than push notifications.

How To Debug Notification Extensions

Notification service and content extensions can add fantastic capabilities to your app. You can extend your experience outside of your app and engage with users in whole new ways. But what happens when things go wrong?

Extensions run outside of your app. iOS loads them on-demand as plugins to the OS itself. You can't debug them like you can an app.

So how can you debug notification extensions?

Debugging a Service Extension

  1. Launch the app from Xcode or the device
  2. In Xcode, select Attach To Process or PID By Name… from the Debug menu
    attach to process by name
  3. Enter the name of your notification extension
    Xcode Debug menu, Enter Process Name
  4. Trigger a notification (by sending a push, etc.).

When the notification is delivered the service extension will launch in to the debugger.

Debugging a Content Extension

There are at least two ways. The steps shown above for a service extension also work for a content extension. The second method is more familiar but less reliable.

  1. Select the extension scheme in Xcode using the toolbar
    xcode select extension scheme
  2. In the Product menu, select Edit Scheme…
    xcode edit scheme
  3. Set the Executable to the parent application.
    editscheme
  4. Set a breakpoint inside the content extension.
  5. Now build and run your extension. It will launch the parent application.
  6. Trigger a notification that will cause the content extension to load.

When the notification content extension is loaded the debugger should stop on the breakpoint you set. It should – but it may not. It may also run a stale version of the host app or extension from several builds ago. When using this method it may be necessary to clean the project build folder with each new debugging session and reinstall the host app frequently. For whatever reason, the other method shown above is often more reliable.

View Debugging Content Extensions

Notification content extensions can contain complex user interfaces laid out using Autolayout. Unfortunately Xcode's View Debugging will not show the custom user interface of your notification.

The commercial view debugging tool Reveal, however, will. Integrating and using Reveal is simple and it does provide insights that Xcode does not. If you find yourself struggling with the interface of a content extension it is worth giving Reveal a try.

Logging And Activity Tracing

Because it can be difficult, cumbersome, or impossible to troubleshoot some notification extensions issues using a debugger it can be a great opportunity to learn the new(ish) Universal Logging and Activity Tracing APIs. Both of these are easy to use and make troubleshooting extensions much easier.

Unless you are using Swift. Activity Tracing is still not available to Swift as of this writing.

Troubleshooting Push Certificate Problems

I can't export a push certificate as a p12 file

Keychain Access may not show an option to export a push notification certificate as a Personal Information Exchange (p12) file. This happens when the private key associated with the certificate is missing.

The SSL certificate available in your Apple Developer Program account contains a public key but not a private key. The private key exists only on the Mac that created the Certificate Signing Request uploaded to Apple. Both the public and private keys are necessary to export the Personal Information Exchange (p12) file.

If the Mac that created the Certificate Signing Request is available to you, open Keychain Access on that Mac. Look for a public and private key pair that uses the name entered as the Common Name for the Certificate Signing Request. Export those keys and transfer them to the Mac that will be used to export the certificate.

That Mac may not be available to you. It may have been replaced, erased, or just can't be found. In that case you will need to create a new push certificate and revoke the old one.

“This certificate has an invalid issuer” when I add the certificate to a keychain

The error “This certificate has an invalid issuer” means that the Apple World Wide Developer Relations certificate that issued the push certificate is no longer valid. It may be expired or damaged. Remove the WWDR certificate from your keychain and download a new one.

My push certificates are expiring

When a certificate expires it can no longer be used to send push notifications. Each App ID can have 2 development and 2 production push SSL certificates at a time. Create a new certificate and it to your App ID in the Apple Developer Center.

Add the new certificate to any services you use to send push notifications. Once those services are updated with the new certificate you can revoke the expiring one.

I can't export a push certificate as a PEM file

The SSL certificate available in your Apple Developer Program account contains a public key but not a private key. The private key exists only on the Mac that created the Certificate Signing Request uploaded to Apple. Both the public and private keys are necessary to export the Privacy Enhanced Mail (PEM) file.

If the Mac that created the Certificate Signing Request is available to you, open Keychain Access on that Mac. Look for a public and private key pair that uses the name entered as the Common Name for the Certificate Signing Request. Export those keys and transfer them to the Mac that will be used to export the certificate.

That Mac may not be available to you. It may have been replaced, erased, or just can't be found. In that case you will need to create a new push certificate and revoke the old one.

Will iOS launch an app with a silent push if the user force quits the app?

A silent push notification launches an app in the background to update content. Once a user force quits an app iOS will not launch it from a silent push notification until the user opens it again.

From the UIApplicationDelegate documentation for application(_:didReceiveRemoteNotification:fetchCompletionHandler:)

In addition, if you enabled the remote notifications background mode, the system launches your app (or wakes it from the suspended state) and puts it in the background state when a remote notification arrives. However, the system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.

How Big Can a Push Notification Be?

In the early days of the iPhone SDK push notifications were quite small. The entire payload was limited to just 256 bytes until iOS 8 was introduced in 2014.

Today push notification payloads can be much larger. How big depends on which version of the APNS API is being used to send the messsage

APNS API Payload Size Limit
HTTP 1.1 API 2KB
HTTP/2 API 4KB
HTTP/2 API VoIP 5KB

References:
WWDC 2015: What's New in Notifications

Sending Notification Requests to APNS

Most, but not all 3rd party services that send push notifications support the newer HTTP/2 API that was introduced in late 2015. The newer API is more reliable and has more benefits for your apps than just the payload size. It's worthwhile to check wether you are using the new API or the older one.