├── libssh2-for-iOS ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Icon-29.png │ │ ├── Icon-57.png │ │ ├── Icon-29@2x.png │ │ ├── Icon-29@3x.png │ │ ├── Icon-40@2x.png │ │ ├── Icon-40@3x.png │ │ ├── Icon-57@2x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── libssh2-for-iOS-Bridging-Header.h ├── libssh2_for_iOS_Prefix.pch ├── SSHWrapper.h ├── libssh2_for_iOS-Info.plist ├── AppDelegate.swift ├── ViewController.swift ├── Launch Screen.storyboard ├── SSHWrapper.m └── ViewController.xib ├── .gitmodules ├── .gitignore ├── libssh2-for-iOS.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcshareddata │ └── xcschemes │ │ └── libssh2-for-iOS.xcscheme └── project.pbxproj ├── .travis.yml └── README.md /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-57.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x2on/libssh2-for-iOS/HEAD/libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | 4 | ], 5 | "info" : { 6 | "version" : 1, 7 | "author" : "xcode" 8 | } 9 | } -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "openssl"] 2 | path = openssl 3 | url = https://github.com/x2on/OpenSSL-for-iPhone.git 4 | [submodule "libgcrypt-for-ios"] 5 | path = libgcrypt-for-ios 6 | url = https://github.com/x2on/libgcrypt-for-ios.git 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | src 3 | *.gz 4 | libssh2-for-iOS.xcodeproj/project.xcworkspace/xcuserdata 5 | libssh2-for-iOS.xcodeproj/xcuserdata 6 | lib 7 | *.xccheckout 8 | openssl.framework 9 | include/ 10 | gcrypt.framework 11 | *.xcscmblueprint 12 | -------------------------------------------------------------------------------- /libssh2-for-iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libssh2-for-iOS/libssh2-for-iOS-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | #import "libssh2.h" 7 | #import "gcrypt.h" 8 | #import "SSHWrapper.h" -------------------------------------------------------------------------------- /libssh2-for-iOS/libssh2_for_iOS_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'libssh2-for-iOS' target in the 'libssh2-for-iOS' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode7.1 2 | language: objective-c 3 | 4 | before_install: 5 | - ./build-all.sh libgcrypt 6 | - xcrun -sdk iphoneos lipo -info ./lib/*.a 7 | - ./build-all.sh openssl verbose 8 | - xcrun -sdk iphoneos lipo -info ./lib/*.a 9 | 10 | script: 11 | - xctool -project libssh2-for-iOS.xcodeproj -scheme libssh2-for-iOS -sdk iphonesimulator clean build 12 | -------------------------------------------------------------------------------- /libssh2-for-iOS/SSHWrapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // SSHWrapper.h 3 | // libssh2-for-iOS 4 | // 5 | // Created by Felix Schulze on 01.02.11. 6 | // Copyright 2010 Felix Schulze. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | 20 | #import 21 | 22 | 23 | @interface SSHWrapper : NSObject { 24 | 25 | } 26 | 27 | - (void)connectToHost:(NSString *)host port:(int)port user:(NSString *)user password:(NSString *)password error:(NSError **)error; 28 | - (void)closeConnection; 29 | - (NSString *)executeCommand:(NSString *)command error:(NSError **)error; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /libssh2-for-iOS/libssh2_for_iOS-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIcons~ipad 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIApplicationExitsOnSuspend 28 | 29 | UILaunchStoryboardName 30 | Launch Screen 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /libssh2-for-iOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // libssh2-for-iOS 4 | // 5 | // Created by Felix Schulze on 01.02.11. 6 | // Copyright 2010-2015 Felix Schulze. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | 20 | import UIKit 21 | 22 | @UIApplicationMain 23 | class AppDelegate: UIResponder, UIApplicationDelegate { 24 | 25 | var window: UIWindow? 26 | 27 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 28 | 29 | self.window = UIWindow(frame: UIScreen.mainScreen().bounds) 30 | 31 | let navigationController = UINavigationController(rootViewController: ViewController()) 32 | navigationController.navigationBar.translucent = false 33 | self.window?.rootViewController = navigationController 34 | 35 | self.window?.makeKeyAndVisible() 36 | return true 37 | } 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /libssh2-for-iOS/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-60@3x.png", 55 | "scale" : "3x" 56 | } 57 | ], 58 | "info" : { 59 | "version" : 1, 60 | "author" : "xcode" 61 | }, 62 | "properties" : { 63 | "pre-rendered" : true 64 | } 65 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # libssh2-for-iOS [![Build Status](https://travis-ci.org/x2on/libssh2-for-iOS.png)](https://travis-ci.org/x2on/libssh2-for-iOS) 2 | 3 | This is a tutorial for using self-compiled builds of the libssh2-library for iOS. You can build apps with XCode and the official SDK from Apple with this. I also made a small example-app for using the libraries with XCode and the iPhone/iPhone-Simulator. 4 | 5 | @see: http://www.x2on.de/2011/02/02/libssh2-for-ios-iphone-and-ipad-example-app-with-ssh-connection/ 6 | 7 | The example uses libssh2 to make an ssh connection to an ssh server. Then you can execute commands on the server and get the output in your app. 8 | 9 | You can build the libssh2 library with openssl or with libgcrypt! 10 | 11 | ## Requirements: 12 | - Xcode 7.1 13 | - Xcode Command Line Tools 14 | 15 | ## Readme 16 | ### Checkout the submodules: 17 | ```bash 18 | git submodule init 19 | git submodule update 20 | ``` 21 | ### libssh2 with openssl: 22 | ```bash 23 | ./build-all.sh openssl 24 | ``` 25 | ### libssh2 with libgcrypt: 26 | ```bash 27 | ./build-all.sh libgcrypt 28 | ``` 29 | ### Solve problems: 30 | Check the log files in the ```bin``` folder 31 | ## Changelog: 32 | 33 | * 2015-12-11: OpenSSL 1.0.2e 34 | * 2015-01-11: Support for Xcode 7 and iOS 9.1, OpenSSL 1.0.2d 35 | * 2015-01-11: OpenSSL 1.0.1k 36 | * 2015-01-06: Support for Xcode 6 and iOS 8.1, OpenSSL 1.0.1j 37 | * 2014-03-25: Support for Xcode 5.1 and iOS 7.1 38 | * 2013-09-26: Support for Xcode 5 and iOS 7 39 | * 2013-03-03: Move OpenSSL to submodule 40 | * 2013-03-02: OpenSSL 1.0.1e 41 | * 2013-01-01: libssh 1.4.3 42 | * 2012-05-29: OpenSSL 1.0.1c + libssh 1.4.2 43 | * 2011-02-08: OpenSSL 1.0.0d 44 | -------------------------------------------------------------------------------- /libssh2-for-iOS/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // libssh2-for-iOS 4 | // 5 | // Created by Felix Schulze on 01.02.11. 6 | // Copyright 2010-2015 Felix Schulze. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | 20 | import UIKit 21 | 22 | class ViewController: UIViewController { 23 | 24 | @IBOutlet var textField: UITextField! 25 | @IBOutlet var ipField: UITextField! 26 | @IBOutlet var userField: UITextField! 27 | @IBOutlet var passwordField: UITextField! 28 | @IBOutlet var textView: UITextView! 29 | 30 | 31 | @IBAction 32 | func showInfo() { 33 | let message = "libssh2-Version: \(LIBSSH2_VERSION)\nlibgcrypt-Version: \(GCRYPT_VERSION)\nlibgpg-error-Version: 1.12\nopenssl-Version:\(OPENSSL_VERSION_TEXT)\nLicense: See include/LICENSE\n\nCopyright 2010-2015 by Felix Schulze\n http://www.felixschulze.de" 34 | let alertController = UIAlertController(title: "libssh2-for-iOS", message: message, preferredStyle: .Alert) 35 | alertController.addAction(UIAlertAction(title: "Ok", style: .Cancel, handler: nil)) 36 | self.presentViewController(alertController, animated: true, completion: nil) 37 | } 38 | 39 | @IBAction 40 | func executeCommaned() { 41 | 42 | let sshWrapper = SSHWrapper() 43 | var error: NSError? 44 | 45 | sshWrapper.connectToHost(ipField.text, port: 22, user: userField.text, password: passwordField.text, error: &error) 46 | 47 | if error != nil { 48 | let alertController = UIAlertController(title: "Error", message: error!.localizedDescription, preferredStyle: .Alert) 49 | alertController.addAction(UIAlertAction(title: "Ok", style: .Cancel, handler: nil)) 50 | self.presentViewController(alertController, animated: true, completion: nil) 51 | } 52 | else { 53 | var result: String? 54 | 55 | do { 56 | result = try sshWrapper.executeCommand(textField.text) 57 | } 58 | catch { 59 | result = "Error" 60 | } 61 | textField.text = result 62 | } 63 | textField.resignFirstResponder() 64 | ipField.resignFirstResponder() 65 | userField.resignFirstResponder() 66 | passwordField.resignFirstResponder() 67 | } 68 | 69 | override func viewDidLoad() { 70 | super.viewDidLoad() 71 | 72 | self.title = "libssh2-for-iOS" 73 | let infoButton = UIButton(type: .InfoLight) 74 | infoButton.addTarget(self, action: "showInfo", forControlEvents: .TouchDown) 75 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: infoButton) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /libssh2-for-iOS/Launch Screen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /libssh2-for-iOS.xcodeproj/xcshareddata/xcschemes/libssh2-for-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /libssh2-for-iOS/SSHWrapper.m: -------------------------------------------------------------------------------- 1 | // 2 | // SSHWrapper.m 3 | // libssh2-for-iOS 4 | // 5 | // Created by Felix Schulze on 01.02.11. 6 | // Copyright 2010 Felix Schulze. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // @see: http://www.libssh2.org/examples/ssh2_exec.html 21 | 22 | #import "SSHWrapper.h" 23 | 24 | #include "libssh2.h" 25 | #include "libssh2_sftp.h" 26 | #include 27 | #include 28 | 29 | 30 | 31 | 32 | static int waitsocket(int socket_fd, LIBSSH2_SESSION *session) 33 | { 34 | struct timeval timeout; 35 | int rc; 36 | fd_set fd; 37 | fd_set *writefd = NULL; 38 | fd_set *readfd = NULL; 39 | int dir; 40 | 41 | timeout.tv_sec = 10; 42 | timeout.tv_usec = 0; 43 | 44 | FD_ZERO(&fd); 45 | 46 | FD_SET(socket_fd, &fd); 47 | 48 | /* now make sure we wait in the correct direction */ 49 | dir = libssh2_session_block_directions(session); 50 | 51 | if(dir & LIBSSH2_SESSION_BLOCK_INBOUND) 52 | readfd = &fd; 53 | 54 | if(dir & LIBSSH2_SESSION_BLOCK_OUTBOUND) 55 | writefd = &fd; 56 | 57 | rc = select(socket_fd + 1, readfd, writefd, NULL, &timeout); 58 | 59 | return rc; 60 | } 61 | 62 | @implementation SSHWrapper { 63 | int sock; 64 | LIBSSH2_SESSION *session; 65 | LIBSSH2_CHANNEL *channel; 66 | int rc; 67 | } 68 | 69 | - (void)dealloc { 70 | [self closeConnection]; 71 | session = nil; 72 | channel = nil; 73 | } 74 | 75 | 76 | - (void)connectToHost:(NSString *)host port:(int)port user:(NSString *)user password:(NSString *)password error:(NSError **)error { 77 | if (host.length == 0) { 78 | *error = [NSError errorWithDomain:@"de.felixschulze.sshwrapper" code:300 userInfo:@{NSLocalizedDescriptionKey:@"No host"}]; 79 | return; 80 | } 81 | const char* hostChar = [host cStringUsingEncoding:NSUTF8StringEncoding]; 82 | const char* userChar = [user cStringUsingEncoding:NSUTF8StringEncoding]; 83 | const char* passwordChar = [password cStringUsingEncoding:NSUTF8StringEncoding]; 84 | struct sockaddr_in sock_serv_addr; 85 | unsigned long hostaddr = inet_addr(hostChar); 86 | 87 | sock = socket(AF_INET, SOCK_STREAM, 0); 88 | sock_serv_addr.sin_family = AF_INET; 89 | sock_serv_addr.sin_port = htons(port); 90 | sock_serv_addr.sin_addr.s_addr = hostaddr; 91 | if (connect(sock, (struct sockaddr *) (&sock_serv_addr), sizeof(sock_serv_addr)) != 0) { 92 | *error = [NSError errorWithDomain:@"de.felixschulze.sshwrapper" code:400 userInfo:@{NSLocalizedDescriptionKey:@"Failed to connect"}]; 93 | return; 94 | } 95 | 96 | /* Create a session instance */ 97 | session = libssh2_session_init(); 98 | if (!session) { 99 | *error = [NSError errorWithDomain:@"de.felixschulze.sshwrapper" code:401 userInfo:@{NSLocalizedDescriptionKey : @"Create session failed"}]; 100 | return; 101 | } 102 | 103 | /* tell libssh2 we want it all done non-blocking */ 104 | libssh2_session_set_blocking(session, 0); 105 | 106 | /* ... start it up. This will trade welcome banners, exchange keys, 107 | * and setup crypto, compression, and MAC layers 108 | */ 109 | while ((rc = libssh2_session_startup(session, sock)) == 110 | LIBSSH2_ERROR_EAGAIN); 111 | if (rc) { 112 | *error = [NSError errorWithDomain:@"de.felixschulze.sshwrapper" code:402 userInfo:@{NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Failure establishing SSH session: %d", rc]}]; 113 | return; 114 | } 115 | 116 | if ( strlen(passwordChar) != 0 ) { 117 | /* We could authenticate via password */ 118 | while ((rc = libssh2_userauth_password(session, userChar, passwordChar)) == LIBSSH2_ERROR_EAGAIN); 119 | if (rc) { 120 | *error = [NSError errorWithDomain:@"de.felixschulze.sshwrapper" code:403 userInfo:@{NSLocalizedDescriptionKey : @"Authentication by password failed."}]; 121 | return; 122 | } 123 | } 124 | } 125 | 126 | - (NSString *)executeCommand:(NSString *)command error:(NSError **)error { 127 | const char* commandChar = [command cStringUsingEncoding:NSUTF8StringEncoding]; 128 | 129 | NSString *result = nil; 130 | 131 | /* Exec non-blocking on the remove host */ 132 | while( (channel = libssh2_channel_open_session(session)) == NULL && 133 | libssh2_session_last_error(session,NULL,NULL,0) == LIBSSH2_ERROR_EAGAIN ) 134 | { 135 | waitsocket(sock, session); 136 | } 137 | if( channel == NULL ) 138 | { 139 | *error = [NSError errorWithDomain:@"de.felixschulze.sshwrapper" code:501 userInfo:@{NSLocalizedDescriptionKey : @"No channel found."}]; 140 | return nil; 141 | } 142 | while( (rc = libssh2_channel_exec(channel, commandChar)) == LIBSSH2_ERROR_EAGAIN ) 143 | { 144 | waitsocket(sock, session); 145 | } 146 | if( rc != 0 ) 147 | { 148 | *error = [NSError errorWithDomain:@"de.felixschulze.sshwrapper" code:502 userInfo:@{NSLocalizedDescriptionKey : @"Error while exec command."}]; 149 | return nil; 150 | } 151 | for( ;; ) 152 | { 153 | /* loop until we block */ 154 | int rc1; 155 | do 156 | { 157 | char buffer[0x2000]; 158 | rc1 = libssh2_channel_read( channel, buffer, sizeof(buffer) ); 159 | if( rc1 > 0 ) 160 | { 161 | result = @(buffer); 162 | } 163 | } 164 | while( rc1 > 0 ); 165 | 166 | /* this is due to blocking that would occur otherwise so we loop on 167 | this condition */ 168 | if( rc1 == LIBSSH2_ERROR_EAGAIN ) 169 | { 170 | waitsocket(sock, session); 171 | } 172 | else 173 | break; 174 | } 175 | while( (rc = libssh2_channel_close(channel)) == LIBSSH2_ERROR_EAGAIN ) 176 | waitsocket(sock, session); 177 | 178 | libssh2_channel_free(channel); 179 | channel = NULL; 180 | 181 | return result; 182 | 183 | } 184 | 185 | 186 | - (void)closeConnection { 187 | if (session) { 188 | libssh2_session_disconnect(session, "Normal Shutdown, Thank you for playing"); 189 | libssh2_session_free(session); 190 | session = nil; 191 | } 192 | close(sock); 193 | } 194 | 195 | @end 196 | -------------------------------------------------------------------------------- /libssh2-for-iOS/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 43 | 55 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /libssh2-for-iOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 11 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 12 | 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; 13 | 2AB446ED12F8A588006B0090 /* libssh2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AB446E812F8A588006B0090 /* libssh2.a */; }; 14 | 53E9E45A16F4D4F300347B0F /* SSHWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 53E9E45916F4D4F300347B0F /* SSHWrapper.m */; }; 15 | 53F7E9D71A5C2B1700F3C678 /* openssl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53F7E9D61A5C2B1700F3C678 /* openssl.framework */; }; 16 | 53F7E9D91A5C2DB900F3C678 /* gcrypt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53F7E9D81A5C2DB900F3C678 /* gcrypt.framework */; }; 17 | 53F7E9DB1A5C2EBD00F3C678 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 53F7E9DA1A5C2EBD00F3C678 /* Images.xcassets */; }; 18 | FD6F01141BFF42D300B6EFFB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD6F01131BFF42D300B6EFFB /* ViewController.swift */; }; 19 | FD6F01181BFF43BC00B6EFFB /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FD6F01171BFF43BC00B6EFFB /* ViewController.xib */; }; 20 | FD6F011A1BFF564400B6EFFB /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FD6F01191BFF564400B6EFFB /* Launch Screen.storyboard */; }; 21 | FD6F011C1BFF58DB00B6EFFB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD6F011B1BFF58DB00B6EFFB /* AppDelegate.swift */; }; 22 | FD6F011E1BFF593700B6EFFB /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FD6F011D1BFF593700B6EFFB /* libz.tbd */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 27 | 1D6058910D05DD3D006BFB54 /* libssh2-for-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "libssh2-for-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 2AB446E812F8A588006B0090 /* libssh2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssh2.a; path = lib/libssh2.a; sourceTree = ""; }; 31 | 2AB446F312F8A5A3006B0090 /* libssh2_for_iOS-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "libssh2_for_iOS-Info.plist"; path = "libssh2-for-iOS/libssh2_for_iOS-Info.plist"; sourceTree = ""; }; 32 | 2AB4470612F8A5CC006B0090 /* libssh2_for_iOS_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libssh2_for_iOS_Prefix.pch; path = "libssh2-for-iOS/libssh2_for_iOS_Prefix.pch"; sourceTree = ""; }; 33 | 53E9E45816F4D4F300347B0F /* SSHWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SSHWrapper.h; path = "libssh2-for-iOS/SSHWrapper.h"; sourceTree = SOURCE_ROOT; }; 34 | 53E9E45916F4D4F300347B0F /* SSHWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SSHWrapper.m; path = "libssh2-for-iOS/SSHWrapper.m"; sourceTree = SOURCE_ROOT; }; 35 | 53F7E9D61A5C2B1700F3C678 /* openssl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = openssl.framework; sourceTree = ""; }; 36 | 53F7E9D81A5C2DB900F3C678 /* gcrypt.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = gcrypt.framework; sourceTree = ""; }; 37 | 53F7E9DA1A5C2EBD00F3C678 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = "libssh2-for-iOS/Images.xcassets"; sourceTree = ""; }; 38 | FD6F01121BFF42D300B6EFFB /* libssh2-for-iOS-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "libssh2-for-iOS-Bridging-Header.h"; path = "libssh2-for-iOS/libssh2-for-iOS-Bridging-Header.h"; sourceTree = ""; }; 39 | FD6F01131BFF42D300B6EFFB /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = "libssh2-for-iOS/ViewController.swift"; sourceTree = ""; }; 40 | FD6F01171BFF43BC00B6EFFB /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ViewController.xib; path = "libssh2-for-iOS/ViewController.xib"; sourceTree = ""; }; 41 | FD6F01191BFF564400B6EFFB /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "libssh2-for-iOS/Launch Screen.storyboard"; sourceTree = ""; }; 42 | FD6F011B1BFF58DB00B6EFFB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = "libssh2-for-iOS/AppDelegate.swift"; sourceTree = ""; }; 43 | FD6F011D1BFF593700B6EFFB /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | FD6F011E1BFF593700B6EFFB /* libz.tbd in Frameworks */, 52 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 53 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 54 | 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, 55 | 53F7E9D71A5C2B1700F3C678 /* openssl.framework in Frameworks */, 56 | 2AB446ED12F8A588006B0090 /* libssh2.a in Frameworks */, 57 | 53F7E9D91A5C2DB900F3C678 /* gcrypt.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1D6058910D05DD3D006BFB54 /* libssh2-for-iOS.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 53E9E46116F4D62500347B0F /* libssh2-for-iOS */, 76 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 77 | 29B97317FDCFA39411CA2CEA /* Resources */, 78 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 79 | 19C28FACFE9D520D11CA2CBB /* Products */, 80 | ); 81 | name = CustomTemplate; 82 | sourceTree = ""; 83 | }; 84 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | FD6F01121BFF42D300B6EFFB /* libssh2-for-iOS-Bridging-Header.h */, 88 | 2AB4470612F8A5CC006B0090 /* libssh2_for_iOS_Prefix.pch */, 89 | ); 90 | name = "Other Sources"; 91 | sourceTree = ""; 92 | }; 93 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 53F7E9DA1A5C2EBD00F3C678 /* Images.xcassets */, 97 | 2AB446F312F8A5A3006B0090 /* libssh2_for_iOS-Info.plist */, 98 | FD6F01191BFF564400B6EFFB /* Launch Screen.storyboard */, 99 | ); 100 | name = Resources; 101 | sourceTree = ""; 102 | }; 103 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | FD6F011D1BFF593700B6EFFB /* libz.tbd */, 107 | 2AB446E812F8A588006B0090 /* libssh2.a */, 108 | 53F7E9D81A5C2DB900F3C678 /* gcrypt.framework */, 109 | 53F7E9D61A5C2B1700F3C678 /* openssl.framework */, 110 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 111 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 112 | 288765FC0DF74451002DB57D /* CoreGraphics.framework */, 113 | ); 114 | name = Frameworks; 115 | sourceTree = ""; 116 | }; 117 | 53E9E46116F4D62500347B0F /* libssh2-for-iOS */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | FD6F011B1BFF58DB00B6EFFB /* AppDelegate.swift */, 121 | FD6F01131BFF42D300B6EFFB /* ViewController.swift */, 122 | FD6F01171BFF43BC00B6EFFB /* ViewController.xib */, 123 | 53E9E45816F4D4F300347B0F /* SSHWrapper.h */, 124 | 53E9E45916F4D4F300347B0F /* SSHWrapper.m */, 125 | ); 126 | name = "libssh2-for-iOS"; 127 | sourceTree = ""; 128 | }; 129 | /* End PBXGroup section */ 130 | 131 | /* Begin PBXNativeTarget section */ 132 | 1D6058900D05DD3D006BFB54 /* libssh2-for-iOS */ = { 133 | isa = PBXNativeTarget; 134 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "libssh2-for-iOS" */; 135 | buildPhases = ( 136 | 1D60588D0D05DD3D006BFB54 /* Resources */, 137 | 1D60588E0D05DD3D006BFB54 /* Sources */, 138 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = "libssh2-for-iOS"; 145 | productName = "libssh2-for-iOS"; 146 | productReference = 1D6058910D05DD3D006BFB54 /* libssh2-for-iOS.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | /* End PBXNativeTarget section */ 150 | 151 | /* Begin PBXProject section */ 152 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 153 | isa = PBXProject; 154 | attributes = { 155 | LastSwiftUpdateCheck = 0710; 156 | LastUpgradeCheck = 0710; 157 | }; 158 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "libssh2-for-iOS" */; 159 | compatibilityVersion = "Xcode 3.2"; 160 | developmentRegion = English; 161 | hasScannedForEncodings = 1; 162 | knownRegions = ( 163 | English, 164 | Japanese, 165 | French, 166 | German, 167 | ); 168 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 1D6058900D05DD3D006BFB54 /* libssh2-for-iOS */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | FD6F011A1BFF564400B6EFFB /* Launch Screen.storyboard in Resources */, 183 | 53F7E9DB1A5C2EBD00F3C678 /* Images.xcassets in Resources */, 184 | FD6F01181BFF43BC00B6EFFB /* ViewController.xib in Resources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXResourcesBuildPhase section */ 189 | 190 | /* Begin PBXSourcesBuildPhase section */ 191 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 192 | isa = PBXSourcesBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | FD6F011C1BFF58DB00B6EFFB /* AppDelegate.swift in Sources */, 196 | 53E9E45A16F4D4F300347B0F /* SSHWrapper.m in Sources */, 197 | FD6F01141BFF42D300B6EFFB /* ViewController.swift in Sources */, 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | }; 201 | /* End PBXSourcesBuildPhase section */ 202 | 203 | /* Begin XCBuildConfiguration section */ 204 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 205 | isa = XCBuildConfiguration; 206 | buildSettings = { 207 | ALWAYS_SEARCH_USER_PATHS = NO; 208 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 209 | CLANG_ENABLE_MODULES = YES; 210 | CLANG_ENABLE_OBJC_ARC = YES; 211 | COPY_PHASE_STRIP = NO; 212 | FRAMEWORK_SEARCH_PATHS = ( 213 | "$(inherited)", 214 | "$(PROJECT_DIR)", 215 | ); 216 | GCC_DYNAMIC_NO_PIC = NO; 217 | GCC_OPTIMIZATION_LEVEL = 0; 218 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 219 | GCC_PREFIX_HEADER = "libssh2-for-iOS/libssh2_for_iOS_Prefix.pch"; 220 | INFOPLIST_FILE = "libssh2-for-iOS/libssh2_for_iOS-Info.plist"; 221 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 222 | LIBRARY_SEARCH_PATHS = ( 223 | "$(inherited)", 224 | "\"$(SRCROOT)/lib\"", 225 | ); 226 | PRODUCT_BUNDLE_IDENTIFIER = "de.x2on.${PRODUCT_NAME:rfc1034identifier}"; 227 | PRODUCT_NAME = "libssh2-for-iOS"; 228 | SWIFT_OBJC_BRIDGING_HEADER = "libssh2-for-iOS/libssh2-for-iOS-Bridging-Header.h"; 229 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 230 | }; 231 | name = Debug; 232 | }; 233 | 1D6058950D05DD3E006BFB54 /* Release */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | ALWAYS_SEARCH_USER_PATHS = NO; 237 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 238 | CLANG_ENABLE_MODULES = YES; 239 | CLANG_ENABLE_OBJC_ARC = YES; 240 | COPY_PHASE_STRIP = YES; 241 | FRAMEWORK_SEARCH_PATHS = ( 242 | "$(inherited)", 243 | "$(PROJECT_DIR)", 244 | ); 245 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 246 | GCC_PREFIX_HEADER = "libssh2-for-iOS/libssh2_for_iOS_Prefix.pch"; 247 | INFOPLIST_FILE = "libssh2-for-iOS/libssh2_for_iOS-Info.plist"; 248 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 249 | LIBRARY_SEARCH_PATHS = ( 250 | "$(inherited)", 251 | "\"$(SRCROOT)/lib\"", 252 | ); 253 | PRODUCT_BUNDLE_IDENTIFIER = "de.x2on.${PRODUCT_NAME:rfc1034identifier}"; 254 | PRODUCT_NAME = "libssh2-for-iOS"; 255 | SWIFT_OBJC_BRIDGING_HEADER = "libssh2-for-iOS/libssh2-for-iOS-Bridging-Header.h"; 256 | VALIDATE_PRODUCT = YES; 257 | }; 258 | name = Release; 259 | }; 260 | C01FCF4F08A954540054247B /* Debug */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 264 | ENABLE_TESTABILITY = YES; 265 | GCC_C_LANGUAGE_STANDARD = c99; 266 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 267 | GCC_WARN_UNUSED_VARIABLE = YES; 268 | HEADER_SEARCH_PATHS = "include/**"; 269 | ONLY_ACTIVE_ARCH = YES; 270 | SDKROOT = iphoneos; 271 | }; 272 | name = Debug; 273 | }; 274 | C01FCF5008A954540054247B /* Release */ = { 275 | isa = XCBuildConfiguration; 276 | buildSettings = { 277 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 278 | GCC_C_LANGUAGE_STANDARD = c99; 279 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 280 | GCC_WARN_UNUSED_VARIABLE = YES; 281 | HEADER_SEARCH_PATHS = "include/**"; 282 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 283 | SDKROOT = iphoneos; 284 | }; 285 | name = Release; 286 | }; 287 | /* End XCBuildConfiguration section */ 288 | 289 | /* Begin XCConfigurationList section */ 290 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "libssh2-for-iOS" */ = { 291 | isa = XCConfigurationList; 292 | buildConfigurations = ( 293 | 1D6058940D05DD3E006BFB54 /* Debug */, 294 | 1D6058950D05DD3E006BFB54 /* Release */, 295 | ); 296 | defaultConfigurationIsVisible = 0; 297 | defaultConfigurationName = Release; 298 | }; 299 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "libssh2-for-iOS" */ = { 300 | isa = XCConfigurationList; 301 | buildConfigurations = ( 302 | C01FCF4F08A954540054247B /* Debug */, 303 | C01FCF5008A954540054247B /* Release */, 304 | ); 305 | defaultConfigurationIsVisible = 0; 306 | defaultConfigurationName = Release; 307 | }; 308 | /* End XCConfigurationList section */ 309 | }; 310 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 311 | } 312 | --------------------------------------------------------------------------------