Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8741411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:18:36+00:00 2026-06-13T11:18:36+00:00

I’m writing a notification center widget, and it had to use location information. In

  • 0

I’m writing a notification center widget, and it had to use location information. In normal apps I use CoreLocation and it works fine. But in my widget, I tried to locationServicesEnabled but it didn’t go to the callback functions, and the authorizationStatus is always kCLAuthorizationStatusNotDetermined, and the authorize setting didn’t show up in Setting -> location service. I already set the delegate to the class.

The system’s Yahoo weather widget can auto locating and it uses CoreLocation too, so the widget do have ability to use location service.

Why CoreLocation doesn’t work on my widget?


Update: 2012.10.24 15:52

I use private API

[CLLocationManager setAuthorizationStatus:YES 
                                forBundle:[NSBundle bundleForClass:self.class]]

Now, the authorize setting shows in the Setting->location service. And every time I pull down the notification center, it turns on. But the authorizationStatusis still kCLAuthorizationStatusNotDetermined and won’t go to the callback functions.


Update: 2012.10.25 10:38

I change my locating code to:

[CLLocationManager setDefaultEffectiveBundle:[NSBundle bundleForClass:self.class]];
[_locationManager startUpdatingLocation];

If I turn off location service, it will jump to

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error

If I turn the service on, no matter I authorize it or not, there’s no calling back (both

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error

and

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation

won’t be invoked).

By the way, when I turn on/off the service,

- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status

will be invoked, but not when I change the authorizationStatus.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:18:37+00:00Added an answer on June 13, 2026 at 11:18 am

    Maybe it’s because a WeeAppPlugin bundle is not a effective bundle that cause the widget cant’s use location service. After I user [[CLLocationManager alloc] initWithEffectiveBundle:[NSBundle bundleForClass:self.class]] in private API of CoreLocation, the widget can get location info normally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want to construct a data frame in an Rcpp function, but when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.