This project allow to download and build all dependencies needed by the iOS SDK. It use mainly Carthage package manager for that.
First be on macOS, iOS native development is only possible on this operating system.
To build iOS SDK some tools need to be installed:
- Xcode : version defined by xcode.json
- Carthage
- could be installed with brew
brew install carthage
- could be installed with brew
- xprojup to upgrade third party projects
sudo curl -sL https://phimage.github.io/xprojup/install.sh | bash
Not mandatory but helpful
To build with carthage simply use the provided script. (more detail bellow)
./build.shTo build with a specific Xcode version (it must be installed, else the build stops):
./build.sh --xcode 16.4 # or XCODE_VERSION=16.4 ./build.sh
./xcodecheck.sh --list # the Xcode installed on this machineDEVELOPER_DIR is used, so no sudo is needed. If a tool ignores it, XCODE_SELECT=1 ./build.sh --xcode 16.4
also switches xcode-select globally (asks for sudo, and restores the previous one at the end).
Package.swift exists but not tested often, and not integrated with "4D Mobile App" component. (but could be implemented)
The SDK used by "4D Mobile App" will be copied by project from cache folder.
By default the iOS SDK must be installed into: /Library/Caches/com.4D.mobile/sdk/<version>/iOS/sdk
- with
<version>: the 4d version represented as 4 digits (for instance v20=2000 , v20R2=2020)
If no SDK found it will be downloaded from latest release of this project
You could also put an archive "ios.zip" inside
- mobile component "4D Mobile App/Resources/sdk/"
- or inside "YourBase/Resources/mobile/sdk/"
-
build.sh: build using carthagecarthage.sh: allow to deactivate some architecture when building due to issue if we do framework, and not xcframeworksdkstriparch.sh: remove useless architecturessdkclean.sh: remove some files from sourcessdksign.sh: with a certificate installed you could sign it (useful if embeded in a mac os app before mobile one)sdkchecksign.sh: check that the frameworks are signed (warning only, unlessSIGN_MANDATORY=1)sdklicenses.sh: update Licenses filesxcodecheck.sh: find the Xcode installed, used by--xcodeto stop early if the version is missing
-
sdkarchive.sh: if we want to archive to zip with mandatory files -
sdkchecksign.sh: check the signature of the frameworks, of the current folder or of an archive./sdkchecksign.sh # check Carthage/Build ./sdkchecksign.sh ios.zip # check inside the archive
-
release.sh: publishios.zipas a new github release, named after the Xcode version used to build it./release.sh # from an existing ios.zip ./release.sh --build # build, archive, then release ./release.sh --xcode 16.4 # only if ios.zip was built with Xcode 16.4 ./release.sh --build --xcode 16.4 # build with Xcode 16.4, then release
It refuses to create the release if the SDK is not signed, or if the archive was not built with the Xcode version passed to
--xcode.
Cartfile&Cartfile.resolved: forcarthageto define list of projects.Romefileforrometo define cache pathPackage.swiftfor swift package manager to define list of swift projects.
| Name | License | Usefulness |
|---|---|---|
| QMobileAPI | 4D | Network api |
| QMobileDataStore | 4D | Store data |
| QMobileDataSync | 4D | Synchronize data |
| QMobileUI | 4D | Graphic, Application, Features |
flowchart TD
QMobileUI --> QMobuleDataSync
QMobuleDataSync --> QMobuleDataStore
QMobuleDataSync --> QMobileAPI
| Name | License | Usefulness |
|---|---|---|
| Prephirences | MIT | Application settings |
| XCGLogger | MIT | Log |
| FileKit | MIT | Files |
| Name | License | Usefulness |
|---|---|---|
| Alamofire | MIT | Network layer |
| Moya | MIT | API abstraction layer |
| Kingfisher | MIT | Download remote image and cache |
| SwiftyJSON | MIT | Decode/Encode JSON |
| Name | License | Usefulness |
|---|---|---|
| SwiftMessages | MIT | Message/Notification UI |
| IBAnimatable | MIT | Design in interface builder |
| ValueTransformerKit | MIT | Binding: transform data |
| Eureka | MIT | Show form for action |
| Name | License | Usefulness |
|---|---|---|
| CallbackURLKit | MIT | x-callback-url protocol |
| MomXML | MIT | Play with core data model |
| Name | License | Usefulness |
|---|---|---|
| AnimatedCollectionViewLayout | MIT | template (not in SDK) |
| mosaic-layout | MIT | template (not in SDK) |