Code Monkey home page Code Monkey logo

libssh2-iosx's Introduction

LIBSSH2 for iOS, visionOS, and Mac OS X (Intel & Apple Silicon M1) - arm64 / x86_64

Supported versions: 1.11.0, 1.10.0, 1.9.0 (use the appropriate tag or branch to choose a version)

This repo provides a universal script for building static LIBSSH2 library for use in iOS, visionOS, and Mac OS X applications. The actual library version is taken from https://github.com/libssh2/libssh2.git with the appropriate tag, e.g: 'libssh2-1.11.0'

Prerequisites

  1. Xcode must be installed because xcodebuild is used to create xcframeworks.
  2. xcode-select -p must point to Xcode app developer directory (by default e.g. /Applications/Xcode.app/Contents/Developer). If it points to CommandLineTools directory you should execute: sudo xcode-select --reset or sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
  3. CMake must be installed because it's used as the build system for LIBSSH2.
  4. Cocoapods must be installed because it's used to get the OpenSSL backend.
  5. For the creation of visionOS related artifacts and their integration into the resulting xcframeworks, XROS.platform and XRSimulator.platform should be available in the folder: /Applications/Xcode.app/Contents/Developer/Platforms

Building notes

  1. The library is built with OpenSSL backend. OpenSSL build scripts are taken from https://github.com/apotocki/openssl-iosx and run using the 'pod' utility.
  2. The library is built with ZLIB compression enabled, which is available through the system SDKs.

How to build?

  • Manually
    # clone the repo
    git clone https://github.com/apotocki/libssh2-iosx
    
    # build libraries
    cd libssh2-iosx
    scripts/build.sh

    # have fun, the result artifacts will be located in 'frameworks' folder.
    # Then you can add the xcframework in your XCode project. The process is described, e.g., at https://www.simpleswiftguide.com/how-to-add-xcframework-to-xcode-project/
  • Use cocoapods. Add the following lines into your project's Podfile:
    use_frameworks!
    pod 'libssh2-iosx'
    # or optionally more precisely e.g.:
    # pod 'libssh2-iosx', :git => 'https://github.com/apotocki/libssh2-iosx'

Then install new dependency:

   pod install --verbose

As an advertisement…

Please check out my iOS application on the App Store:

PotoHEX
HEX File Viewer & Editor

This application is designed to view and edit files at the byte or character level; calculate different hashes, encode/decode, and compress/decompress desired byte regions.

You can support my open-source development by trying the App.

Feedback is welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.