xcode


CLLocationManager startUpdatingLocation not working in application:didFinishLaunchingWithOptions:


I'm using the CLLocationManager startUpdatingLocation in the AppDelegate's method application:didFinishLaunchingWithOptions:
The delegate method are never fired.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
[self performSelectorOnMainThread:#selector(startUpdatingLocation) withObject:nil waitUntilDone:NO];
// [self startUpdatingLocation];
return YES;
}
-(void)startUpdatingLocation
{
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
[locationManager startUpdatingLocation];
}
I've tried both, using main thread and just calling my method, but none of them is working.
I've implemented all these method, but none of them is triggered:
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
Solution:
https://devforums.apple.com/message/1073496#1073496

Related Links

Enumerate BOOLs from an NSDictionary
How to display “the” Assistant Editor?
iOS 4 won't load new property list
non_lazy_pointer problem
Search for a particular string in a process memory using GDB in OSX
How to prevent Xcode 3.2.5 to not show those blue message bubbles when debugging?
How to Turn a View into Landscape Mode in Xcode 4
XCode- Need Help With Errors (Expected ; and Expected Statement)
How to set up SDL on XCODE 4?
xcode 4 add CoreData in a existing project
How can I find my application's resource group/map in XCode?
iOS Architecture and Xcode Organiser window
How to save the option selected in UIPickerView and Load it back up
SecTrustedApplicationCreateFromPath being too smart?
How to quickly remove all the unused variables with xCode?
Xcode keeps guessing and interpreting with wrong encoding

Categories

HOME
webview
generics
focus
schema.org
paypal-ipn
redmine
loopbackjs
initialization
docker-cloud
visualforce
minecraft
nexus3
game-maker
chromecast
global-variables
sonicwall
twisted
phonegap-build
pygobject
jaspersoft-studio
salt-cloud
psql
android-custom-view
activeadmin
neo4j.rb
strophe.js
amazon-cloudtrail
nppexec
pdfminer
django-smart-selects
sspi
android-n
best-buy-api
grunt-contrib-watch
netapp
distributed-caching
yoast
latexml
transparency
bit-shift
rightnow-crm
aws-kinesis-firehose
sonicmq
embedded-v8
watir-webdriver
gtk#
nslayoutconstraint
apache-modules
gawk
allegro
okio
perforce-integrate
facebook-ios-sdk
jeasyui
mathnet
flask-security
lovefield
textpattern
chicagoboss
calcite
uitest
artisan
phpredis
wicked-gem
nhibernate-criteria
fasterxml
berkeley-db-xml
tabris
object-code
loginview
rpg
ctp
eclim
progress-db
mousemotionlistener
rautomation
statechart
axacropdf
icenium
system-requirements
voice-recording
websphere-6.1
taskkill
jdom
exponent
navigationcontroller
glx
django-apps
qtextbrowser
servercontrol
drawimage
canonicalization
jdownloader
raw-data
mysqli-multi-query
eai
server-load
levels
remote-working
service-factory

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App