ALAssetsLibrary and Location Services in iOS 6 - iphone

I'm in the process of upgrading one of my apps to support iOS6 and iPhone5. In the previous version, I had to prompt the user to enable Location Services in order to display photos using the ALAssetsLibrary. I've noticed that in iOS 6, I can disable location services and it still displays all images correctly. Is this something that has changed in iOS6. The documentation states that you still need Location Services enabled but the documentation also states that it's for iOS4 and above. I can't find any mention regarding iOS6 specifically.

The change is (more or less) documented in the iOS SDK Release Notes for iOS 6:
In iOS 6, there are improved privacy controls for Calendar, Reminders,
Contacts, and Photos. Users will see access dialogs when an app tries
to access any of those data types. The user can switch access on and
off in Settings > Privacy.
Also, the ALAssetsLibrary has a new method authorizationStatus, which is available since iOS 6.
In iOS 5, there was no privacy setting for Photos, and the user had to allow access to Location Services because a photo might contain location data. This was (I think) annoying and confusing, and I am glad that it is fixed in iOS 6.

Related

If I use UIWebview in my app, will app store reject it since it has been officially deprecated?

I made an AR app which embedded the UIWebView to display web content on an SCNPlane. I can not use the WKWebView because it does not work well with AR. On the contrary, UIWebView works nice.
If I upload my app into the app store, will my app get rejected?
Also, I notice that on the UIWebView's official document page, there is an certain alert says "An iOS app linked on or after iOS 10.0 must include in its Info.plist file the usage description keys for the types of data it needs to access or it will crash." Do i need to add certain specific description key for the UIWebView?
Thanks in advance!
No. Deprecated doesn't mean unavailable or disallowed; otherwise those methods would simply be removed from the API.Deprecation is a way of letting you know that you should start transitioning your existing codebase.
Deprecated methods may be more primitive and dangerous than newer versions, may not take into account all current OS features.

Restrict my iOS device to a particular app

I'm searching a way to restrict my iOS device to a particular app.
I have found a good way to disable my iPad Home button functionality through Kiosk Mode for iOS
So is it possible to restrict my iOS device to a particular app without jail-breaking?
Will App-Store reject my application if I done this?
Phew... Finally I found.Guided Access is a new feature in iOS 6 that will do the functionality .It's a built-in feature.
Guided Access is activated for a particular app, iOS device will automatically launch that app every time.
You can power off the device by holding down the "Power + Home" button.
If you’d like to learn how to use Guided Access in iOS 6, You can see more details here
That is a huge security violation as far as the App Store would be concerned. For an enterprise applications its possible you could find a way. But for a public App Store download this is not only next to impossible its also a guaranteed rejection.
So is it possible automatically launch my app every time after iPad booted without jail-breaking?
No. Jailbreaking only will allow you to mess with the default behavior of the system such as Launch Items
Will Apple-Store reject my application if I implement the behavior?
If you somehow find a way to circumvent the issue, (i.e. exploit a security breach) then your app will be rejected.
App review guidelines, section 2.4, 2.5

How to lock down user to Single App mode in iOS 6, Programmatically?

There are some question which are related to this,. but getting the exact answer:
Lock-down iPhone/iPod/iPad so it can only run one app
Recently iOS 6 is introduced with some business oriented features, two of theme are:
Guide Access
Supervised Access
These both deals with Accessibility Control features, Like allow user to restrict access to there device, only if they have full access to the device. In that way this is only useful to people, who owned the device like, a school use there device for exam, a restaurant for menus, for product display etc. All of them have access to the device to configure settings etc.
Now my question begins here, I am thinking of an App, which look down user to single app mode when user run the app and after signing out of the app the device start working as before in normal mode.
Through the time when app is active, user should not able to access any other function or button, this applies on all three device iPad, iPhone, iPod.
Also I found that this could be done by installing some Profiles etc, which looks wired and we can't ask user to do so.
So the simple idea is user will only install the App, as normally he does and we could lock him down to single app mode when he log into the app.
The SureLock iOS app does nothing but inform the user how to do it in your system preferences.
Doing it from the app itself is only possible, if you break the rules about private frameworks. And break it hard.
I am sorry to tell you that the way you present your idea, would never be approved for the AppStore.
The accepted answer to this question is no longer correct:
Starting with iOS 7, UIKit exposes the function UIAccessibilityRequestGuidedAccessSession as public API.
I don’t know, but can very well imagine that this function existed as private API dating back to iOS 6, where the guided access feature was introduced.
Note that for this method to have any effect, the device in question must be supervised using MDM, and the ID of the app you want to use this API must be included in the device management profile deployed to it.
Hi may be I am late but I have a good news for you.
Apple provide a new feature in IOS 7 and we can lock the user to single mode without user permission(Lock and unlock mode) here is the apple documentation link
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIAccessibilityRequestGuidedAccessSession
the other way is to install the profile config profile like is
http://ipadhire.co.nz/lockdown.mobileconfig
it lock the home button of IPhone and enable single mode
For this you have to do following..
access apple's private api's
access apple's private framework
Apple don't encourage accessing there private api's specially when it comes for App Store, if you accessed the private api's at the time of application review on App Store they will reject the app giving you a message of "accessing a private api".

Can I pick which meta data to use from photos to be able to use ALAssetsLibrary with location services off?

I found that using ALAssetsLibrary gives an error when location services are disabled or not granted to my app.
I am using enumerateGroupsWithTypes:usingBlock:failureBlock: and the documentation says:
Special Considerations
This method will fail with error ALAssetsLibraryAccessGloballyDeniedError if the user has not enabled Location Services (in Settings > General).
Is it possible to fine grain which meta data I am going to use from the photos, so I can still get them from the library? I actually don't need the location where the photo was taken.
No it's not possible (yet? it's not possible in iOS 5.1)
The only way to access photos in the library without having the location warning is to present a UIImagePickerController, but obviously that doesn't help much for most projects where you need to display a custom gallery, or access more than one picture at a time.
We have found that there is not location permission request in iOS 6. Maybe iOS 6 has other privacy control on Photos. So you don't need to asking location permission. Our solution is to check the [[UIDevice currentDevice]systemVersion] and only using ALAssetsLibrary when iOS >= 6.

Using the iPhone SDK, can I programmatically get a list of the applications/games on a users iPhone/iPod touch?

I would like to be able to pull the list of apps and games the user has and present it to them, or launch one of them. I'm guessing that Apple doesn't provide this capability in the iphone sdk. Still, I'd like to know how to do it and still be eligible for the app store.
You are correct Apple does not provide this in the iPhone SDK, therefore you cannot do this and get your app into the app store.
If the application has a published URL spec (i.e. Google Maps, Mail, ...) then you can launch the applicaiton via the URL launching spec.
But if the given game / application doesn't support the URL launching spec, then you have no way to launch it from your application. I also believe you cannot determine if an app is installed via the URL spec, only launch the application.
Check out the "URL types" reference for Info.PLIST.