Skip to content

Conversation

@maratal
Copy link
Collaborator

@maratal maratal commented Jan 22, 2026

Description

Checklist

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maratal maratal added the review-app Create a Heroku review app label Jan 22, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-ftf-283-apns--sjxyp7 January 22, 2026 17:02 Inactive
@maratal maratal force-pushed the FTF-283-apns-swift-guide branch from 7c4bab8 to 9f94a7f Compare January 26, 2026 01:27
@ably-ci ably-ci temporarily deployed to ably-docs-ftf-283-apns--sjxyp7 January 26, 2026 01:27 Inactive
@maratal maratal force-pushed the FTF-283-apns-swift-guide branch from 9f94a7f to 3feba8d Compare January 27, 2026 00:58
@ably-ci ably-ci temporarily deployed to ably-docs-ftf-283-apns--sjxyp7 January 27, 2026 00:58 Inactive
@maratal maratal force-pushed the FTF-283-apns-swift-guide branch from 3feba8d to b482d42 Compare January 27, 2026 01:45
@ably-ci ably-ci temporarily deployed to ably-docs-ftf-283-apns--sjxyp7 January 27, 2026 01:45 Inactive
@maratal maratal force-pushed the FTF-283-apns-swift-guide branch from b482d42 to 898bda5 Compare January 27, 2026 14:00
@ably-ci ably-ci temporarily deployed to ably-docs-ftf-283-apns--sjxyp7 January 27, 2026 14:00 Inactive
@maratal maratal force-pushed the FTF-283-apns-swift-guide branch from 898bda5 to dcd68ab Compare January 27, 2026 14:11
@maratal maratal marked this pull request as ready for review January 27, 2026 14:11
@maratal maratal changed the title Add getting started guide for APNs for swift. [FTF-283] Add getting started guide for APNs for swift. Jan 27, 2026
@maratal maratal requested a review from AndyTWF January 27, 2026 14:38

### Create a Swift project with Xcode <a id="prerequisites-create-project"/>

Create a new iOS project with SwiftUI. For detailed instructions, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/swiftui).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much detail do we want here? I think we should probably assume that someone knows how to setup a Swift project, so we perhaps cut this down to just making sure you've got ably-cocoa installed? cc @m-hulbert

```swift
// MARK: - UNUserNotificationCenterDelegate Methods

/// Handle notification when app is in foreground
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be elaborating on handling background notifications?

```
</Code>

To receive messages on the channel as push notifications, you need to subscribe to the push notifications
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to discuss explicitly here that there are two ways of doing push notifications - direct and channel-based. Perhaps covering (very briefly) when you'd use each, and highlighting that for direct you don't need explicit subscriptions?

```
</Code>

To test this code, you can send push notifications from the Ably dashboard or using the API (see the next step).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of our other guides lean into the CLI here, so I think we put that first. Lets add CLI installation to the prerequisite of the guide?

```
</Code>

You can also send push notifications by publishing a message with a `push` message's `extras` field to a specific channel:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we perhaps need a specific call out in the guide about there being two ways to do push (see above comment)

`LocationPushService.swift` file in your extension target.
Use `locationManager(_:didUpdateLocations)` delegate method to handle location updates as needed.

## Step 6: Displaying the results <a id="step-6"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should displaying it come earlier in the guide, so that people can see results as they go?


Continue to explore the documentation with Swift as the selected language:

* Check our push example: [AblyPushExample](https://github.com/ably/ably-cocoa/tree/main/Examples/AblyPush)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Check our push example: [AblyPushExample](https://github.com/ably/ably-cocoa/tree/main/Examples/AblyPush)
* Check our [push example](https://github.com/ably/ably-cocoa/tree/main/Examples/AblyPush)

Copy link
Contributor

@GregHolmes GregHolmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than Andy's comments, and my 1 below. I've also got this recommendation, that we update the Step headings to be inline with the other guides:

Step 1: Set up Ably
Step 2: Set up push notifications
Step 3: Receive push notifications
Step 4: Send push notifications
Step 5: Enable location pushes
Step 6: Display the results


## Step 6: Displaying the results <a id="step-6"/>

Now, lets complete our `ContentView` to display all the results of everything we added above.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Now, lets complete our `ContentView` to display all the results of everything we added above.
Now, let's complete our `ContentView` to display all the results of everything we added above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

5 participants