You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,11 @@ This is a template for creating iOS projects at Q42. It has opinionated defaults
13
13
14
14
Only basic features that almost all projects use, were added in this template:
15
15
16
-
* SwiftUI using the SwiftUI lifecycle with an AppDelegate
17
-
* Implementation of the Clean Architecture
18
-
* Dependency injection using the library Factory
19
-
* Unit tests and UI tests using Salad
20
-
* GitHub Actions CI configuration that runs the tests and submits the app to TestFlight
16
+
- SwiftUI using the SwiftUI lifecycle with an AppDelegate
17
+
- Implementation of the Clean Architecture
18
+
- Dependency injection using the library Factory
19
+
- Unit tests and UI tests using Salad
20
+
- GitHub Actions CI configuration that runs the tests and submits the app to TestFlight
21
21
22
22
Xcode 26 or higher is required.
23
23
@@ -74,47 +74,47 @@ We use [Factory](https://github.com/hmlongco/Factory) as a DI container.
74
74
75
75
### Modules & libraries
76
76
77
-
* Preferably use the Swift Package Manager for dependencies. Use other package managers only if there's no other option.
78
-
* Only extract code into a package if there are strong reasons to do so. For example:
79
-
* It is used from at least two different targets/packages, or is a candidate to be extracted to an open-source package.
80
-
* It is completely self-contained.
77
+
- Preferably use the Swift Package Manager for dependencies. Use other package managers only if there's no other option.
78
+
- Only extract code into a package if there are strong reasons to do so. For example:
79
+
- It is used from at least two different targets/packages, or is a candidate to be extracted to an open-source package.
80
+
- It is completely self-contained.
81
81
82
82
When choosing a third-party library, prefer libraries that:
83
83
84
-
* Are written in idiomatic Swift or Objective-C that sticks to best practices.
85
-
* Have as few dependencies of its own as possible. Preferably none.
86
-
* Aren't too big, in order to keep compile times and bloat in check.
84
+
- Are written in idiomatic Swift or Objective-C that sticks to best practices.
85
+
- Have as few dependencies of its own as possible. Preferably none.
86
+
- Aren't too big, in order to keep compile times and bloat in check.
87
87
88
88
### Testing
89
89
90
-
* For business logic, we write unit tests.
91
-
* For testing the user interface, we write UI tests in a behaviour-driven way using the [Salad](https://github.com/Q42/Salad) library.
92
-
* Tests are run on CI (GitHub Actions). Tests must pass before a PR may be merged and before any sort of build is created.
90
+
- For business logic, we write unit tests.
91
+
- For testing the user interface, we write UI tests in a behaviour-driven way using the [Salad](https://github.com/Q42/Salad) library.
92
+
- Tests are run on CI (GitHub Actions). Tests must pass before a PR may be merged and before any sort of build is created.
93
93
94
94
### Views
95
95
96
-
* Keep views focused (single-responsibility principle from SOLID). When a view becomes large a, split it up into smaller views.
97
-
* Every view gets a UI preview if at all possible. The preview should show the view in different states using dummy data.
98
-
* We use [custom SF Symbols](https://developer.apple.com/documentation/uikit/uiimage/creating_custom_symbol_images_for_your_app/) whenever a custom icon is needed, so that they render in a consistent manner.
96
+
- Keep views focused (single-responsibility principle from SOLID). When a view becomes large a, split it up into smaller views.
97
+
- Every view gets a UI preview if at all possible. The preview should show the view in different states using dummy data.
98
+
- We use [custom SF Symbols](https://developer.apple.com/documentation/uikit/uiimage/creating_custom_symbol_images_for_your_app/) whenever a custom icon is needed, so that they render in a consistent manner.
99
99
100
100
### Accessibility
101
101
102
-
* Every new component or control should be audited for basic accessibility support:
103
-
* Dynamic type size support
104
-
* VoiceOver support
105
-
* Also consider:
106
-
* Bold text support
107
-
* High contrast support
108
-
* Use `accessibilityRepresentation` on custom controls to make them accessible.
102
+
- Every new component or control should be audited for basic accessibility support:
103
+
- Dynamic type size support
104
+
- VoiceOver support
105
+
- Also consider:
106
+
- Bold text support
107
+
- High contrast support
108
+
- Use `accessibilityRepresentation` on custom controls to make them accessible.
109
109
110
110
### Localization
111
111
112
112
String catalogs are used to localize the project. The default languages supported are English and Dutch.
113
113
114
114
### Async code
115
115
116
-
*`async`/`await` is preferred over Combine/Promises/etc. to leverage the compiler concurrency checking.
117
-
*[Combine](https://developer.apple.com/documentation/combine) can be used when `async`/`await` or `AsyncSequence` fall short, and more complexity is needed to solve the problem at hand.
116
+
-`async`/`await` is preferred over Combine/Promises/etc. to leverage the compiler concurrency checking.
117
+
-[Combine](https://developer.apple.com/documentation/combine) can be used when `async`/`await` or `AsyncSequence` fall short, and more complexity is needed to solve the problem at hand.
118
118
119
119
## Continuous integration
120
120
@@ -126,11 +126,11 @@ On a push to the `main` branch, it will also run the tests, and if they pass, a
126
126
Five environment secrets are needed for the workflow to run on GitHub Actions.
127
127
You may configure these in the repository secret settings on GitHub.
128
128
129
-
*`BUILD_CERTIFICATE_BASE64` contains a base64-encoded string of the .p12 certificate bundle, used to code sign the app. This bundle needs to contain two certificates: **development** and **distribution**.
130
-
*`P12_PASSWORD` contains the password of the certificate bundle.
131
-
*`APP_STORE_CONNECT_API_KEY_BASE64` contains a base64-encoded string of the .p8 App Store Connect API key.
132
-
*`APP_STORE_CONNECT_API_KEY_ID` contains the key ID of the App Store Connect API key.
133
-
*`APP_STORE_CONNECT_API_KEY_ISSUER_ID` contains the issuer ID of the App Store Connect API key.
129
+
-`BUILD_CERTIFICATE_BASE64` contains a base64-encoded string of the .p12 certificate bundle, used to code sign the app. This bundle needs to contain two certificates: **development** and **distribution**.
130
+
-`P12_PASSWORD` contains the password of the certificate bundle.
131
+
-`APP_STORE_CONNECT_API_KEY_BASE64` contains a base64-encoded string of the .p8 App Store Connect API key.
132
+
-`APP_STORE_CONNECT_API_KEY_ID` contains the key ID of the App Store Connect API key.
133
+
-`APP_STORE_CONNECT_API_KEY_ISSUER_ID` contains the issuer ID of the App Store Connect API key.
134
134
135
135
To create such a certificate bundle, open Keychain Access. Unfold the entries for the development and distribution certificate. Select the certificates and their private keys using shift, then right-click and select "Export 4 items...".
0 commit comments