This document describes the steps to take when developing, updating and releasing the Ninchat iOS SDK.
The library has been written in Swift wrapping legacy Ninchat Objective-c SDK in a modern swift version. The library is being published using Cocoapods, the de-facto standard dependency manager for iOS.
The SDK will provide backward compability as much as possible, so no shotgun effect happens on current clients. However, clients need to update to the new SKD as the NinchatSDK is no longer maintained for new features.
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.19+ 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 NinchatSDKSwift.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 NinchatSDKSwift.podspec