WebDAV support in IOS - iphone

I need the following functionalities over HTTP.
Does WebDAV provides this functionality and are there any known gotchas?
I am planning to access WebDAV from an IPad/IPhone application. Are there any known limitation in accessing WebDAV in iOS?
READ
WRITE (Create directory, Create a file, Update existing file)
DELETE (File and Directory)
GET DIRECTORY LISTING

WebDAV has all those features. I don't know if there's specific iOS limitations, but there are other WebDAV apps, so I assume you can make it work :)

There's a few good options
Schimera Navigator is known to work,although i've heard of at least some users having problems logging in due to the case of their user name being changed by auto complete. The developer says a fix is coming for that
This video shows another approach - http://youtu.be/4ZYqLBEayrk?t=3m18s

Related

Sharing File Data Between Applications in Swift/iOS [duplicate]

This question already has an answer here:
Sharing data in between apps in IOS
(1 answer)
Closed 7 years ago.
I've been doing research on how to share data between applications securely. I'd like to get some info on the correct way to handle this before I do a deep dive on implementation using the wrong method. Just cause you can do something does not necessarily mean you should.
User Case: I am working on a suite of language learning apps that have a shared audio file base of several hundred audio files and json files containing important data corresponding to a language. I'd prefer to allow the user to not have to re-download the language bundle when they use another app in our suite.
1. App Extensions - Document Provider Non-UI Variant
According to the documentation:
The File Provider extension grants access to files outside the host app’s sandbox with the open and move actions. This extension (sometimes shortened here to file provider) also allows the host app to download files without presenting a document picker view controller. This feature lets the host app access previously opened documents using secure URL bookmarks, even if those files are no longer stored on the device.
On the surface this seems like a really solid solution. My main concern stems from the last couple lines where it state that the application can download the files no longer stored on the device. I want the files to be stored locally on the device to prevent constant downloading. If the Document Provider does store the files locally and allow the various applications in the group to access the files, then I think this could work.
2. Shared Keychain Access
Allows you to securely store data to a shared keychain that other applications that are part of a suite of applications can access. All applications that share keychain access must use the same app ID prefix. For an example of shared keychain access in action.
I've looked a little into the documentation of this one, and I think this might be the best fit. My major concern with this solution is whether or not there is a size limit to the data uploaded and if mp3/ogg/json file types are allowed. Most the examples/uses I have found with this solution point to sharing strings and small data, I am not sure if it will handle large data like json or audio files.
I also found this repo that apparently makes dealing with Keychain easier:
3. Custom Pasteboards
The custom pasteboard is best for the purpose of semi-privately sharing custom data between two applications. Custom pasteboards are identified using unique names. They can persist data beyond the application that creates them, allowing a pasteboard to hold onto data after the application is terminated or even after rebooting the device.
When writing or reading data to and from a pasteboard, you must specify a pasteboard type. Pasteboard types typically use a uniform type identifier (UTI) to identify the type of data going into and being retrieved from the pasteboard. See Apple’s UIPasteboard Class Reference documentation for additional information.
Above documentation pulled from this post
My main concern with this solution is that perhaps it is a bit of a hack. Logically a pasteboard seems like something that temporarily holds data and allows sharing between apps, whereas the solution I am looking for needs to be more of a permanent solution.
I'd appreciate any info on best practices towards sharing these types of files between apps. I assume there are plenty of other solutions I've omitted here, so if there is a better alternative I'd love some info on it. If it happens one of the listed solutions I have placed here is a good way to solve this problem I'd love to have some more info on your experience with working with them and if my concerns with them are valid, or nothing to worry about.
Thx in advance. As always, well written answers get up-votes ;)
I believe the best approach would be to enable data sharing by setting up an app group. This is Apple's recommended solution for sharing data between applications and extensions, and I believe for sharing data between apps in general.
See the section "Sharing Data with Your Containing App"
Also see "Adding an App to an App Group":

How to store data client side?

I'm working on a web app using eclipse and gwt. I need to store some data. If I was building this for android, I'd use an sqlite db. But I'm making this for a Chrome Packaged App, the data needs to be stored with the client and remain there. I can't think of what to search for, does anybody have an example or tutorial or guidance? thanks
If you are allowed to use HTML5, Local storage will suit you best.
More info here and here.
GWT actually already has this.
Check it out:
http://code.google.com/webtoolkit/doc/latest/DevGuideHtml5Storage.html
You have tagged this as HTML 5 so I suggest trying localStorage?
The Chrome browser supports sqlite as well; should work more or less straight out of the box (at least it does for my apps). At least on modern Chrome releases.
Because you're building a Chrome Packaged App, you can use any storage API supported by Chrome. That includes Web Storage and Web Database, as others have already said, but also (on recent versions of Chrome, so it depends on your schedule) File API and Indexed DB.
Everything you can do in JS, you can do it in GWT.
As others have said, GWT gives you built-in access to Web Storage. The gwt-mobile-webkit project brings you Web Database. If you prefer the File API or Indexed DB, then you can use JSNI to access them from your GWT code (unless someone else already wrote a wrapper library).
If you choose the Web Database (which is just SQLite accessible from JS), you might want to set the unlimitedStorage permission.

