logo
down
shadow

Using CLLocationManager in SpringBoard, but got the error with:depending on legacy on-demand authorization, which is not


Using CLLocationManager in SpringBoard, but got the error with:depending on legacy on-demand authorization, which is not

By : user2956034
Date : November 22 2020, 10:48 AM
hope this fix your issue It's all due to iOS 8 changes. On previous iOS versions at least locationd had com.apple.locationd.preauthorized entitlement which gives access to location without user permission. Now even locationd doesn't have it. Same with SpringBoard and imagent. Of course, being locationd it can access location through it's own APIs - locationd is the location daemon that handles everything from authorization to filtering and processing raw location data from various sources.
You can change their Info.plist but it will not do much - those apps will still not be authorized. With SpringBoard you will have to display default alert to allow it to access location. With locationd and imagent you probably can't do anything - they're daemons. Daemons doesn't have UI so they can't display any alerts to request permission. To solve this system daemons use entitlements to access something without user permission (like personal info).
code :


Share : facebook icon twitter icon
CLLocationManager authorization issue iOS 8

CLLocationManager authorization issue iOS 8


By : mathew jose
Date : March 29 2020, 07:55 AM
I hope this helps . It's an iOS 8 related issue. You have to put NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription keys in your .plist file (value may be an additional message that will be presented in location alert). These keys are required in iOS 8.
How it's said in Apple guidelines:
CLLocationManager authorization message

CLLocationManager authorization message


By : Xaime Méndez Rico
Date : March 29 2020, 07:55 AM
This might help you Prompting alert each time is not a valid approach. For an alternative you can show alert only in that case when Location Service is disabled or "Dont Allow" initially.
Following code promt alert at first and a custom alert when Location Service is Disabled
code :
import UIKit

import CoreLocation

class ViewController: UIViewController,CLLocationManagerDelegate {    

    var locationManager = CLLocationManager()

    override func viewDidLoad() {
        super.viewDidLoad()

        initLocationManager()


        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func initLocationManager(){

        let status = CLLocationManager.authorizationStatus()

        if(status == CLAuthorizationStatus.NotDetermined) {
            locationManager = CLLocationManager()
            locationManager.delegate = self
            locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters

            let iosVersion = NSString(string: UIDevice.currentDevice().systemVersion).doubleValue

            if iosVersion >= 8.0 {
                //For Foreground
                locationManager.requestWhenInUseAuthorization()
            }
            locationManager.startUpdatingLocation()

        } else {
            if(status != CLAuthorizationStatus.AuthorizedWhenInUse) {


                var alert = UIAlertView(title: "Location", message: "Please turn on Location Services", delegate: nil, cancelButtonTitle: "Cancel")
                alert.addButtonWithTitle("Open Setting")
                alert.show()

                /*Add Action on Open Setting alertbutton to directly open settings in iOS 8 and later

                ->    UIApplication.sharedApplication().openURL(NSURL(string: UIApplicationOpenSettingsURLString)!)*/

            }
        }
    }
}
Google Maps on iOS error: is depending on legacy on-demand authorization, which is not supported for new apps

Google Maps on iOS error: is depending on legacy on-demand authorization, which is not supported for new apps


By : user6140926
Date : March 29 2020, 07:55 AM
With these it helps Did you include the build hint ios.locationUsageDescription as described here?
It's mentioned in the location API JavaDocs too.
CLLocationManager - Authorization prompt goes away?

CLLocationManager - Authorization prompt goes away?


By : Dan Antonie
Date : March 29 2020, 07:55 AM
like below fixes the issue Try saving a reference to the location helper.
It might be auto released after the view has loaded.
code :
import UIKit

class LiveDataViewController: UIViewController {

    let locHelp = LocationHelper()

    override func viewDidLoad() {
        super.viewDidLoad()

        locHelp.checkStatus()
    }
}
IOS 8 CLLocationManager Issue (Authorization Not Working)

IOS 8 CLLocationManager Issue (Authorization Not Working)


By : Mistra
Date : March 29 2020, 07:55 AM
will be helpful for those in need You should not turn on MKMapView's showsUserLocation before the user has authorised your app to use Location services.
You can implement CLLocationManagerDelegate's locationManager:didChangeAuthorizationStatus: method and turn on showsUserLocation there like so:
Related Posts Related Posts :
  • What is Object dictionary in CANOpen?
  • Example of orbBasic Indexed User Variables
  • convert to ABSOLUTE in logback
  • How to conditionally download file using p:fileDownload
  • Error on pod install
  • Set HTTP GET Parameters in Finagle
  • different attack that uses sql injection
  • How can I change my xampp username not as 'root'
  • AMQP Content header payload structure
  • Apache POI formula evaluation not working for Excel IF
  • How can I trace RESTEasy's dispatch?
  • Map Freezes on iOS 7 with Google Maps SDK 1.4
  • Comparing lists, is the subset list within the first list
  • Non-ascii character highlight in Sublime Text 2
  • Installing Magit in Aquamacs
  • Receiving error - System.Net.Mail.SmtpException: 4.3.2 try again later
  • Coreaudio render callback in monotouch
  • The command 'yarn --v' also initiates 'yarn install' and installs packages automatically. Why is this happening?
  • save multiple matches in a list (grep or awk)
  • Can a number register be used in a groff request?
  • Mapping FAQ with RASA for large dataset (2000+)
  • Fragment not receiving LiveData updates after remove + add
  • FitText.js makes text bigger rather than smaller
  • ARM - Implementing stack with load/store multiple register values
  • How to check if a ChromeCast Session is already in progress
  • ngForm inside a Carousel Slide in UI Bootstrap not working
  • Clearing attributes in Tritium
  • "vagrant up" failing: Vagrant VM failed to remain in the running state
  • ftsearch returning empty docs
  • What are the advantages of setting "hive.exec.parallel" to false in Hive ?
  • Creating a root certificate in FiddlerCore
  • How to access app.config in a blueprint?
  • DB2 RECORDSET table name converted to uppercase
  • Resizing the superview according to the subviews
  • IExpress - Disable Compression
  • Getting InvalidProtocolBufferException while running oozie job
  • What are the differences between Play run and start?
  • How can I share props in ReasonReact?
  • Task.Delay is skipped
  • Parsley.js Password Confirm doesn‘t work
  • How to get all registred 'browser:resource' in Plone
  • Overriding page_list controller inside a package in Concrete5.6.1.2
  • Robolectric 2.x - dependent jars are downloading while running the tests
  • Setting Flyout to Main Frame Navigation(Windows 8.1 app store)
  • Build project - Nuget Error
  • How to recover admin password for SonarQube
  • perforce Tagging and labelling files
  • How to pass data from one window to another in Titanium?
  • TeamCity CI - Make custom build output folder
  • Multi-tenant ServiceStack API, same deployment to respond to requests on different hostnames?
  • How to show downshift + popper on top of material-ui dialog?
  • jQuery file upload and RequireJS configuration
  • How to send the result of a select query to a message body of a mail in oracle 10G
  • Worklight common build failing with "Failed to update main HTML file"
  • pg_listening_channels() is not returning the channels name
  • Asset management in ZF2
  • Does the Firefox add-on sdk allow direct modification of the http response byte stream?
  • How to remove menu hardware key from your android app
  • Identifying programming language
  • Use shell commands to find Makefile.am in configure.ac
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org