Location Services not working in iOS 6 [duplicate]

2019-02-19 05:56发布

问题:

Possible Duplicate:
iOS 6 and Location Services not working

Our app's location services have stopped functioning in iOS 6. They work fine in iOS 5. When I call CLLocationManager's startUpdatingLocation method it never prompts the user for access and our app doesn't show up in the Settings Location Services page.

Anyone seen this before? I really have no idea where to look. I have tried stripping down our app to just a single view controller and it still doesn't work. Maybe something in the build settings?

Edit: I created a new target and it works in there.

回答1:

It looks like the problem was we did not have CFBundleDisplayName declared in the .plist file. We had CFBundleName but not CFBundleDisplayName.



回答2:

I created the project with XCode 4.4, after install Xcode 4.5 location doesn't work. Declaring in the .plist file key CFBundleDisplayName location now is working.