Updating iOS resource files remotely

I have an app on the App Store that needs to have its resource data files updated periodically (every 2-3 months). So far, I've just been deploying a new version of the app to the App Store every time I need to do this, but the fact that I have to wait a week or two for the changes to become live is cumbersome.
Theoretically, I was thinking of creating a new "version_control.txt" resource file which tracks the version numbers of every other resource file. Periodically, the app would check its version_control.txt against a version up on some web server, and then download any files that need to be updated.
Do there exist any frameworks or SDKs to handle all of this for me, or do I have to write everything myself? Is there a better solution?
You can't update the resources in your app bundle without updating the entire application. However, there's no problem with having your app retrieve resources from a web server and save them in your app's Documents folder. From there, it's simple to have the app look for its resources in the Documents folder before looking in its own bundle.
I don't know of any frameworks that manage resource versions for you. There's not a lot of work involved, and each app likely has its own requirements, so I'm not sure that a framework would help that much. If your web server supports it, you could request the resource file(s) each time your app runs, but add the if-modified-since header so that you only download a new copy if the version on the server is newer than the one your app already has.
I also had similar problems. I had tried to download some custom files from my ftp domain but that really didn't work very well. Not only I had to pay for the bandwidth, the users weren't very happy about it. The coding complicated considerably. Now, I've decided to update periodically via AppStore. The users are more satisfied since they see updates, but they don't understand is that only a couple of resources have been updated.
PS: I'm not aware of any SDK or framework for it. But you don't need it, you just need to download some files...

How do I sync an offline web app (HTML+JS+CSS) with my server?

Do I need to implement my own sync methods in order to make an offline web app (html+css+js) stay up to date with changes made on the server (and viceversa)? I'm using MySQL on the server side.
I read Two-way sync between iPhone application and web application with some pointers but I think they're talking about native applications when they mention CFUUIDCreate and I wander if this is possible for the Web.
Does someone have some code to share or maybe can point me in the right direction?
Thank you!
P.S.: I hope my english is not that rusty ;)
To store static contents on the client-side, as Jethro Larson said, the Application Cache Manifest is the way to go to cache the static contents of your website (HTML, CSS, JS and images).
To handle dynamically generated contents offline, you can use javascript templates. There are several solutions for this.
To sync the two databases, there is a project called persistence.js (persistencejs.org) which is a javascript library which offers a unique API to work with WebSQL databases, Local Storage, etc. They have a plugin for this library called persistence.sync (persistencejs.org/plugin/sync) which syncs the remote database with the server's one. It consists of POST and GET requests to a specific url that you can configure (for example yourapp.dev/sync). They have an example back-end written in node.js and here is one for Rails. It's simple to understand and persistence.sync is well documented.
Look at the offline cache:
http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/
http://www.google.com/search?q=offline+cache+html5
http://www.slideshare.net/search/slideshow?q=offline+cache

reading/writing files to Windows Azure storage using Objective C

Does anyone know of any good resources or tutorials on how to write files to Windows Azure and read the files using Objective C? (for an iPhone app)
Thanks!
While not an answer to your question, I will share that if you choose to implement your own Objective-C Azure client, beware that NSMutableURLRequest will attempt to be helpful and capitalize the names of any headers you add to the request, i.e: x-ms-date becomes X-Ms-Date. Azure will barf on this and return http code 403 (bad request), even though the HTTP RFC explicitly states that header names are to be treated as case-insensitive.
That's about where I gave up.
There is a project on codeproject that would likely answer your questions.
OneNote on iPhone and Palm Pré using Windows Azure
http://www.codeproject.com/KB/aspnet/rinocp.aspx
Is the user of the iPhone app also the owner of the storage account? If so, go for it (though sorry, I have no advice on how to do this in Objective C).
If not, consider the security model. If you're going to give users access to storage, you'll either need to use blobs with Shared Access Signatures (in which case this should be trivial... you don't need to mess with signing the requests), or you'll need to give users the key to your storage account, which is generally a bad idea. (This would allow them to read/write/delete anything they find there.)
You can now download the Windows Azure Toolkit for iOS. This will provide you with either direct access or proxy access to Windows Azure Storage (with the proxy running in a Role of your deployment).