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

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!

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.

iOS - make changes to app without requiring update via app store?

This may seem like an odd question, but I'm in the middle of creating an iOS app, and was wondering if there is a way to, in the future, roll out changes to the app without requiring all of the users to download an update.
I've noticed that Snapchat can do this with their filters - new filters are added regularly, without me updating the app.
I've read into 'Cloud code', something Parse had that apparently let you accomplish this. Obviously that's no longer an option.
Also, do Apple even allow this? Seeing as they need to approve every app before letting it onto the App Store, it would seem like they would need to approve any changes first too.
I've thought of strange things like storing a function in a database, then getting the app to download that function and run it - naturally if I were to now change the function in the database, it would change on all users devices instantly. Just how ridiculous is that idea? Thanks!
Depends on how much flexibility you want.
For example, Spotify does this for UI mainly - backend-driven UI, as they call it. They send a kind of layout from the server and convert it to a real iOS layout, based of a predefined mapping. You can find pretty more details in the Spotify's presentation.
Slides: http://www.slideshare.net/JohnSundell/backenddriven-native-uis
Video (more details): http://www.downvids.net/backend-driven-native-uis-john-sundell-and-diego-cristina-ca--777281.html
So actions can also be divided in similar pieces and abstractions, received from the server and interpreted - sort of scripting is needed. You can't compile and run arbitrary functions on the fly.
Hope it'll give you some ideas you can think of.
See Apple's app store review guidelines: https://developer.apple.com/app-store/review/guidelines/ section 2.4.5 (iv). Apps are not supposed to download code or resources to add functionality or significantly change the app from what Apple sees during the review process. And executable memory isn't even writable by sandboxed apps, which makes downloading compiled functions fairly useless. But downloading Javascript that complies with the above guidelines seems to be allowed.

Understanding Newsstand App

I have a big question about how newsstand works.
When you have to create a new magazine(issue), how do you do it?
I mean, Do I have to implement new code for each magazine (with new views and new view controllers) which doesn't look the same as the others and has interactive content? In this case, how do I add/upload/integrate them to my newsstand app which is already in the market?
In the case that It doesn't work in this way, How does it work?
Thank you very much in advance.
Your question really goes to the heart of how Apple has chosen to implement Newsstand. Basically, there are three possibilities for using Newsstand: use image/pdf content, use HTML5 content, and use the CoreText native API.
I take it from what you are saying that you would like to use the CoreText API. This is difficult to do in the Newsstand framework for the reason you suggest: you really are not supposed to upload a whole new app with each edition.
There are two possible solutions. The first is simply not to use Newsstand. Instead you can publish your magazine as an app, and simply upload a new app for each edition. This means you miss out on things such as subscriptions and the "double-listing" promotion of Newsstand, but you can make high-quality, native, custom interfaces.
The second is to do what I am in the process of doing right now, which is to develop something like an XML encoding that when loaded into your base app will generate the kind of interface you want.
At least that is my analysis so far. I would be so pleased to be told I'm wrong, really. But I do think this is one of those cases where Apple hasn't really thought through what they are offering. Maybe next year it will get better!
If you use the Baker framework you can download the interface elements (html, images) as "issues" and the code part (Baker framework) will stay the same.
To add a new issue you do the same as you do with downloading the PDFs using NKAssetDownload. If you're using Baker you will want to extract the whole "book" into the documents directory.

How to write a software to sync files to ipad

I have this idea of writing an application to automatically sync files to a specific place for an ipad every time the ipad is plugged in the computer.
The problem is I've never developed a software like this before. Right now I have these two big questions:
- How to detect when an ipad is plugged in the computer?
- How to connect to and copy files over the ipad?
To make things clear, the application I want to develop should have similar functions like iTools (not iTunes).
Does anyone here have experiences in developing this kind of application? Would you please share with me how to start with this project, because I'm clueless :(
There is a rather simple option; use a internet based service to accomplish this task - just as DropBox, iCloud and similar services do it already. Maybe you can get a lot closer to your goals by simply connecting to the API of DropBox, SugarSync or alike.
Using a direct (USB-) connection to the device will be rather tough to implement and, to my knowledge, will prevent you from selling the resulting software through Apple's channels. I am not saying that it was impossible (see iExplorer) but I am saying that such endeavor will involve a lot of reverse engineering of undocumented functions to a degree that might be considered illegal in certain countries. Additionally, maintaining such software will be very demanding as Apple frequently introduces changes within their communication protocol/s.

How do I securely download configuration files onto iPad?

We are writing a corporate app which will run on a small number of in-house iPads. There will be a need to provide a number of (structurally identical) 'setups' on each iPad, and those setups will contain confidential data. My question is, what's the best way of getting those setups securely onto a device (into the app's private storage).
So far we've considered:
Download from web. This is problematical because we'd have to do quite a lot of work to make this secure.
QR codes. Render the setup as a QR code. We can generate and scan QR codes which represent the setups (they are quite small), but it looks like the available QR code APIs are either quite expensive or a little complex.
iTunes downloads. This is being looked at but I'm not sure what the security implications are.
Have we missed something simpler?
Edit: Just to clarify, a setup takes the form of a small file. It could be XML or JSON or even plain text: it just needs to encode about ten variable names and their values.
It's not clear what you mean by "iTunes downloads". If this isn't referring to iTunes File Sharing, then you should look into that. The user can add files onto the device for particular apps through iTunes.
It's also not clear what you mean by "secure" - this has very different meanings to different people. Sticking an SSL cert onto a server and providing HTTP auth is simple enough. What kind of security beyond that are you looking for?
If QR codes are acceptable, I suggest you look at zxing library. The code contains an iOS example project that you could base your implementation on.
There are some useful web resources to help with implementation: http://yannickloriot.com/2011/04/how-to-install-zxing-in-xcode-4/

Resources