login about faq


Can I use CkSshTunnel(cpp one) in my iOS project? I couldn't find an equivalent in objective-c header file.

Xcode reported many compilation error when i try to include it in my application delegate.

asked Nov 10 '12 at 19:50

sctse999's gravatar image


Here is the new C++ lib build for iOS that includes CkSshTunnel:



answered Nov 13 '12 at 17:06

chilkat's gravatar image

chilkat ♦♦

Hi Chilkat,

Thanks. I compiled successfully in Xcode using the new pre-release and the following reference examples.

  1. http://www.example-code.com/c/sshTunnel_database.asp
  2. http://www.example-code.com/vcpp/sshTunnel_database.asp

However, both return error when trying to execute CkSshTunnel_Create() or CkSshTunnel sshTunnel.

Detected an attempt to call a symbol in system libraries that is not present on the iPhone: (null) called from function _ZN14ChilkatCritSecC2Ev in image xyzproject. (lldb)

It seems that the API called by both function are not supported on iOS.


(Nov 14 '12 at 11:05) sctse999

I confirmed that it is missing. I will try to create a new build for iOS that also includes CkSshTunnel either today or tomorrow, and will post a comment here with the download link when it's ready.


answered Nov 12 '12 at 08:36

chilkat's gravatar image

chilkat ♦♦

I'm working on a Proof of Concept for an IPhone APP with SSH Tunnel and have the same problem. I made my first tests with the content of Chilkat-9.3.2-IOS-6.0.zip
But the content of your new build is total different and that confused me a lot. I think because it is for OS-X. Could you please provide SshTunnel.h also in the IOS version.


answered Nov 14 '12 at 04:48

broemme's gravatar image


Sorry -- my fault. I had uploaded the build OS-X instead of iOS. Here's the new build for iOS:



answered Nov 14 '12 at 12:20

chilkat's gravatar image

chilkat ♦♦


I test the version but have a similar problem. EXC_BAD_INSTRUCTION. The error occurs when I open the connection to the accepting port, that means the initialization of CkoSshTunnel makes no problem.

Any idea how to invastigate the problem?

(Nov 28 '12 at 07:07) broemme


I tested the iOS build but encounter arbitrary error from the debugger.(e.g. EXC_BAD_ACCESS).

This is my code to test the build, relatively simple and copy from C++ one. Any idea?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{ // Override point for customization after application launch.
CkoSshTunnel *sshTunnel = [[CkoSshTunnel alloc] init];

//  Any string automatically begins a fully-functional 30-day trial.
BOOL success;
success = [sshTunnel UnlockComponent: @"Anything for 30-day trial"];
if (success != YES) {
    NSLog(@"Unlock error");

//  The destination host/port is the database server.
//  The DestHostname may be the domain name or
//  IP address (in dotted decimal notation) of the database
//  server.
[sshTunnel setDestHostname:@"www.google.com"];
[sshTunnel setDestPort:[NSNumber numberWithInt: 80]];

//  Provide information about the location of the SSH server,
//  and the authentication to be used with it. This is the
//  login information for the SSH server (not the database server).
[sshTunnel setSshHostname:@"mysshserver"];
[sshTunnel setSshPort:[NSNumber numberWithInt: 22]];
[sshTunnel setSshLogin:@"username"];
[sshTunnel setSshPassword:@"password"];

//  Start accepting connections in a background thread.
//  The SSH tunnels are autonomously run in a background
//  thread.  There is one background thread for accepting
//  connections, and another for managing the tunnel pool.
success = [sshTunnel BeginAccepting:[NSNumber numberWithInt: 80]];
if (success != YES) {
    NSLog(@"Listen error");

return YES;



answered Nov 14 '12 at 18:38

sctse999's gravatar image


Hello, If you have problem with EXC_BAD_ACCESS. Then you have probably some issue with memory management. When you will call BeginAccepting. Then it will run a new thread. To confirm it, try to not use autorelease on sshTunnel. http://www.cknotes.com/?p=415

(Dec 26 '12 at 05:27) SkritekCZ
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 10 '12 at 19:50

Seen: 4,507 times

Last updated: Dec 26 '12 at 05:27

powered by OSQA