We are using Bundler for ruby gems installation, for installing
CocoaPods and fastlane.
Make sure to install bundler and then run ./scripts/setup.sh
that will install gems and pods.
Then use bundler to run fastlane actions such as bundle exec fastlane test
.
We recommend following Clean Code principles.
To ensure code style consistency, it must respect the following:
- Code Formatted and Linted:
- Obj-C: ClangFormat. (Checked by CI)
- Swift: swift-format. (Not checked by CI)
- Swift: SwiftLint. (Checked by CI)
- You can format whole repository with
bundle exec fastlane format
- Alternatively to ease your workflow, you can also add a git hook with:
cp tools/code-format-git-hook.sh .git/hooks/pre-commit
- Follow Ray Wenderlich's coding style.
As much as possible, respect the "Arrange, Act, Assert" convention in the tests.
The tests in this project are organised according to the following conventions:
- Unit tests are located within the UnitTests directory.
- Integration tests are written in the IntegrationTests directory.
- The subset of integration tests which represent one of the functional tests defined here
are post-fixed with
FunctionTests
. The rest are post-fixed withIntegrationTests
.
-
Bump version:
- Releases:
bundle exec fastlane version_bump version:x.y.z
- For RCs use
version:x.y.z-rc1
- If you release several times the same
x.y.z
version, for instance several RCs, you have to bump bundle version, you can do this adding an extrabuild:2
argument. e.g.bundle exec fastlane version_bump version:x.y.z-rc2 build:2
- Releases:
-
Ensure
CHANGELOG.md
is up to date and properly formatted:- Sections separated by lines
---
are used to split the changelog - The first section without version line will be used as Release description
- Sections separated by lines
-
Check changes and submit a PR / merge if needed
-
Push a semver compliant version tag (
x.y.z
orx.y.z-rc1
) to GitHub- That will trigger a Test & Release to GitHub workflow
- Check the result on GitHub releases page
-
Review the added GitHub release draft, publish it
-
Once published, it will trigger another Release to CocoaPods workflow that will push the spec to CocoaPods
-
Profit 🚀🥳
In CriteoAdViewer
, there is a workspace and Podfile, which:
- Are intended only to test Sdk from CocoaPods
- Are not used by top level workspace
- Doesn't need to be actively maintained as CI does not use them
- Edit
CriteoAdViewer/Podfile
if needed - Run
pod install
from thisCriteoAdViewer
folder, keep an eye on the version installed in logs - From Xcode delete
CriteoPublisherSdk.framework
fromFrameworks
Note: When running pod install
in this folder, CocoaPods will alter the
project, please do not merge your changes as it could interfere with
the main workspace.