WatchOS and location entitlement












5















I've been working on adding a watchapp to a fitness tracker I already have in the app store. I've been able to load it onto my physical phone and watch without trouble in the past.



I've recently added Location tracking to the watch app, so that I can track the path the user has run/biked and show it to them on the phone when they review the workout. Since doing that, I'v been getting errors from Xcode when I try to load the app to my phone; I think these are expected errors, but I'm having trouble understanding from the docs/interface of Xcode and developer.apple.com where to make the fix.



errors from xcode



I've added the entitlement in the watch app entitlements file:



entitlemnents file



As the error says, I've switched to manual signing and generated a new provisioning profile, but I get the same error. I don't see a place to add a location capability in the provisioning profile in developer.apple.com:



enter image description hereenter image description here



It seems like the only way for the provisioning profile to get the entitlement is from Xcode, since there's not a place to add it in developer.apple.com? That seems wrong, and isn't working in any case. I'm not finding help for my case in the Xcode docs (or I'm looking in the wrong place). Any help would be greatly appreciated.










share|improve this question





























    5















    I've been working on adding a watchapp to a fitness tracker I already have in the app store. I've been able to load it onto my physical phone and watch without trouble in the past.



    I've recently added Location tracking to the watch app, so that I can track the path the user has run/biked and show it to them on the phone when they review the workout. Since doing that, I'v been getting errors from Xcode when I try to load the app to my phone; I think these are expected errors, but I'm having trouble understanding from the docs/interface of Xcode and developer.apple.com where to make the fix.



    errors from xcode



    I've added the entitlement in the watch app entitlements file:



    entitlemnents file



    As the error says, I've switched to manual signing and generated a new provisioning profile, but I get the same error. I don't see a place to add a location capability in the provisioning profile in developer.apple.com:



    enter image description hereenter image description here



    It seems like the only way for the provisioning profile to get the entitlement is from Xcode, since there's not a place to add it in developer.apple.com? That seems wrong, and isn't working in any case. I'm not finding help for my case in the Xcode docs (or I'm looking in the wrong place). Any help would be greatly appreciated.










    share|improve this question



























      5












      5








      5








      I've been working on adding a watchapp to a fitness tracker I already have in the app store. I've been able to load it onto my physical phone and watch without trouble in the past.



      I've recently added Location tracking to the watch app, so that I can track the path the user has run/biked and show it to them on the phone when they review the workout. Since doing that, I'v been getting errors from Xcode when I try to load the app to my phone; I think these are expected errors, but I'm having trouble understanding from the docs/interface of Xcode and developer.apple.com where to make the fix.



      errors from xcode



      I've added the entitlement in the watch app entitlements file:



      entitlemnents file



      As the error says, I've switched to manual signing and generated a new provisioning profile, but I get the same error. I don't see a place to add a location capability in the provisioning profile in developer.apple.com:



      enter image description hereenter image description here



      It seems like the only way for the provisioning profile to get the entitlement is from Xcode, since there's not a place to add it in developer.apple.com? That seems wrong, and isn't working in any case. I'm not finding help for my case in the Xcode docs (or I'm looking in the wrong place). Any help would be greatly appreciated.










      share|improve this question
















      I've been working on adding a watchapp to a fitness tracker I already have in the app store. I've been able to load it onto my physical phone and watch without trouble in the past.



      I've recently added Location tracking to the watch app, so that I can track the path the user has run/biked and show it to them on the phone when they review the workout. Since doing that, I'v been getting errors from Xcode when I try to load the app to my phone; I think these are expected errors, but I'm having trouble understanding from the docs/interface of Xcode and developer.apple.com where to make the fix.



      errors from xcode



      I've added the entitlement in the watch app entitlements file:



      entitlemnents file



      As the error says, I've switched to manual signing and generated a new provisioning profile, but I get the same error. I don't see a place to add a location capability in the provisioning profile in developer.apple.com:



      enter image description hereenter image description here



      It seems like the only way for the provisioning profile to get the entitlement is from Xcode, since there's not a place to add it in developer.apple.com? That seems wrong, and isn't working in any case. I'm not finding help for my case in the Xcode docs (or I'm looking in the wrong place). Any help would be greatly appreciated.







      ios watchkit core-location






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 21 '18 at 21:41







      Paul Degnan

















      asked Dec 21 '18 at 21:32









      Paul DegnanPaul Degnan

      1,3191922




      1,3191922
























          2 Answers
          2






          active

          oldest

          votes


















          3





          +50









          I am using location services on iOS and watchOS, but I have nothing related to it in both entitlement files. The docs say:




          Set entitlement values in order to enable iCloud, push notifications,
          Apple Pay, and App Sandbox.




          They don’t mention location services.



          So it might be enough to delete the Location entitlement, and enable automatic signing again.



          Of course, you had to set in your iOS info.plist, as required, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription, and in your watch extension info.plist NSLocationWhenInUseUsageDescription.






          share|improve this answer
























          • This was it. There is no location entitlement for the watchapp.extension. I removed this line in the entitlements file, and was able to run on my phone/watch, and I can see that the watch has recorded location data. Thanks!

            – Paul Degnan
            Jan 2 at 21:38



















          1














          Are you using latest Xcode? Did you set the entitlement in the target menus? They all have toggles now, from what I remember. Once you do that, normally Xcode can resolve signing issues for you. If you look at the signing section in Xcode, does it indicate a signing problem there? (And have you restarted Xcode at least once while trying to resolve the signing problem?)



          Note that the location entitlement should be on your WatchKit Extension, not on the Watchkit App.



          Have a look at the Capabilities tab (it is the one for control of Entitlements, so you do not have to edit the plist directly.)



          Have you tried creating a new project as a test to see if that works? Your screenshot does not match target naming of what I see in Xcode for a WatchKit App. In Xcode 10.1, the WatchKit App plist editor will show 'app name' WatchKit App and the extension plist editor shows 'appname' WatchKit Extension. I see your screenshot showing 'blank' Watchapp Extension. Possibly you edited the project name and that is not an issue? Another thing to verify is that the plist is not corrupt.






          share|improve this answer


























          • yes and yes. there's a screenshot of the signing problem error message in my original post. I tried restarting Xcode, didn't help.

            – Paul Degnan
            Dec 26 '18 at 13:30











          • Hmm, your screenshot of the entitlement is of the ‘plist’ view though, not the user interface entitlements screen with the slider. Do you see those options on your install?

            – Cobra
            Dec 29 '18 at 5:30











          • Added detail to my answer about the interface for setting entitlements.

            – Cobra
            Dec 31 '18 at 14:04











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53890999%2fwatchos-and-location-entitlement%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3





          +50









          I am using location services on iOS and watchOS, but I have nothing related to it in both entitlement files. The docs say:




          Set entitlement values in order to enable iCloud, push notifications,
          Apple Pay, and App Sandbox.




          They don’t mention location services.



          So it might be enough to delete the Location entitlement, and enable automatic signing again.



          Of course, you had to set in your iOS info.plist, as required, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription, and in your watch extension info.plist NSLocationWhenInUseUsageDescription.






          share|improve this answer
























          • This was it. There is no location entitlement for the watchapp.extension. I removed this line in the entitlements file, and was able to run on my phone/watch, and I can see that the watch has recorded location data. Thanks!

            – Paul Degnan
            Jan 2 at 21:38
















          3





          +50









          I am using location services on iOS and watchOS, but I have nothing related to it in both entitlement files. The docs say:




          Set entitlement values in order to enable iCloud, push notifications,
          Apple Pay, and App Sandbox.




          They don’t mention location services.



          So it might be enough to delete the Location entitlement, and enable automatic signing again.



          Of course, you had to set in your iOS info.plist, as required, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription, and in your watch extension info.plist NSLocationWhenInUseUsageDescription.






          share|improve this answer
























          • This was it. There is no location entitlement for the watchapp.extension. I removed this line in the entitlements file, and was able to run on my phone/watch, and I can see that the watch has recorded location data. Thanks!

            – Paul Degnan
            Jan 2 at 21:38














          3





          +50







          3





          +50



          3




          +50





          I am using location services on iOS and watchOS, but I have nothing related to it in both entitlement files. The docs say:




          Set entitlement values in order to enable iCloud, push notifications,
          Apple Pay, and App Sandbox.




          They don’t mention location services.



          So it might be enough to delete the Location entitlement, and enable automatic signing again.



          Of course, you had to set in your iOS info.plist, as required, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription, and in your watch extension info.plist NSLocationWhenInUseUsageDescription.






          share|improve this answer













          I am using location services on iOS and watchOS, but I have nothing related to it in both entitlement files. The docs say:




          Set entitlement values in order to enable iCloud, push notifications,
          Apple Pay, and App Sandbox.




          They don’t mention location services.



          So it might be enough to delete the Location entitlement, and enable automatic signing again.



          Of course, you had to set in your iOS info.plist, as required, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription, and in your watch extension info.plist NSLocationWhenInUseUsageDescription.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 31 '18 at 5:16









          Reinhard MännerReinhard Männer

          6,09822849




          6,09822849













          • This was it. There is no location entitlement for the watchapp.extension. I removed this line in the entitlements file, and was able to run on my phone/watch, and I can see that the watch has recorded location data. Thanks!

            – Paul Degnan
            Jan 2 at 21:38



















          • This was it. There is no location entitlement for the watchapp.extension. I removed this line in the entitlements file, and was able to run on my phone/watch, and I can see that the watch has recorded location data. Thanks!

            – Paul Degnan
            Jan 2 at 21:38

















          This was it. There is no location entitlement for the watchapp.extension. I removed this line in the entitlements file, and was able to run on my phone/watch, and I can see that the watch has recorded location data. Thanks!

          – Paul Degnan
          Jan 2 at 21:38





          This was it. There is no location entitlement for the watchapp.extension. I removed this line in the entitlements file, and was able to run on my phone/watch, and I can see that the watch has recorded location data. Thanks!

          – Paul Degnan
          Jan 2 at 21:38













          1














          Are you using latest Xcode? Did you set the entitlement in the target menus? They all have toggles now, from what I remember. Once you do that, normally Xcode can resolve signing issues for you. If you look at the signing section in Xcode, does it indicate a signing problem there? (And have you restarted Xcode at least once while trying to resolve the signing problem?)



          Note that the location entitlement should be on your WatchKit Extension, not on the Watchkit App.



          Have a look at the Capabilities tab (it is the one for control of Entitlements, so you do not have to edit the plist directly.)



          Have you tried creating a new project as a test to see if that works? Your screenshot does not match target naming of what I see in Xcode for a WatchKit App. In Xcode 10.1, the WatchKit App plist editor will show 'app name' WatchKit App and the extension plist editor shows 'appname' WatchKit Extension. I see your screenshot showing 'blank' Watchapp Extension. Possibly you edited the project name and that is not an issue? Another thing to verify is that the plist is not corrupt.






          share|improve this answer


























          • yes and yes. there's a screenshot of the signing problem error message in my original post. I tried restarting Xcode, didn't help.

            – Paul Degnan
            Dec 26 '18 at 13:30











          • Hmm, your screenshot of the entitlement is of the ‘plist’ view though, not the user interface entitlements screen with the slider. Do you see those options on your install?

            – Cobra
            Dec 29 '18 at 5:30











          • Added detail to my answer about the interface for setting entitlements.

            – Cobra
            Dec 31 '18 at 14:04
















          1














          Are you using latest Xcode? Did you set the entitlement in the target menus? They all have toggles now, from what I remember. Once you do that, normally Xcode can resolve signing issues for you. If you look at the signing section in Xcode, does it indicate a signing problem there? (And have you restarted Xcode at least once while trying to resolve the signing problem?)



          Note that the location entitlement should be on your WatchKit Extension, not on the Watchkit App.



          Have a look at the Capabilities tab (it is the one for control of Entitlements, so you do not have to edit the plist directly.)



          Have you tried creating a new project as a test to see if that works? Your screenshot does not match target naming of what I see in Xcode for a WatchKit App. In Xcode 10.1, the WatchKit App plist editor will show 'app name' WatchKit App and the extension plist editor shows 'appname' WatchKit Extension. I see your screenshot showing 'blank' Watchapp Extension. Possibly you edited the project name and that is not an issue? Another thing to verify is that the plist is not corrupt.






          share|improve this answer


























          • yes and yes. there's a screenshot of the signing problem error message in my original post. I tried restarting Xcode, didn't help.

            – Paul Degnan
            Dec 26 '18 at 13:30











          • Hmm, your screenshot of the entitlement is of the ‘plist’ view though, not the user interface entitlements screen with the slider. Do you see those options on your install?

            – Cobra
            Dec 29 '18 at 5:30











          • Added detail to my answer about the interface for setting entitlements.

            – Cobra
            Dec 31 '18 at 14:04














          1












          1








          1







          Are you using latest Xcode? Did you set the entitlement in the target menus? They all have toggles now, from what I remember. Once you do that, normally Xcode can resolve signing issues for you. If you look at the signing section in Xcode, does it indicate a signing problem there? (And have you restarted Xcode at least once while trying to resolve the signing problem?)



          Note that the location entitlement should be on your WatchKit Extension, not on the Watchkit App.



          Have a look at the Capabilities tab (it is the one for control of Entitlements, so you do not have to edit the plist directly.)



          Have you tried creating a new project as a test to see if that works? Your screenshot does not match target naming of what I see in Xcode for a WatchKit App. In Xcode 10.1, the WatchKit App plist editor will show 'app name' WatchKit App and the extension plist editor shows 'appname' WatchKit Extension. I see your screenshot showing 'blank' Watchapp Extension. Possibly you edited the project name and that is not an issue? Another thing to verify is that the plist is not corrupt.






          share|improve this answer















          Are you using latest Xcode? Did you set the entitlement in the target menus? They all have toggles now, from what I remember. Once you do that, normally Xcode can resolve signing issues for you. If you look at the signing section in Xcode, does it indicate a signing problem there? (And have you restarted Xcode at least once while trying to resolve the signing problem?)



          Note that the location entitlement should be on your WatchKit Extension, not on the Watchkit App.



          Have a look at the Capabilities tab (it is the one for control of Entitlements, so you do not have to edit the plist directly.)



          Have you tried creating a new project as a test to see if that works? Your screenshot does not match target naming of what I see in Xcode for a WatchKit App. In Xcode 10.1, the WatchKit App plist editor will show 'app name' WatchKit App and the extension plist editor shows 'appname' WatchKit Extension. I see your screenshot showing 'blank' Watchapp Extension. Possibly you edited the project name and that is not an issue? Another thing to verify is that the plist is not corrupt.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 29 '18 at 10:56

























          answered Dec 25 '18 at 4:19









          CobraCobra

          23916




          23916













          • yes and yes. there's a screenshot of the signing problem error message in my original post. I tried restarting Xcode, didn't help.

            – Paul Degnan
            Dec 26 '18 at 13:30











          • Hmm, your screenshot of the entitlement is of the ‘plist’ view though, not the user interface entitlements screen with the slider. Do you see those options on your install?

            – Cobra
            Dec 29 '18 at 5:30











          • Added detail to my answer about the interface for setting entitlements.

            – Cobra
            Dec 31 '18 at 14:04



















          • yes and yes. there's a screenshot of the signing problem error message in my original post. I tried restarting Xcode, didn't help.

            – Paul Degnan
            Dec 26 '18 at 13:30











          • Hmm, your screenshot of the entitlement is of the ‘plist’ view though, not the user interface entitlements screen with the slider. Do you see those options on your install?

            – Cobra
            Dec 29 '18 at 5:30











          • Added detail to my answer about the interface for setting entitlements.

            – Cobra
            Dec 31 '18 at 14:04

















          yes and yes. there's a screenshot of the signing problem error message in my original post. I tried restarting Xcode, didn't help.

          – Paul Degnan
          Dec 26 '18 at 13:30





          yes and yes. there's a screenshot of the signing problem error message in my original post. I tried restarting Xcode, didn't help.

          – Paul Degnan
          Dec 26 '18 at 13:30













          Hmm, your screenshot of the entitlement is of the ‘plist’ view though, not the user interface entitlements screen with the slider. Do you see those options on your install?

          – Cobra
          Dec 29 '18 at 5:30





          Hmm, your screenshot of the entitlement is of the ‘plist’ view though, not the user interface entitlements screen with the slider. Do you see those options on your install?

          – Cobra
          Dec 29 '18 at 5:30













          Added detail to my answer about the interface for setting entitlements.

          – Cobra
          Dec 31 '18 at 14:04





          Added detail to my answer about the interface for setting entitlements.

          – Cobra
          Dec 31 '18 at 14:04


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53890999%2fwatchos-and-location-entitlement%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas