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

Fix missing push notification capability error detection #962

Merged
merged 3 commits into from
Jul 22, 2021

Conversation

jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Jul 22, 2021

Description

One Line Summary

Replace the "Other Apns 3000 Error" error with the correct "Missing Push Capability" error.

Details

See commit-by-commit for more details.

Testing

Tested on Xcode 12.4 and on an iPhone running iOS 14.4.1.


This change is Reviewable

* It is not reliable to use a string check on an error message to map
to a specific OneSignal error code.
* Second there is only one reason you would get a 3000 error code,
the push notification capability is not enabled.
  - The 3000 "other" error that was being reported was never a thing.
  - This "other" 3000 error happens when the device is not set to
  English.
  - Also recently (iOS 13 or 14) the English error message changed.
* This means we will no longer see the confusing "Other Apns 3000 Error"
  message on the OneSignal dashboard and will now see the correct
  "Missing Push Capability".
* Per the last commit we no longer will be using "other 3000"
and instead this will always be ERROR_PUSH_CAPABLILITY_DISABLED instead.
* Keeping the define but post-fixing with "_UNUSED_RESERVED"
  - This is so we don't reuse this notification_types value later and
  keep this around so someone can git-blame to find this reasoning.
* Updated it with new instructions based what was observed in Xcode 12.4
@jkasten2 jkasten2 requested review from Jeasmine and emawby July 22, 2021 02:04
Copy link
Contributor

@emawby emawby left a comment

Choose a reason for hiding this comment

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

lgtm

@jkasten2 jkasten2 merged commit 2e20861 into main Jul 22, 2021
@jkasten2 jkasten2 deleted the fix/capability_error_detection branch July 22, 2021 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants