In my application I include a 3rd party SDK which has the capability of asking for background location permissions. However I do not want this feature or the permissions popup in my app. From what I can tell this should be as simple as not including the NSLocationAlwaysUsageDescription in my plist.
As per Apple's documentation on NSLocationAlwaysUsageDescription:
This key is required when you use the requestAlwaysAuthorization method of the CLLocationManager class to request authorization for location services. If this key is not present and you call the requestAlwaysAuthorization method, the system ignores your request and prevents your app from using location services.
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW18
However the app clearly is capable of calling for permissions as the popup still shows when utilizing the SDK. When using the SDK in a non-AIR test app I do not have this issue.
Ideally I am looking to prevent these popups as this SDK is integral to the product. How can I tell AIR not to include this capability?
No, location permissions are not auto included with the AIR SDK.
The NSLocationAlwaysUsageDescription key is a requirement, it is not the element that initiates the location permission.
This is also a new requirement, so for older iOS versions this does not apply.
It sounds like your third party SDK is the issue, perhaps contact the developers and enquire with them.
Related
Apple has rejected the app due to this:
Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
We noticed that your app requests the user’s consent to access the location, but doesn’t sufficiently explain the use of the location in the purpose string.
To help users make informed decisions about how their data is used, all permission request alerts need to specify how your app will use the requested information.
But we do not use any location service on the app. Apple mentioned screen is coming through the 3rd party web app. i.e. we have used "In-app browser" here. Since we cannot control the Location text on the 3rd party PWA app we cannot do anything here. So can you tell us how to overcome this kind of situation?
Reson from the Apple:
i.e. this shows on the in-app browser. not our app's message. no control from our side
Have you tested putting in a NSLocationWhenInUseUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationUsageDescription or NSLocationAlwaysUsageDescription in your Info.plist?
It might override the 3rd party's so you can make it more detailed but you have to include their privacy policy in yours. Since ultimately whatever they do is your responsibility.
I would be skeptical about using a 3rd party that requires location for a browser.
The text shown in this alert, "Allow Geolocation," is probably provided by the Ionic Framework (based on your tags). While you didn't write this code, it's still code you're providing (rather than Apple) so it's your responsibility.
Like Lorem Ipsum said, you might be able to override the text yourself - by that method or another method – but regardless the responsibility is on you to manage your libraries and dependencies, even though you didn't write them.
I am working on one project and I want to get other application usage time. apple has launched iOS 12 and provides the new feature Screen Time. I want to know is there any way or API provided by Apple to get data from it.
No, on iOS each app runs in its own sandbox and cannot see data from other apps, even apps from the same publisher. An app can access special shared data, like photos from the album or contact data, but it is not possible for an app to directly access files written by other apps.
ScreenTime application is on another sandbox than your app. Unless apple provide API we can't access the same.
Update
Since apple have added screen time app into ios12 simulator. There could be a chance they provide the API's soon.
On iOS 15 Apple has added an API, see here:
https://developer.apple.com/documentation/FamilyControls
FamilyControls
Authorize your app to provide parental controls on a
child’s device. To authorize your parental controls app, use a shared
AuthorizationCenter instance. You can authorize parental controls only
on a device that is part of a Family Sharing group and signed into a
child’s iCloud account.
You must add the Family Controls capability to your app.
This seems to provide functionality to parental control apps only. In other words, it cannot be used by other time-tracking or productivity apps at the moment.
I'm using Location Manager to track regions. On one device my app behaves strange. Location permission was granted to be used Always, but Location Manager returns 0,0 as current coordinate and when I go to the Settings / Privacy / Location Services / App - neither Never or Always are selected.
This happens on iOS 11.0.2
I've set plist key (NSLocationAlwaysUsageDescription) and use only requestAlwaysAuthorization because it's required to region monitoring.
One important thing - Google Maps and Apple Maps use current location normally.
As Brad Jensen explains in the WWDC talk, Apple has decided that forcing the user to give the app “Always” location access is a bad user experience:
https://developer.apple.com/videos/play/wwdc2017/713/
So when you build your app using the iOS 11 SDK, you are now required to provide an NSLocationWhenInUseUsageDescription key in all cases (if you use location at all). For “Always” access, you can additionally provide a second key, which is now called NSLocationAlwaysAndWhenInUseUsageDescription.
My react-native app needs to create a calendar event, it doesn't need to view, edit or delete event. I tried to use few react-native libraries which handle calendar but I needed to grant permissions for a calendar in each of them.
I have no knowledge of Objective C or Swift, but I would like to know if it is even possible in either native or react-native way.
Every advice is very appreciated. Thanks!
Short answer is no.
You do need to be granted permission to create a calendar event.
The Human Interface Guidelines section about requesting permissions
Users must grant permission for an app to access personal information, including the current location, calendar, contact information, reminders, and photos. Although people appreciate the convenience of using an app that has access to this information, they also expect to have control over their private data. For example, people like being able to automatically tag photos with their physical location or find nearby friends, but they also want the option to disable such features.
In the apple docs it specifies that you need to add an entry to the info.plist. This text is used when the permission is requested.
Important: If your iOS app links on or after iOS 10.0 and you need to access Calendar data, be sure to include the NSCalendarsUsageDescription key in your Info.plist file.
Your app will crash without this key added to the info.plist.
This is the case for native apps, so the same will apply for react-native.
As the question asks.
I'm looking for a guide on permissions. I've only developed for Android before and I was wondering if there was a guide similar to http://developer.android.com/guide/topics/security/permissions.html
I'm not entirely sure how permissions work (or if they're even called this on iOS 6).
You don't have permissions the way you do on Android, as in you must declare them some where on for hand.
When you, for example, start the locationmanager, the system will ask the user if your app is allowed to receive location updates. If the user does not allow this the the CLLocationManager will call the delegate that it could not retrieve any location updates.
There is also a methods on CLLocationManager called authorizationStatus to check the current status. This is an CLAuthorizationStatus.
Every other component will have a simulare kind of methods and error to check wether the user allows your app to acces data.