- The Xcode version mentioned in the README
- Mint package manager
- Node.js (any recent version should be fine)
mint bootstrap
— this will take quite a long time (~5 minutes on my machine) the first time you run itnpm install
Either:
swift test
, or- open
AblyChat.xcworkspace
in Xcode and test theAblyChat
scheme
To check formatting and code quality, run swift run BuildTool lint
. Run with --fix
to first automatically fix things where possible.
- The aim of the example app is that it demonstrate all of the core functionality of the SDK. So if you add a new feature, try to add something to the example app to demonstrate this feature.
- We should aim to make it easy for consumers of the SDK to be able to mock out the SDK in the tests for their own code. A couple of things that will aid with this:
- Describe the SDK’s functionality via protocols (when doing so would still be sufficiently idiomatic to Swift).
- When defining a
struct
that is emitted by the public API of the library, make sure to define a public memberwise initializer so that users can create one to be emitted by their mocks. (There is no way to make Swift’s autogenerated memberwise initializer public, so you will need to write one yourself. In Xcode, you can do this by clicking at the start of the type declaration and doing Editor → Refactor → Generate Memberwise Initializer.)