Closed mickael-menu closed 3 years ago
Example generating the test app project using SPM and with LCP:
name: R2TestApp
options:
bundleIdPrefix: org.readium
packages:
R2Shared:
url: https://github.com/readium/r2-shared-swift.git
branch: develop
R2Streamer:
url: https://github.com/readium/r2-streamer-swift.git
branch: develop
R2Navigator:
url: https://github.com/readium/r2-navigator-swift.git
branch: develop
ReadiumOPDS:
url: https://github.com/readium/r2-opds-swift.git
branch: develop
ReadiumLCP:
url: https://github.com/readium/r2-lcp-swift.git
branch: develop
Kingfisher:
url: https://github.com/onevcat/Kingfisher.git
from: 5.15.8
MBProgressHUD:
url: https://github.com/jdg/MBProgressHUD.git
from: 1.2.0
SQLite:
url: https://github.com/stephencelis/SQLite.swift.git
from: 0.12.2
targets:
R2TestApp:
type: application
platform: iOS
deploymentTarget: "10.0"
sources:
- path: Sources
excludes:
- Resources/Samples
- path: Sources/Resources/Samples
type: folder
dependencies:
- carthage: R2LCPClient
- package: R2Shared
- package: R2Streamer
- package: R2Navigator
- package: ReadiumOPDS
- package: ReadiumLCP
- package: Kingfisher
- package: MBProgressHUD
- package: SQLite
settings:
OTHER_SWIFT_FLAGS: -DLCP
It generates this project:
Swift Package Manager support is around the corner, thanks to @stevenzeck.
With it, we will need to add more Xcode targets to show how to use them. Currently the Test App has four of them, which adds some maintenance load:
I think this also adds confusion for integrators, since the project contains artifacts for a few different types of integration.
Instead, I suggest removing the Xcode project entirely from
r2-testapp-swift
and instead add one XcodeGen project definition YAML file per integration example.Pros
Cons
One step further
Not related to XcodeGen, but r2-workspace-swift also brings some maintenance load with its 4 different integration branches.
I suggest archiving this repository and instead adding the submodules directly in
r2-testapp-swift
, when used for development purposes.git bisect
. Right nowr2-workspace-swift
is only updated after each release, making it not so useful.r2-workspace-swift
too. However, having them inr2-testapp-swift
ties any change in the Test App itself to particular commits of the R2 modules.