Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

According to spec, the SDK should be responsible for calling -[UIApplication registerForRemoteNotifications], not the user #1271

Closed
lawrence-forooghian opened this issue Jan 20, 2022 · 1 comment · Fixed by #1293
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@lawrence-forooghian
Copy link
Collaborator

lawrence-forooghian commented Jan 20, 2022

Description

RSH3a2d says:

On event CalledActivate … If the local device does not have the necessary push details, it initiates a request to the underlying platform (or otherwise generates them).

I believe that on iOS, to "initiate a request to the underlying platform" is to call -[UIApplication registerForRemoteNotifications]. However:

  • This SDK never calls that method.
  • We have various pieces of documentation and example code that suggest that a user of the library needs to call this method on app startup:

Activate the device for push notifications with the underlying OS or platform and obtain a unique identifier for the device as a push recipient


* [iOS push notifications tutorial, step 6](https://ably.com/tutorials/ios-push-notifications#step6-register-device-for-push) demonstrates calling this method on app startup.
* Our [push-example-ios example app](https://github.com/ably/push-example-ios) copies this pattern, [calling the method on app startup](https://github.com/ably/push-example-ios/blob/49e4f6532927979af34507f16138a6a278330dba/push-interactive-app/AppDelegate.swift#L43). 

## Next steps
* Confirm whether we believe the behaviour described by the spec to be the right one
* If so, implement it in the library and remove the call to this method from our documentation / example code (confirm that existing code that does call this method will still work fine).



┆Issue is synchronized with this [Jira Bug](https://ably.atlassian.net/browse/SDK-1503) by [Unito](https://www.unito.io)
@maratal
Copy link
Collaborator

maratal commented Jan 20, 2022

Here is related issue #1159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

Successfully merging a pull request may close this issue.

3 participants