Note: For more information check our Project tools wiki
-
Open iOS project template and use it to create new repository. Preferred repo name is [productname]-[platform], where [productname] includes only name of the product, without client name (like Skoda).
-
Create
develop
branch and set is as a default branch. -
Go to Settings tab > General and disable Wiki, Issues, Projects features we do not use.
-
Enable Automatically delete head branches so there is no need to delete branches manually after each PR merge.
-
Add
Write
role tofuturedapp/ios
team in Access > Collaborators and teams. -
In Code and Automation > Branches, add branch protection rules to patterns
develop
andmain
branches exactly as shown in the following screenshot:
*Note: Status checks may not be available yet. You will set them later.
- Create new branch
feature/PROJ-1-setup-project
where everything will be set up in next steps.
- Write product name in CamelCased style. Organization Identifier is app.futured. Leave Use Core Data unchecked (persistence is usually implemented in much later phase of development) and Include Tests checked. (CI requires tests run)
- Change bundle identifier to kebab-cased style
app.futured.kebab-case-app-name
.
Update your Ruby using your preferred ruby version manager. and install latest version of dependency manager gem install bundler
.
- Call
bundle install
to install gems. - Edit
fastlane/Fastfile
to specify proper environment variables according to imported Fastlane README. - Call
bundle exec fastlane create_apps
. This requires operations rights and you'll need to pass two factor authorization.
Add following dependecies using Swift Package manager:
- https://github.com/futuredapp/FuturedKit (SwiftUI project)
- https://github.com/futuredapp/FTAPIKit (Project using REST API)
- https://github.com/futuredapp/FTTestingKit (only to test target)
- Add a new Run Script Phase that executes the script (remove
swiftlint --fix
if you want to fix linting issues manually):
if test -d "/opt/homebrew/bin/"; then
PATH="/opt/homebrew/bin/:${PATH}"
fi
export PATH
if which swiftlint >/dev/null; then
swiftlint --fix
swiftlint
else
echo "error: SwiftLint not installed, run: brew install swiftlint"
fi
- In Target's Signing & Capabilities tab, uncheck the Automatically manage signing checkbox.
- In Manage Schemes..., set root project scheme as Shared.
- Run
bundle exec fastlane test
to check whether test can be run on both CI and locally. - In Xcode, go to Project Info screen. In Configurations section, add a new configuration by duplicating the Release configuration and rename it to Enterprise.
- On Build Settings tab for target (not project), look for Product Bundle Identifier, expand it to see preferences for Debug, Enterprise and Release configurations and for the Enterprise one, add suffix
.beta
. - Select appropriate certificates, provisioning profiles for all configurations in the Target's Signing & Capabilities tab.
- Run
bundle exec fastlane enterprise
to check whether enteprise builds to App Center succeed (See where to find an API token).
Note: The app should be automatically created and submitted to App Center to your account during step 6 by running bundle exec fastlane enterprise
in Terminal.
- Find the app under your account, go to its Settings, in top right corner find three dots and Transfer app to organization (select Futured).
- Add all internal teams as collaborators.
- Create distribution group for the client and invite them.
Choose your CI service, we currently prefer Github Actions.
Most of the configuration is already part of the iOS project template. All the secrets are provided by the organization. If they are not available ask someone with admin permissions to provide them to your repository.
- Update CODEOWNERS file.
- Update project README and fill in all the strike-through points.
- Commit everything and open PR and add this filled checklist to description.
- After CI checks the PR, status checks are now available to be added in Branch protections settings. Add them.