11The ` fairtool ` is a cross-platform (Linux & macOS) command-line utility for
22managing an ecosystem of apps.
33It is powered by the Fair package, which is a zero-dependency
4- cross-platform (Linux, macOS, & iOS) set of Swift 5.6 modules.
4+ cross-platform (Linux, macOS, & iOS) set of Swift 5 modules.
55
66The Fair package is used to create and maintain app distribution networks such as
7- [ appfair.net] ( https://appfair.net ) , as well as the end-user applications
8- that utilize them such as the [ App Fair.app] ( https://appfair.app ) .
9-
10- - [ fairtool] ( #fairtool )
11- - [ Installation] ( #fairtool )
12- - [ Display app info] ( #fairtool-app-info-fileapp )
13- - [ JSON Output] ( #fairtool-json-output )
14- - [ Creating an App Source Catalog] ( #fairtool-source-create )
15- - [ Verifying an App against a Source Catalog] ( #fairtool-source-verify )
16- - [ Fair Swift Modules] ( #fair-swift-modules )
17- - [ FairCore] ( #faircore )
18- - [ FairApp] ( #fairapp )
19- - [ FairExpo] ( #fairexpo )
20- - [ FairKit] ( #fairkit )
21- - [ Swift Package Manager] ( #swift-package-manager )
22- - [ Roadmap] ( #roadmap )
7+ [ appfair.org] ( https://appfair.org ) .
238
249## fairtool
2510
2611The functionality of the ` Fair ` module can best be illustrated by the
2712capabilities of the ` fairtool ` , which is a command-line utility for
28- macOS (12+) and Linux. The easiest way to get started with the
29- utility for [ Homebrew] ( https://brew.sh ) users is to run the commands:
30-
31- ``` shell
32- % brew install fair-ground/tool/fairtool
33-
34- ==> Tapping fair-ground/tool
35- ==> Downloading https://github.com/fair-ground/Fair/releases/download/0.4.51/fai
36- ==> Installing fairtool from fair-ground/tool
37- ==> Pouring fairtool-0.4.51.arm64_monterey.bottle.tar.gz
38- 🍺 /opt/homebrew/Cellar/fairtool/0.4.51: 6 files, 10.4MB
39-
40- % fairtool version
41-
42- fairtool 0.4.51
43- ```
44-
45- Alternatively, if you have a Swift 5.6 compiler installed,
46- you can build and run from the source:
47-
48- ``` shell
49- % git clone https://github.com/fair-ground/Fair.git
50-
51- Cloning into ' Fair' ...
52- remote: Enumerating objects: 43471, done.
53- remote: Counting objects: 100% (4455/4455), done.
54- remote: Compressing objects: 100% (525/525), done.
55- remote: Total 43471 (delta 3755), reused 4454 (delta 3754), pack-reused 39016
56- Receiving objects: 100% (43471/43471), 12.90 MiB | 13.17 MiB/s, done.
57- Resolving deltas: 100% (39783/39783), done.
58-
59- % cd Fair
60-
61- % swift run fairtool version
62-
63- Building for debugging...
64- [61/61] Linking fairtool
65- Build complete! (9.94s)
66-
67- fairtool 0.4.52
68- ```
13+ macOS (15+) and Linux.
6914
7015### fairtool artifact info _ file_ .app
7116
@@ -356,7 +301,6 @@ An example of the catalog output is as follows:
356301 }
357302 ]
358303}
359-
360304```
361305
362306#### Default properties for source create
@@ -457,7 +401,6 @@ sources of metadata.
457401 }
458402 ]
459403}
460-
461404```
462405
463406
@@ -510,24 +453,6 @@ would look like:
510453]
511454```
512455
513-
514- #### App Source Catalog
515-
516- The format of the catalog and the meaning of the various properties is described
517- at [ https://appfair.net/#app-source-catalog ] ( https://appfair.net/#app-source-catalog ) .
518-
519-
520- ### fairtool online
521-
522- An experimental web service with a subset of the
523- fairtool's functionality is available at:
524- [ https://fairtool.herokuapp.com ] ( https://fairtool.herokuapp.com ) .
525-
526- This service can be used to inspect the properties of ` .app ` ` .zip ` and ` .ipa `
527- URLs online, as well as generate default catalog entries for
528- application artifacts.
529-
530-
531456## Fair Swift Modules
532457
533458The ` fairtool ` is powered by the ` Fair ` package, which is a
@@ -546,22 +471,6 @@ FairCore also contains utilities for
546471and
547472[ XML parsing] ( https://fair-ground.github.io/Fair/documentation/faircore/xmlnode ) .
548473
549- See the [ documentation for FairCore] ( https://fair-ground.github.io/Fair/documentation/faircore/ ) .
550-
551- ### FairApp
552-
553- The ` FairApp ` module contains the necessary functionality for
554- building and distributing an app on a fair ground such as
555- [ appfair.net] ( https://appfair.net ) . ` FairApp ` depends on ` FairCore ` .
556-
557- Important types are
558- [ AppCatalog] ( https://fair-ground.github.io/Fair/documentation/fairapp/appcatalog ) ,
559- which is a serialized form of the [ App Source Catalog] ( #app-source-catalog ) format,
560- [ AppBundle] ( https://fair-ground.github.io/Fair/documentation/fairapp/appbundle ) ,
561- which is an abstraction of the packing of an iOS or macOS app.
562-
563- See the [ documentation for FairApp] ( https://fair-ground.github.io/Fair/documentation/fairapp/ ) .
564-
565474### FairExpo
566475
567476The ` FairExpo ` module provides a cross-platform set of networking
@@ -572,55 +481,32 @@ getting metadata from the
572481and creating and verifying App Source catalogs with the
573482[ https://fair-ground.github.io/Fair/documentation/fairexpo/appcatalogapi ] ( AppCatalogAPI ) .
574483
575- ` FairExpo ` depends on ` FairApp ` .
484+ ` FairExpo ` depends on ` FairCore ` .
576485
577- See the [ documentation for FairExpo] ( https://fair-ground.github.io/Fair/documentation/fairexpo/ ) .
578-
579- ### FairKit
580-
581- The ` FairKit ` module contains optional SwiftUI Views and enhancements,
582- such as a SwiftUI [ WebView] ( https://fair-ground.github.io/Fair/documentation/fairkit/webview ) .
583-
584- ` FairKit ` depends on ` FairApp ` .
585-
586- See the [ documentation for FairKit] ( https://fair-ground.github.io/Fair/documentation/fairkit/ ) .
587-
588-
589486## Swift Package Manager
590487
591488In order to add the Fair module to an existing package named "App",
592489
593490
594491``` swift
595- // swift-tools-version: 5.6
596- // The swift-tools-version declares the minimum version of Swift required to build this package.
597-
492+ // swift-tools-version: 5.10
598493import PackageDescription
599494
600495let package = Package (
601496 name : " App" ,
602- platforms : [ .macOS (.v12 ), .iOS (.v15 ) ],
497+ platforms : [ .macOS (.v15 ), .iOS (.v17 ) ],
603498 products : [
604- // Products define the executables and libraries a package produces, and make them visible to other packages.
605- .library (
606- name : " App" ,
607- targets : [" App" ]),
499+ .library (name : " App" , targets : [" App" ]),
608500 ],
609501 dependencies : [
610- // Dependencies declare other packages that this package depends on.
611- // .package(url: /* package url */, from: "1.0.0"),
612- .package (url : " https://github.com/fair-ground/Fair" , from : " 0.5.0" ),
502+ .package (url : " https://github.com/appfair/Fair" , " 0.9.0" ..< " 2.0.0" ),
613503 ],
614504 targets : [
615505 .target (name : " App" , dependencies : [
616- // platform-native support for Fair apps (macOS, iOS, Linux)
617- .product (name : " FairApp" , package : " Fair" ),
618- // low-level data structures and utilities (macOS, iOS, Linux)
506+ // low-level data structures and utilities
619507 .product (name : " FairCore" , package : " Fair" ),
620- // optional networking utilities (macOS, iOS, Linux)
508+ // optional catalog utilities
621509 .product (name : " FairExpo" , package : " Fair" ),
622- // optional SwiftUI enhancements (macOS, iOS)
623- .product (name : " FairKit" , package : " Fair" ),
624510 ]),
625511 .testTarget (name : " AppTests" , dependencies : [" App" ]),
626512 ]
0 commit comments