Elastos Carrier Swift Framework
Elastos Carrier Swift Framework is swift API wrapper (and Objective-C APIs) for Elastos Native Carrier, where Carrier is a decentralised peer to peer communication framework.
Build from source
1.Build Carrier NDK
You need to build carrier iOS/Macos ndk distributions from the Carrier native repository with following github address.
Finished building iOS/Macos NDKs for Carrier, you would need native output libraries ‘lipo'ed with serveral CPU architectures supported. Currently, only x86-64 and arm64 CPU architectures are supported.
The output static libraries would be listed under
_dist/lipo directory in Carrier Native source.
2.Import Carrier NDK
NativeDistributions to import native shared libraries and headers should have following directory structure:
NativeDistributions |--include |--ela_carrier.h |--ela_session.h |--CCarrier.swift |--CSession.swift |--libs |--libcrystal.dylib |--libelacarrier.dylib |--libelasession.dylib
The headers under subdirectory
include are public header files from Carrier native.
3. Build Carrier SDK
After importing dependencies from Carrier native, you need Apple Xcode to open this project and build Carrier iOS/Macos SDK.
Use Apple Xcode to generate ElastosCarrierSDK.framework.
1. Pod install
The distribution has been published to CocoaPods platform. So, the simple way to use ElastosCarrierSDK.framework is just to add the following line to your Podfile:
Then run the command below to install it before open your Xcode workspace:
$ pod install
2. Add shell script for codesign
In the project navigator, select the tab Build Phases in the specific TARGET" ** item. Then click **+ button on the right-top corner to choose New Run Script Phase and expand it to add shell script as below:
1. Swift APIs Docs
Run following script command to generate swift APIs document with appledoc tool:
2. Object-C APIs Docs
$ ./docs.sh objc
About How to install appledoc, please refer to following github repository:
Sincerely thanks to all teams and projects that we relies on directly or indirectly.
We welcome contributions to the Elastos Carrier Swfit Project (or Native Project) in many forms.
Elastos Carrier Swift Project source code files are made available under the GPLv3 License, located in the LICENSE file.