2 Replies
      Latest reply on Jun 15, 2018 1:52 PM by alan.raceQs
      alan.raceQs Level 1 Level 1 (0 points)

        Since a recent upgrade - Xcode 9.4, WatchOS 4.3, iOS 11.4, the "Request Authorization at Launch Time" in my watchApp is no longer generating the request authorization pop-up on the phone.

        My requests are appearing as if the user had provided authorization.

        Yes, I have uninstalled the app and rebooted all devices many times to see if there was something left "hanging around".


        In itself, that's not a problem, as I want my users to accept Notifications, they are intrinsic to my app, but the problem is that the Simulator is not requesting authorization and denying it in

        center.requestAuthorization(options: [.alert, .sound]) { (granted, error) in
                    print("granted: \(granted), error: \(error!)")


        • Re: Request Authorization at Launch Time not triggering request authorisation popup
          Claude31 Level 8 Level 8 (5,555 points)

          What do you get exactly in the print ?


          The problem may be with simulator : it stores the authorizations.

          You can reset them:

          h ttps://stackoverflow.com/questions/16195859/reset-ios-simulator-application-data-to-run-app-for-first-time

            • Re: Request Authorization at Launch Time not triggering request authorisation popup
              alan.raceQs Level 1 Level 1 (0 points)

              The print returns:

              granted: false, error: nil

              ( I had to change the print to  print("granted: \(granted), error: \(error)") )

              And I followed the link to reset the Sim with the same result. The app starts with no request for authorization and does not generate Notifications.

              When I run on the Device (Watch Series2, iPhone6) after uninstalling the app, the print returns

              granted: true, error: nil

              without prompting for authorization and generates Notifications correctly.

              I remember that on earlier builds (earlier this month, I think) it would prompt for authoriztion, I don't precicely recall when it stopped prompting.


              P.S. The link is now obsolete'ish as the Xcode Menu option is "Erase All Content and Settings...".