问题
Does iOS (or iPhone OS) support file operations via SMB network shares? If so, are there any documents about how to do this?
回答1:
Don't have tested yet but this might help: http://38leinad.wordpress.com/2011/03/23/windows-filesharing-library-for-ios/
回答2:
I thought I made it work between macbook and my iPhone simulator however it never worked for folders shared on windows machine .. please refer to a separate question I have posted - Using NSNetService class to make an SMB tcp ip connection to a folder shared on windows machine - with steps I have taken ...
回答3:
Not sure about SMB, but I was able to read/write files on a jailbroken IPad using SFTP. OS versions 4.1, 4.2, 4.3.
On a side note, I think that the question needs a bit of clarification - what exactly are you trying to do, and whether you're working with a regular or a jailbroken device. Answers may vary greatly one knowing these things.
回答4:
You may also refer to my experience, I managed to implement a SMB client for iOS : SMB/samba support on iOS?
回答5:
I used libsmbclient from samba package for SMB operations on iOS. You can look on my project https://github.com/kolyvan/kxsmb (objective-c wrapper on libsmbclient). For now it supports a limited set of SMB operations. It mostly was designed for browsing local net and retrieving files from SMB shares.
回答6:
iOS does not have any APIs to work with SMB. However, SMB is currently documented by Microsoft and implementing it is not impossible (although not easy too). I've created a freeware project which contains most of what you need to handle SMB. See
https://sourceforge.net/projects/smb4ios/
It does not use Samba or any other heavy-weight libraries. Works mostly for printers, but with what's already there it's easy to add support for file handling or whatever.
I don't care about GPL stuff, you can just reuse the code without concerns for that. Just check if the NTLM library I used has the correct license for you (or implement your own NTLM).
来源:https://stackoverflow.com/questions/3660795/does-ios-support-file-operations-via-smb