iphoneiosobjective-cxcodeazure-storage

How to use the blob storage service from ios?


In my application I need to use the Windows Azure services to store the data for that I am using this:http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-with-data-ios/ sdk for Windows azure integration from my app. Now I need to upload the images to Azure and for that I was using the same sdk...But later I found that the right place in Windows Azure to upload the larger images is to Blob Storage Client.

In .Net they have the different library and I found this link http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/ for uploading the images to blob storage.

But how can I do that with Objective C?

After some research I found this link http://www.deviantpoint.com/post/2012/02/18/Using-Azure-Storage-Services-from-an-iPhone-App-Part-1-Table-and-Blob-setup-Azure-iOS-toolkit-and-Model-Classes.aspx but its not clear about How to upload an image and getting the image url in response?


Solution

  • After a lots of R&D...I finally found the solution..

    Here is my sample project Blob Example written in Objective C

    & also tried with Swift & is working as expected. Here is my Swift Example Project.

    Just replace your account credentials with respective ones and you are good to go..!!

    Note: Try to use UIImageJPEGRepresentation instead of UIImagePNGRepresentation because png takes more size than jpg.