This is the iOS application for https://github.com/numerique-gouv/ami-notifications-api
AMI Xcode project uses several tools:
XcodeGento generate Xcode project: https://github.com/yonaskolb/XcodeGenSwiftFormatto format Swift code: https://github.com/nicklockwood/SwiftFormatSwiftLintto lint Swift code: https://github.com/realm/SwiftLintSwiftGento automatically generate Swift resources properies/methods: https://github.com/SwiftGen/SwiftGen
Xcode project file .xcodeproj is not gitted to avoid a lot of conflicts when working in team on the project.
It is generated using xcodegen tool.
The project is described using 2 files:
- the Xcode project: ami-project.yml
- the Xcode targets: ami-targets.yml
-
First, clone the project, use
git clonecommand:git clone git@github.com:numerique-gouv/ami-app-ios.git
-
Then configure your environnement, execute the script:
scripts/ami-configure-build-tools.sh
-
Then, generate the Xcode project using script:
scripts/ami-generate-xcode.sh
-
Now, you can open the generated
AMI-xcodegen.xcodeprojin Xcode.xed AMI-xcodegen.xcodeproj
-
SwiftGenPlugin (used by AmiDesignSystem) must be authorized to build the project.
-
SwiftGen is used in Xcode pre-build script to automatically generate Swift code (in
AMI/Sources/Generatedfolder) for String, Color and Image resources.-
Strings
- SwiftGen handle strings localization automatically
AMIL10n.<String ID>for String andAMIL10n.StringNameID(param)for String with parameters.
-
Colors
- SwiftGen handle Light, Dark and High constrast modes automatically
Asset.Color.<color ID>for a UIColor,Asset.Color.<color ID>.swiftUIColorfor a SwiftUI Color
-
Images
Asset.Image.<image ID>for a UIImage,Asset.Image.<image ID>.swiftUIImagefor a SwiftUI Image
-