SFTP libraries for iPhone? - iphone

Are there any good SFTP libraries other than libssh2?? I'm especially looking for a library that is very easy to integrate and manage! As libssh2 is completely written in C, I find adding extensions to the existing code base rather difficult!
Thanks!!

There are some Objective-C wrappers for libssh2 on GitHub:
NMSSH by Lejdborg (personally, this is my favourite. Super easy to use and well documented)
libssh2_sftp-Cocoa-wrapper by karelia
DLSFTPClient - by Leehro
And some more... These are the most popular ones.

If you are developing using Swift, below wrapper libraries can be used.
SwiftSH - A Swift SSH framework that wraps libssh2.

Related

Use a C++ library in swift package manager

I want to use two frameworks (fat) and one C++ library in my swift package manager project. I know it's possible to convert those frameworks to XCframework that SPM can use that, but not sure that converting process works with all frameworks?
My main question is, there is a c++ library in the package as well, its description is:
libsioclient_tls.a - this library includes the Socket.IO C++ client with TLS features.
Is it possible to add this on swift package manager, and if yes, could you please guide me?
Thank you so much

Can I create VS Code extensions in Python/C++?

I am totally new to creating extensions in VS Code, and all the official examples of extensions are written in Typescript/Javascript, which I have no experience with. Is it possible to create VS Code extensions in other languages, such as Python or C++?
If so, could anyone point me to any resources to get me started?
It is possible by creating a C++ module for Node.js, which can then be loaded like any other node module. Of course, some glue code written in JS or TS is necessary to register the extension and translate calls to/from vscode.
I've gone this way in my ANTLR4 extension, but gave up eventually, because of the troubles I had due to incompatible dependencies (you have to make sure the extension uses the exact same V8 version, which was used to build the underlying Node.js used by vscode, on all supported platforms).
This situation might have change, I don't know, but with that in the background I don't recommend it.
If you want to add support for a new language in vscode you can also write a separate language server, as is mentioned in the linked SO answer. For other type of work, I'm afraid, you have no alternative to use.
No, as #rioV8 said, since VSCode is an electron app and runs on Javascript.

Can protobuf-csharp-port work on webplayer?

We can't call any dll on webplayer, but protobuf-csharp-port uses dll extensions, so seems that it doesn't work on webplayer. Anyone who can solve this problem?
In fact, you can use dlls in the webplayer as long as they contain pure managed c# code. You can't use native dlls written in c++ for example.
These dlls shouldn't use any kind of reflection as it is an excluded sub-assembly in unity webplayer.
I don't know if protobuf-csharp-port matches these constraints but if you are looking for a nice protocol buffer implementation, you can have a look at protobuf-net which is a very nice one, written in pure c#. There is a specific unity-compatible build in the distribution. You can even compile your protobuf serializers in a custom dll so no reflection is used to be webplayer compliant.

Compile C library as iPhone framework?

Each C/C++ library has some amount of headers that should be used with that library. And if you're use more than 1-2 libraries, custom header paths is kind of headache.
So I thought: is there a way to compile C libraries as frameworks. Static library + headers + versioning.
I found in XCode template for Cocoa framework but nothing about iPhone framework building. This simple step could allow developers to build and share between each other frameworks with some interesting code.
Also it would be great to use libpng, libjpeg and other libraries packaged as frameworks.
I won't use dynamic libraries in those frameworks. Only static version will be present.
I combined techniques I found here and here into my open source library here (NOTE - I have since removed the relevant scripts from this project. I have updated the link to point to the last revision that included these techniques.). Think that's basically the solution you're looking for.
Basically, it has a target that will build a fat static library (lipo builds for arm6, arm7 and i386). It has another target that takes that library and builds it into a framework.
There's no reason you can't use the same techniques for a C project. In fact I've started work on porting C the VTD XML parser to an Objective C framework using the same techniques.
Frameworks are basically just bundles of dynamic/shared libraries. Since this is not allowed in the App Store, you have to build static libraries and link them with your App's executable at compile time.
However, to ease the pain a little, you can have a Xcode project for each library and compile each library into a static lib. Another way would be to put all required source files into the main Xcode project and configure it appropriately so it all builds at once (I did this with small libraries like Minizip, for instance).
Hope that helps.
the problem you are trying to make already exists - it's called DLL hell
Best way is to stick with plain old static libraries when making small apps and organizing source/headers structure

Which programming languages should one know to modify source code of SCRATCH

I intend to build a custom version of SCRATCH. I am a web-developer and hence not familiar with technologies that could have used to build scratch.
I see quite a lot technologies used in there such as Java Applets, C, SmallTalk and so on.
Can someone tell me the basic skill-set that's required to modify SCRATCH fro my purpose?
You should get the source code for Scratch: http://info.scratch.mit.edu/Source_Code
Squeak is not a programming language. Looks like I need to know SmallTalk if I want to make changes and for more drastic changes I need to write C code.
Scratch is written in squeak, which is a java implementation of smalltalk.
for 1.4, use squeak. for 2.0, use actionscript.
if you want to mod 2.0, read http://scratch.mit.edu/discuss/topic/38970/