kCLAuthorizationStatusRestricted is showing up for one of my apps but not another on the same device - ios

I have an app i'm maintaining which recently stopped reporting users locations. This is happening on many devices where it was previously working. On my device I have determined that the auth status of CLLocationManager is kCLAuthorizationStatusRestricted. This stops the app from prompting for user permission.
I have no restrictions set around core locations and another app of mine running the exact same helper class to manage location works fine on the same device. It prompts for user permission as it should.
Does anyone know anything that would cause kCLAuthorizationStatusRestricted to show up besides restrictions?

In the Settings app (in iOS 6) look under General, then Restrictions. If Restrictions is enabled, then scroll way down to Privacy section. This is where Restrictions are set for Location Services.
This is a different set of Privacy restrictions from the Privacy section that is on the first screen that can be locked with a passcode.

Related

iOS Terminated due to signal 9 on allowing permission [duplicate]

This question already has answers here:
Toggling Privacy settings will kill the app
(2 answers)
Closed 4 years ago.
I am making an iOS app and I am new in iOS world. In this app, I want to access user contacts. Everything is going good and working well. But I experienced a amazing behavior which I have not seen in Android since I am android developer.
In iOS to access user contacts I am using Contacts Framework. I think it is relatively more easy and fast then anyother else in the iOS. However, I did not able to completely take advantage of that. Let me tell you what I did and what Problem did I faced.
What I have done I cask for permission on ViewController and User is prompt with Dialog asking for contacts permission. If user allow permission, everything goes well, but when user dont allow the permission here comes the trouble.
Accessing User contacts are more necessary since My app's whole working and basic business idea is upon user contacts. Now to handle this, when user Do not allow permission I am showing another dialog telling him that He must allow permission so that App can continue, So far so good.
Now I am taking user to settings where he can allow the permission or he can simply go again back. Now checkout 2 cases
CASE 1: When User come on Settings screen and go back again without
allowing permission
When I take user to Settings screen and instead of allowing permission he gets back to my app I try to show him same dialog again to enable permission in every case. This is going good. I mean for testing purpose I repeat same procedure manytimes, I mean I do not allow my self Contacts permission, It takes me to setting scree, from settings screen I get back to my app and again I am able to see same dialog that took me to settings scree. THIS IS FINE
CASE 2: When User is taken to settings screen and he permits the
permission:
Here when user allows the permission I get message in the log that is "Message from debugger: Terminated due to signal 9". And when I get back to my app, it starts over again. Looks like my app gets re-open or crashed being in background.
Important: For this I examined my memory or task anything that is being performed in background, but there is nothing going on in background. My memory size before crashing is 54.78 mb. And I do not think so it is worth worying.
Any one have idea what is going on??
Your app is not crashing its just forced to restart by iOS with new privacy settings. iOS will SIGKILL the app. (it's default behaviour of iOS). You can checkout - WWDC 2012 Session Videos: Privacy Support in iOS and OS X for more info on this.
This does not hold true for Location permissions.
It is expected behaviour. iOS terminates the app when user changes permission for Contacts, Camera, Microphone and Photos (and possibly some others).

How to activate and open my app as soon as I unlock my screen in iOS devices

I'm managing few iOS devices, so I want to create a app to add security feature like collecting the user information from the user like UserID to track which user is currently using the device .
Desired output:
So I want to trigger my app as soon as a user unlock the device and without giving the details the user should not able to access the home screen of the Device.
Is it possible to do it with any framework in iOS without Jailbreak ?
No its not possible. iOS does not allows application to manage device with it self. Application should work in the pre given area which is called Sandbox. So its not possible to handle the entire device and you can not check it that who is using the device.
This is not possible, you should look to Mobile Device Management solutions and rather go that route. You could also look at apple's business solutions.

Location Background Mode Always or WhenInUse

I have two apps built that use your location similar to a run tracking app where I use the location in the background but only when you are actively tracking a run. This works in iOS 11 after only requesting WhenInUse authorization and you get the top blue bar when you leave the app. Both are in the app store but in my most recent submission I keep getting rejected with the following response:
Regarding 5.1.5, the current modal alert available to the user requests permission to access the Foreground Location. However, your app does not request and obtain the user's consent prior to accessing their background location data, which is not allowed on the App Store.
Is this something new and they just haven't noticed before? I also checked Google Maps and Strava and they both use my location when I'm actively using it even when they are in WhenInUse mode.
I would prefer to use only WhenInUse mode as I think it more clearly conveys to the user what the app is doing. We never use your location when the app isn't recording a run.
If you can link to Apple documentation about this situation it would help even more.

iOS location permission after app reinstall

I’m using Crashlytics for internal application tests and noticed one interesting thing. I’m using geolocation in my app and asking for permissions from a user. When customer install app for first time he sees default Apple’s geolocation permissions asking pop up. And everything work fine.
But, if user will remove app from phone and install it again... in this case, when I’m asking for permissions, pop up just won’t appear BUT geolocation is WORKING. How? Is this some sort of new feature or iOS issue? I were testing with iOS 11.0.3. I haven’t found anything in documentation, and haven’t seen this behavior in previous iOS versions. Looks like iOS just memorize the app and automatically enables geolocation when I’m asking for user permissions instead of showing pop up.
Maybe someone has answer for this?
it is possible that there could be a mistake in your code pattern while checking authorization status, the behavior you are seeing is likely due to iOS caching location permissions for apps.
In your code, make sure that you check authorization status (via the authorizationStatus() method), and continue with requesting location authorization when the current status is .notDetermined (kCLAuthorizationStatusNotDetermined)
iOS does cache authorization status for apps as well. If you would like to reset your location permissions for testing purposes, you can set your location privacy settings to the factory default: go to Settings > General > Reset and tap Reset Location & Privacy. When your location and privacy settings are reset, apps will stop using your location until you grant them permission.
Unfortunately there is no developer control over this.
Caching of permissions for apps is in an ever evolving stage, where we are trying to find the best user experience, so you may have noticed some changes lately. Also, there will be a grace period where the app uninstall to reinstall time might be making a difference.
If your observations of apps that behave like you expected are recent (on the same version of iOS that you have observed your app behave differently), and the uninstall/reinstall time difference is immediate (like how you probably test your app), please let me know which apps, and I will see if I can dig some information.

Cannot change current password in android 7

My app has device administration power. When I tried to update the current password in android 7, This "java.lang.SecurityException: Admin cannot change current password" exception is coming. It's working in android 6. Please tell me How can I reset my password in nougat.
Looks like Google has changed the ability of device admin apps. I don't fully understand why. I know it could be used by hackers, but that's why screen lock is a separate permissions set you have to enable.
We’ve reduced the power of device admin applications so they can no longer change your lockscreen if you have a lockscreen set, and device admin will no longer be notified of impending disable via onDisableRequested().These were tactics used by some ransomware to gain control of a
device.
Here's the full link https://blog.google/topics/connected-workspaces/keeping-android-safe-security-enhancements-nougat/

Resources