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 ap开发者_StackOverflowp)
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).
精彩评论