views:

273

answers:

3

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!

+1  A: 

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.

Eric
A: 

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

mike
-1: that link is to an article for a web application that would be viewable on Safari on an iPhone. It isn't Objective C, which is what this question is asking for.
Dennis Palmer
A: 

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.)

smarx
Steve, would the OData library for Objective C at least be a good place to start for reading from Azure?
Dennis Palmer
If using table storage, yes, I would imagine so. (But only if that library allows the appropriate hooks to add the right auth header before the request goes out.)
smarx
You could, however, create an Azure-hosted service that accepts the data and stores it in Azure storage on the backend. That would separate the storage key concern from the iPhone app. You would then write a typical Objective C method to access a restful service and let Azure's inner workings be obscured.
tobint