Skip to content

Latest commit

 

History

History
97 lines (73 loc) · 2.82 KB

README.md

File metadata and controls

97 lines (73 loc) · 2.82 KB

How to install

A wrapper is a private pod, so private podspec must be set. Put at the top of the Podfile:

source 'https://github.com/hyperledger/indy-sdk.git'

Cocoapod will search for spec files in the root Specs folder.

Add pod to target:

pod 'libindy-objc'                

How to build

  1. Install Rust and rustup (https://www.rust-lang.org/install.html).

  2. Install toolchains using command:

    rustup target add aarch64-apple-ios armv7-apple-ios armv7s-apple-ios i386-apple-ios x86_64-apple-ios
    
  3. Install cargo-lipo:

    cargo install cargo-lipo
    
  4. Install required native libraries and utilities:

    brew install libsodium
    brew install zeromq
    brew install cmake
    
  5. Setup environment variables:

    export PKG_CONFIG_ALLOW_CROSS=1
    export CARGO_INCREMENTAL=1
    
  6. Edit script build-libindy-core-ios.sh: set the following variables to fit your environment:

    export OPENSSL_DIR=/usr/local/Cellar/openssl/1.0.2q
    export EVERNYM_REPO_KEY=~/Documents/EvernymRepo
    export LIBINDY_POD_VERSION=0.0.1
    

    OPENSSL_DIR - path to installed openssl library

    EVERNYM_REPO_KEY - path to file with private key to be authorized on deb server

    LIBINDY_POD_VERSION - version of libindy-core pod to be built

  7. Run the script. Validate the output that all goes well.

  8. Go to Podspec dir.

  9. Create directory with name defined in LIBINDY_POD_VERSION:

    mkdir LIBINDY_POD_VERSION
    
  10. Copy libindy-core.podspec.json to that new directory from some previous version.

  11. Edit this json -> change version field to LIBINDY_POD_VERSION.

  12. Add new directory and file inside to git repository.

  13. Commit to master branch.

  14. for all projects which using libindy-core do not forget to make:

    pod repo update
    pod install
    

Wrapper Cocoapod

Creation

Run Archive process for Indy target. Custom post-action shell script universal_framework.h will be triggered and you get universal framework. Then put it to folder: libindy-objc/Indy.framework and upload to repo.

Usage

Import header starting from 0.1.3:

#import <Indy/Indy.h> 

For 0.1.1 and 0.1.2 versions:

#import <libindy/libindy.h>

All wrapper types and classes have prefix Indy.

Troubleshooting

  • Enable Logging - Use environment variable RUST_LOG={info|debug|trace} to output logs of Libindy.
  • IS-1058
    • OpenSSL cp: file.tgz: No such file or directory -
    sudo gem uninstall cocoapods-downloader
    sudo gem install cocoapods-downloader -v 1.2.0
    
    • Multiple commands produce */Debug-iphonesimulator/Indy-demo.app/PlugIns/Indy-demoTests.xctest/Info.plist - remove Info.plist from there: Solution -> Target -> Build phases -> Copy Bundle Resources