Direct access to iPad Photo library - ipad

I understand that it's possible to access the iPad Photo library using the UIImagePickerController. The problem with this is that it makes it possible to access only one image at a time. I'm building an app that needs to be able to select multiple images from this library simultaneously (without loading them into memory) to save for further manipulation. This would require obtaining the file paths.
I've read that it's possible to access the Photos file system using the photolibrary.framework. This is a private API though, which would presumably disqualify the app from the App Store.
There are apps in the store that apparently have this capability though. Are they braking Apple's rules or have they found a "legal" way around them?
I've also heard that iOS 4.2 (coming this November) is supposed to make direct access straightforward.
Anyone know of a legal way to access the Photos file system using the current iPad OS?
Thanks,
Paul

There is no API currently available to support that functionality

Have a look at this project on github: https://github.com/elc/ELCImagePickerController
It generally is an ImagePicker that allows to select multiple images at once. Therefore, it needs to read the iOS Photo Library. So looking at the code you should be able to figure out how to do it.

Related

Sharing data between apps on iOS

I have several small apps that share common data (images, sounds files, etc). This data bloats the size of each app. When the user installs 2 or more of these apps that will bloat the device space with duplicate data. Is there a way that I can share this data between my apps so that each app doesn't duplicate this data within its bundle?
You can have a common file space between apps by using app groups. An example of how to use them can be found here: Sharing data in between apps in IOS
You can use this as part of a solve for not duplicating the data in every bundle. One way might be to have the data hosted on a server somewhere and when the app is installed you can check the App Group for the common data, if it is not there, you can download it and store it there. Then the next app that is installed will have the data already available. This should help avoid having to include it in every small app.
You can set up the code to check the shared location and download the data in a framework and share it between all your apps making it a bit easier to maintain. If you do not already have a content management system then you could google for a few that have iOS support. There are many out there. You would then host the shared data there. This would give you the ability to update the data for each app while they are in the field which could be a time saver. If these apps are very small though, this may be overkill.
No, this is not currently possible. Ideally, this kind of resource-sharing would require creating a common framework bundle that would have to
be submitted separately to the App Store as a third-party framework, so that even if only one of your apps is present on the
device, it would be able to load the appropriate resources and function properly.
Apple currently only allows third-party frameworks embedded within the app bundle.
Even if two of your apps use the same exact version of your framework, they have to embed it separately.

How to fetch a photo from Photos Library into Unity Game on an iOS device?

I have a Unity application for iOS and I need to fetch an image from the iPhones photos library and then use it within unity as a texture/2D sprite. I can not find any information on how it could be done.
Any help is much appreciated. :)
For something like this, I think that you are going to need a native plugin. You can either write it yourself (maybe the harder way) or try to find one from the asset store. I don't remember if this is the case anymore, but you may need to have paid for Unity to use / create plugins however.
If you want to try the native plugin route, which is actually a lot of fun in my experience, here is the start of the documentation for it.
https://docs.unity3d.com/Manual/NativePlugins.html
I would suspect that you would need to make APIs that are accessible to the Unity side of code that let you call into Objective-C which in turn would call the relevant bits of code at the platform level.
Check this out: http://answers.unity3d.com/questions/1143996/open-ios-media-browser-and-import-selected-image-a.html
And scroll all the way down
I believe it answers your question of accessing an image from the photo library. Good luck!

Sharing code between iOS apps and their watch apps

I have been trying to figure out the best way to structure my watch apps for the last couple of days, and haven't had a lot of success. Currently in my iPhone apps I have several libraries that I use for various standard things. This includes things like the base class of my data objects, helpers for converting them from JSON, and base classes for my services.
The problem that this causes for me is that I am unable to find a way to include these libraries in my watch extension, and this means that I can't even share any of the data objects from my main application because all of them rely on the library.
So, my question is, is there a way that I can share a library between my main app, and the watch app?

Share Files between Apps on the same iPad (Without iCloud)

I have two iPad apps, one which downloads data from a server and stores it on the iPad and another one (the main app) which uses the data later.
(It would make sense to combine the two but it's a client requirement)
But I see no way to share the data between the two apps.
I have heard there are ways to do it using:
Custom URL Schemes
Document Support on iPad Devices
UIPasteboard
But I cannot find any thing explaining how to use any of these effectively.
Can anyone point me in the right direction.
Just to clarify:
It is an iPad only app
Both apps will not run at the same time
Basically I need to access the documents or caches folder of one app from another
Using iCloud or any other third part service is not possible
It would be great if I could make the downloader app into a sort of configuration page for the main app (if it is even possible)
So keeping these in mind which one would be the most suitable?
This link at github may be useful... Looks like someone has already made a file manager, using these elements you may be able to do what you are looking for. But as far as I know, your app is extremely sandboxed and does not really interact with other apps/the file system very much at all (Apple is very limiting that way)
EDIT
this post seems to have the explanations of local data sharing methods you were looking for. None of the methods in this post requires any connectivity, just a device and 2 apps :) Good luck!

Ipad development architecture

I have a IPad noob question.
Here is the task I am trying to achieve:
I need to build an IPad/IPhone app that will display a lot of images and data. The problem is that this app needs to work offline as well as online. So, the data needs to stored in some way on the IPad.
I am looking for some opinions on techniques/architecture/development.
To provide a bit of background I work mainly in C#.NET and this is my first IPad app. So far I know that I can either create a native app using objective C, or go for an HTML app which later may or may not be converted to a native app.
Furthermore, I am currently testing by creating a simple html page with an image, and trying to cache the image and page so it will work offline. This so far, however is not working as the image or page do not seem to be cached.
EDIT: Does anyone know how much is the caching limit. I believe I have somewhere around 10-15 mbs of images.
I will appreciate any ideas/opinions/resources on this task.
use CoreData to store your images offline Apple CoreData Docs
I am unsure wot you need the online bit for, are you retrieving images off the net or uploading them?

Resources