{"id":21768180,"url":"https://github.com/below/exponotificationissue","last_synced_at":"2026-04-14T04:31:43.414Z","repository":{"id":66512582,"uuid":"566769854","full_name":"below/ExpoNotificationIssue","owner":"below","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-17T08:07:10.000Z","size":392,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-11T20:42:01.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/below.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-16T11:38:02.000Z","updated_at":"2022-11-16T11:39:28.000Z","dependencies_parsed_at":"2023-03-13T20:29:46.348Z","dependency_job_id":null,"html_url":"https://github.com/below/ExpoNotificationIssue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/below/ExpoNotificationIssue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FExpoNotificationIssue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FExpoNotificationIssue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FExpoNotificationIssue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FExpoNotificationIssue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/below","download_url":"https://codeload.github.com/below/ExpoNotificationIssue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FExpoNotificationIssue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31782736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-26T13:34:02.611Z","updated_at":"2026-04-14T04:31:43.399Z","avatar_url":"https://github.com/below.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Bug in Expo Notifications.requestPermissionsAsync\n\n### Abstract\n\nThis repository serves to demonstrate that after initially requesting Notification permissions on iOS with a given set of options, calling the method again with different options has no effect.\n\n### The Issue\n\nOn iOS, the permissions for Notification can be requested with a set of [options](https://developer.apple.com/documentation/usernotifications/unauthorizationoptions). The most common ones are to display alerts or play sounds, but they can also enable notifications on CarPlay displays, or enable critical alerts. Over the course of its lifetime, an app may introduce aditional capabilities, such as critical alerts or other, newly introduced iOS features and thus, must call `requestAuthorization(options:completionHandler:)` again with a new set of options. Expo Notifications supports all these [options](https://docs.expo.dev/versions/latest/sdk/notifications/#requestpermissionsasyncrequest-notificationpermissionsrequest-promisenotificationpermissionsstatus) for  `requestPermissionsAsync`.\n\nThe issue is, that after an app is newly installed on a device, the first call to `Notification.requestPermissionsAsync` will prompt the user, and set the given options. **However, subsequent calls will have no effect.**\nThis means, for the user to take advantage of new features, they will have to de-install and re-install the app, which is completely unacceptable.\n\n### To Reproduce\n\n* Build and run the project on the iOS Simulator or Device (Remember to run `npm i` and `(cd ios \u0026\u0026 pod install)` first).\n* Press \"Request Alerts\". You should be prompted for consent, please allow.\n* You should see that alerts are enabled, sounds are not. (Feel free to check in the Settings App)\n* Press \"Request Alerts \u0026 Sound\"\n\n### Expected Result\n\nAlerts and Sounds are enabled\n\n### Actual result\n\nStill only Alerts are enabled\n\n### The Root of the Problem\n\nThe root of the problem can be found in [EXPermissionsService.m:111](https://github.com/expo/expo/blob/168ee43f71f005baa11edf98e518593443e1807a/packages/expo-modules-core/ios/Services/Permissions/EXPermissionsService.m#L111):\n\n```objc\n  BOOL isGranted = [EXPermissionsService statusForPermission:permission] == EXPermissionStatusGranted;\n  permission[@\"granted\"] = @(isGranted);\n  \n  if (isGranted) {\n    return onResult(permission);\n  }\n  \n  [self askForGlobalPermissionUsingRequesterClass:requesterClass \n                                     withResolver:onResult \n                                     withRejecter:reject];\n```\n\nThis means that permissions are only ever requested again, if permission has not previously been granted. This however **does not consider different options**, but only if any sort of notification permissions have been granted. This means that if previously only Alerts have been requested, a new request for Alerts and Sounds will be ignored.\n\n### The Solution\n\nOn iOS, it is perfectly acceptable to call `requestAuthorization(options:completionHandler:)` repeatedly: \n\u003e subsequent calls to this method do not prompt the user again\n\nMy proposal therefore is to remove the method `askForPermissionUsingRequesterClass` entirely, and instead rename `askForGlobalPermissionUsingRequesterClass` appropriately.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelow%2Fexponotificationissue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelow%2Fexponotificationissue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelow%2Fexponotificationissue/lists"}