Skip to content

Instantly share code, notes, and snippets.

View jzucker2's full-sized avatar

Jordan Zucker jzucker2

  • PubNub
  • San Francisco
View GitHub Profile

Background Unsubscribe on iOS

The PubNub Swift/Objective-C SDK has built in features for successfully unsubscribing as an iOS app transitions into the background. It's very easy to take advantage of by simply calling an unsubscribe from the App Delegate or in response to an NSNotification named UIApplicationWillResignActive.

If you choose to wrap unsubscribes yourself in the UIBackgroundTaskIdentifier API, we cannot ensure it works, nor can we test for such a situation. That is why we have our feature, so we can control the experience as best as possible.

Swift

Xcode Testing

UI Testing in Xcode (2015)

  • Recording
  • XCUIApplication
  • descendants vs children
  • matching item, string

Let's talk about Push

  • We might be missing info included from HTTP/2 push
  • There's this: NOTE

The feedback service maintains a separate list for each push topic. If you have multiple apps, you must connect to the feedback service once for each app, using the corresponding certificate, in order to receive all feedback. from https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/BinaryProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH13-SW1

apns-topic

Hello!

This is an example

Details

  • Checklist
  • Another item

More details

  • Hello