<commit_before># Cryptobox for iOS [![Build Status](https://travis-ci.org/romanb/cryptobox-ios.svg?branch=master)](https://travis-ci.org/romanb/cryptobox-ios)

This project provides for cross-compilation of [cryptobox](https://github.com/romanb/cryptobox) for iOS, currently only in the form of static libraries. It may also provide higher-level Objective-C bindings to the C interface in the future, as well as dynamic libraries.

## Building libcryptobox

A rust cross-compiler is needed that supports the following iOS architectures:

  * armv7-apple-ios
  * armv7s-apple-ios
  * i386-apple-ios
  * aarch64-apple-ios
  * x86_64-apple-ios

For instructions on how to build such a cross-compiler, refer to the [Rust Wiki](https://github.com/rust-lang/rust-wiki-backup/blob/master/Doc-building-for-ios.md).

**Note**: Link against the following native artifacts when linking against the `libcryptobox.a` static library. The order and any duplication can be significant on some platforms, and so may need to be preserved:

  * library: sodium (`libsodium.a` is distributed as part of this project)
  * library: c
  * library: m
  * library: System
  * library: objc
  * framework: Foundation
  * framework: Security
  * library: pthread
  * library: c
  * library: m

## Building iOS project
### Prerequisites
`libcryptobox.a`, `libcryptobox.a` plus all the required headers should be located under the `${PROJECT_DIR}/build/` directory. To archieve this you either can build the `libcryptobox` on your own (See [Building libcryptobox](#building-libcryptobox)) or download and unpack the released binary via the `make cryptobox-<VERSION>` call.


<commit_msg>Added a short desc. of how to build the iOS lib<commit_after># Cryptobox for iOS [![Build Status](https://travis-ci.org/romanb/cryptobox-ios.svg?branch=master)](https://travis-ci.org/romanb/cryptobox-ios)

This project provides for cross-compilation of [cryptobox](https://github.com/romanb/cryptobox) for iOS, currently only in the form of static libraries. It may also provide higher-level Objective-C bindings to the C interface in the future, as well as dynamic libraries.

## Building libcryptobox

A rust cross-compiler is needed that supports the following iOS architectures:

  * armv7-apple-ios
  * armv7s-apple-ios
  * i386-apple-ios
  * aarch64-apple-ios
  * x86_64-apple-ios

For instructions on how to build such a cross-compiler, refer to the [Rust Wiki](https://github.com/rust-lang/rust-wiki-backup/blob/master/Doc-building-for-ios.md).

**Note**: Link against the following native artifacts when linking against the `libcryptobox.a` static library. The order and any duplication can be significant on some platforms, and so may need to be preserved:

  * library: sodium (`libsodium.a` is distributed as part of this project)
  * library: c
  * library: m
  * library: System
  * library: objc
  * framework: Foundation
  * framework: Security
  * library: pthread
  * library: c
  * library: m

## Building iOS project
### Prerequisites
`libcryptobox.a`, `libcryptobox.a` plus all the required headers should be located under the `${PROJECT_DIR}/build/` directory. To archieve this you either can build the `libcryptobox` on your own (See [Building libcryptobox](#building-libcryptobox)) or download and unpack the released binary via the `make cryptobox-<VERSION>` call.

### Building the static library
Open the `Cryptobox/Cryptobox.xcodeproj`, switch to `UniversalLib` Schema and build. The compressed library (including all the needed headers) will get copied to the `${PROJECT_DIR}/dist/` folder.

{'fraction_non_alphanumeric': 0.09726103968697597, 'fraction_numerical': 0.006148686416992733, 'mean_word_length': 4.523148148148148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3412637', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1022, 'n_words': 396}