a technical blog

Posts Tagged ‘cifs

Writing to a Windows File Share for iOS

with 3 comments

Just also added writing to the tango API as it is quiet analogeous to reading once you get what the different parameters mean… find it on github.

Please not that I am not keeping the Objective-C API up to date (was only for testing) as well as the Test-App. If you want to use tango in your app, please use the C-based API; a stable Objective-C API might come later, but is not available at present!

Written by 38leinad

March 23, 2011 at 6:11 pm

Posted in ios, library/framework, Uncategorized

Tagged with , , ,

Reading files from a Windows Share for iOS

leave a comment »

Used the last few evenings to finally get the reading of files on a Windows File Share running for iOS. It is part of my lightweight SMB library called tango and can be found on github. Feel free to use it in your own iOS projects.

As a side-node: The main API is C-based and the Objective-C API was only written in a hurry for testing. So, you might want to write your own Objective-C wrapper around the C-API to be on the save side… 🙂

Maybe I will use the next weekend to get also the writing of files running…

Written by 38leinad

March 23, 2011 at 6:11 pm

Posted in ios, library/framework, Uncategorized

Tagged with , , ,

Windows Filesharing Library for iOS

with 34 comments

It has been some time since my first post when I promised to myself to be more active in the iOS dev community. Well, the problem was a project that was not very fun…

For a private project I needed a simple iOS library to access a windows network share and download a file. No such free library seemed available and I did not want to dig into Samba and port it to iOS. So, I considered to write such a library myself. I was under the impression it could not be sohard to get the basic functionality I needed done.

Guess what: I was wrong! This protocol is a complete mess and over the years (new windows releases… new required features) turned into a badly documented monster (actually did not work very much time on the library, but whenever i resumed work, I got frustrated soon and called it a day). For details and if you want to get into it, here are my main resources:

I can’t possibly describe you what amazing work the SAMBA guys are doing… Only a quote from the above SMB protocol introduction might give you a feeling:

Remember earlier when we talked about SMB messages as if we were dissecting some strange, new species of multi-legged critter? Well, we’ve moved beyond Entomology, Invertebrate Zoology, Taxonomy, and such. We’re now studying really complex stuff like Sociology, Psychology, and Numismatics, and we get to put the little critters into Skinner boxes and see how they react to various stimuli. It’s important research, and there are all sorts of interesting things to discover.

Enough with that. At the moment the library is tested on iOS 4.2 and with a Windows XP share. It is able to connect to a protected share and list and browse files and directories. I don’t think I will have the power to maintain the library what is beyond my exact needs (I will have to add reading and writing of files as final features), but you are free to do what you like with it. As it its a quiet small library, it might help someone get started with the protocol.

You can find the librarie’s source over at github under the BSD license: tango

Below, two screenshots from the test-app:

Written by 38leinad

March 23, 2011 at 6:09 pm

Posted in ios, library/framework

Tagged with , , ,