This document describes the steps to take when developing, updating and releasing the Ninchat iOS SDK.
The library has been written in Objective-C, provinding a thin layer around a wrapped Golang SDK that has been built as a static Framework for iOS use.
The library is being published using Cocoapods, the de-facto standard dependency manager for iOS.
When developing the SDK, pay attention to the existing coding style and follow the same conventions.
TODO
This project uses the Ninchat Go SDK to take care of API communication.
You must have go
and gomobile
installed. Install them by running:
brew install go
go get -u golang.org/x/mobile/cmd/gomobile
gomobile init
You will need Go 1.8+ installed to perform this step; it requires building the existing Ninchat Go SDK into a static library callable from iOS code.
Update the Framework by running the script:
update-go-framework.sh
To do the steps manually, do the following:
- Make sure you have the latest code:
git submodule init
git submodule update
git fetch
git merge <origin-branch>
- Enter the Go mobile package directory:
cd /path/to/project/go-sdk/src/github.com/ninchat/ninchat-go/mobile
- Create the Framework:
GOPATH=$GOPATH:/path/to/project/go-sdk gomobile bind -target ios -o /tmp/NinchatGo.framework
- Replace the version in the iOS project
rm -rf /path/to/project/Frameworks/NinchatGo.framework
cp -r /tmp/NinchatGo.framework /path/to/project/Frameworks/NinchatGo.framework
First of all you need to have configured the private podspecs repo:
pod repo add ninchat-podspecs [email protected]:somia/ninchat-podspecs.git
To release a new SDK version on the said podspec repository, take the following steps:
- Update NinchatSDK.podspec and set s.version to match the upcoming tag
- Commit all your changes, merge all pending accepted Merge ('pull') Requests
- Create a new tag following Semantic Versioning; eg.
git tag -a 1.0.1 -m "Your tag comment"
git push --tags
pod repo push ninchat-podspecs NinchatSDK.podspec