简体   繁体   English

iOS是否支持通过SMB进行文件操作?

[英]Does iOS support file operations via SMB?

Does iOS (or iPhone OS) support file operations via SMB network shares? iOS(或iPhone OS)是否支持通过SMB网络共享进行文件操作? If so, are there any documents about how to do this? 如果是的话,有没有关于如何做到这一点的文件?

尚未测试,但这可能会有所帮助:http: //38leinad.wordpress.com/2011/03/23/windows-filesharing-library-for-ios/

我以为我在macbook和我的iPhone模拟器之间工作但是它从不适用于在Windows机器上共享的文件夹..请参考我发布的单独问题 - 使用NSNetService类将SMB tcp ip连接到Windows上共享的文件夹机器 - 我采取的步骤......

Not sure about SMB, but I was able to read/write files on a jailbroken IPad using SFTP. 不确定SMB,但我能够使用SFTP在越狱的IPad上读/写文件。 OS versions 4.1, 4.2, 4.3. 操作系统版本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. 了解这些事情后,答案可能会有很大不同。

I used libsmbclient from samba package for SMB operations on iOS. 我使用samba包中的libsmbclient进行iOS上的SMB操作。 You can look on my project https://github.com/kolyvan/kxsmb (objective-c wrapper on libsmbclient). 您可以查看我的项目https://github.com/kolyvan/kxsmb(libsmbclient上的 objective-c包装器)。 For now it supports a limited set of SMB operations. 目前它支持一组有限的SMB操作。 It mostly was designed for browsing local net and retrieving files from SMB shares. 它主要用于浏览本地网络并从SMB共享中检索文件。

iOS does not have any APIs to work with SMB. iOS没有任何API可与SMB一起使用。 However, SMB is currently documented by Microsoft and implementing it is not impossible (although not easy too). 但是,SMB目前由Microsoft记录并实施它并非不可能(尽管也不容易)。 I've created a freeware project which contains most of what you need to handle SMB. 我创建了一个免费软件项目,其中包含处理SMB所需的大部分内容。 See 看到

https://sourceforge.net/projects/smb4ios/ https://sourceforge.net/projects/smb4ios/

It does not use Samba or any other heavy-weight libraries. 它不使用Samba或任何其他重量级的库。 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. 我不关心GPL的东西,你可以重用代码而不用担心。 Just check if the NTLM library I used has the correct license for you (or implement your own NTLM). 只需检查我使用的NTLM库是否具有正确的许可证(或实现您自己的NTLM)。

您也可以参考我的经验,我设法为iOS实现SMB客户端:iOS上的SMB / samba支持?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM