Skip to content

Commit bae09cf

Browse files
committed
Replace Fastlane with Shell scripts
1 parent d1bee65 commit bae09cf

19 files changed

+406
-111
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
# These are supported funding model platforms
2-
31
github: [danielsaidi]
4-
patreon: # Replace with a single Patreon username
5-
open_collective: # Replace with a single Open Collective username
6-
ko_fi: # Replace with a single Ko-fi username
7-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
liberapay: # Replace with a single Liberapay username
10-
issuehunt: # Replace with a single IssueHunt username
11-
otechie: # Replace with a single Otechie username
12-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/build.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,16 @@ on:
88
branches: ["main"]
99
pull_request:
1010
branches: ["main"]
11-
12-
env:
13-
SCHEME: WebViewKit
1411

1512
jobs:
1613
build:
17-
runs-on: macos-13
14+
runs-on: macos-15
1815
steps:
1916
- uses: actions/checkout@v3
2017
- uses: maxim-lobanov/setup-xcode@v1
2118
with:
22-
xcode-version: '15.1.0'
23-
- name: Build iOS
24-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=iOS';
25-
- name: Build macOS
26-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=OS X';
27-
- name: Build tvOS
28-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=tvOS';
29-
- name: Build watchOS
30-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=watchOS';
31-
- name: Build visionOS
32-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=xrOS';
19+
xcode-version: '16.0'
20+
- name: Build all platforms
21+
run: bash scripts/build.sh ${{ github.event.repository.name }}
3322
- name: Test iOS
34-
run: xcodebuild test -scheme $SCHEME -derivedDataPath .build -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2' -enableCodeCoverage YES;
23+
run: bash scripts/test.sh ${{ github.event.repository.name }}

.github/workflows/docc.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,23 @@ jobs:
2424
environment:
2525
name: github-pages
2626
url: ${{ steps.deployment.outputs.page_url }}
27-
runs-on: macos-13
27+
runs-on: macos-15
2828
steps:
2929
- name: Checkout
3030
uses: actions/checkout@v3
3131
- id: pages
3232
name: Setup Pages
3333
uses: actions/configure-pages@v4
34-
- name: Select Xcode 15.1
34+
- name: Select Xcode version
3535
uses: maxim-lobanov/setup-xcode@v1
3636
with:
37-
xcode-version: '15.1.0'
37+
xcode-version: '16.0'
3838
- name: Build DocC
39-
run: |
40-
swift package resolve;
41-
42-
xcodebuild docbuild -scheme WebViewKit -derivedDataPath /tmp/docbuild -destination 'generic/platform=iOS';
43-
44-
$(xcrun --find docc) process-archive \
45-
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/WebViewKit.doccarchive \
46-
--output-path docs \
47-
--hosting-base-path 'WebViewKit';
48-
49-
echo "<script>window.location.href += \"/documentation/webviewkit\"</script>" > docs/index.html;
50-
39+
run: bash scripts/docc.sh ${{ github.event.repository.name }}
5140
- name: Upload artifact
5241
uses: actions/upload-pages-artifact@v3
5342
with:
54-
path: 'docs'
43+
path: '.build/docs'
5544
- id: deployment
5645
name: Deploy to GitHub Pages
5746
uses: actions/deploy-pages@v4

Fastlane/Fastfile

Lines changed: 0 additions & 51 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<p align="center">
2-
<img src ="Resources/Logo_GitHub.png" alt="WebViewKit Logo" title="WebViewKit" />
2+
<img src ="Resources/Logo_Rounded.png" alt="WebViewKit Logo" title="WebViewKit" />
33
</p>
44

55
<p align="center">
66
<img src="https://img.shields.io/github/v/release/danielsaidi/WebViewKit?color=%2300550&sort=semver" alt="Version" />
7-
<img src="https://img.shields.io/badge/Swift-5.9-orange.svg" alt="Swift 5.9" title="Version" />
7+
<img src="https://img.shields.io/badge/Swift-6.0-orange.svg" alt="Swift 6.0" title="Version" />
88
<img src="https://img.shields.io/badge/platform-SwiftUI-blue.svg" alt="Swift UI" title="Swift UI" />
99
<img src="https://img.shields.io/github/license/danielsaidi/WebViewKit" alt="MIT License" title="MIT License" />
1010
<a href="https://twitter.com/danielsaidi">
@@ -19,15 +19,13 @@
1919

2020
## About WebViewKit
2121

22-
WebViewKit is a Swift SDK that adds a `WebView` and a `SafariWebView` to `SwiftUI`.
23-
24-
The web view can be used to display web sites in your apps, for instance like this:
22+
WebViewKit is a SwiftUI SDK that adds a `WebView` and a `SafariWebView` to `SwiftUI`, that can be used to embed web content and present web sites in your apps:
2523

2624
<p align="center" style="border-radius: 80px; outline: 4px solid white; outline-offset: -4px">
2725
<img src ="Resources/Demo.gif" width="300" />
2826
</p>
2927

30-
The ``WebView`` can load any url and be configured to fit your needs. There's also a ``SafariWebView`` for more basic needs.
28+
The ``WebView`` component supports iOS, macOS, & visionOS, and can be configured to fit your needs, while the iOS exclusive ``SafariWebView`` can be used for more basic needs and a more browser-like experience.
3129

3230

3331

@@ -57,21 +55,19 @@ struct MyView {
5755
}
5856
```
5957

60-
The URL can point to any regular web site, but also to local web pages in your app bundle. There's also an iOS only ``SafariWebView``, which has less configuration support and standard toolbars surrounding the web browser.
61-
62-
For more information, please see the [getting started guide][Getting-Started].
58+
See the online [getting started guide][Getting-Started] for more information.
6359

6460

6561

6662
## Documentation
6763

68-
The [online documentation][Documentation] has more information, articles, code examples, etc.
64+
The online [documentation][Documentation] has more information, articles, code examples, etc.
6965

7066

7167

7268
## Demo Application
7369

74-
The demo app lets you explore the library. To try it out, just open and run the `Demo` project.
70+
The `Demo` folder has an app that lets you explore the library.
7571

7672

7773

File renamed without changes.

Sources/WebViewKit/Documentation.docc/WebViewKit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ WebViewKit is a Swift SDK that adds a `WebView` to `SwiftUI`.
88

99
![WebViewKit logo](Logo.png)
1010

11-
WebViewKit is a Swift SDK that adds a ``WebView`` to `SwiftUI`, that can be used to display web sites in your apps.
11+
WebViewKit is a SwiftUI SDK that adds a ``WebView`` and a ``SafariWebView`` to SwiftUI, that can be used to embed web content and present web sites in your apps.
1212

13-
The ``WebView`` can load any url and be configured to fit your needs. There's also a ``SafariWebView`` for basic needs.
13+
The ``WebView`` component supports iOS, macOS, & visionOS, and can be configured to fit your needs, while the iOS exclusive ``SafariWebView`` can be used for more basic needs and a more browser-like experience.
1414

1515

1616

Version

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/build.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
# Documentation:
4+
# This script builds a <TARGET> for all supported platforms.
5+
6+
# Exit immediately if a command exits with a non-zero status
7+
set -e
8+
9+
# Verify that all required arguments are provided
10+
if [ $# -eq 0 ]; then
11+
echo "Error: This script requires exactly one argument"
12+
echo "Usage: $0 <TARGET>"
13+
exit 1
14+
fi
15+
16+
# Create local argument variables.
17+
TARGET=$1
18+
19+
# Use the script folder to refer to other scripts.
20+
FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
21+
SCRIPT="$FOLDER/build_platform.sh"
22+
23+
# Make the script executable
24+
chmod +x $SCRIPT
25+
26+
# A function that builds a specific platform
27+
build_platform() {
28+
local platform=$1
29+
echo "Building for $platform..."
30+
if ! bash $SCRIPT $TARGET $platform; then
31+
echo "Failed to build $platform"
32+
return 1
33+
fi
34+
echo "Successfully built $platform"
35+
}
36+
37+
# Array of platforms to build
38+
platforms=("iOS" "macOS" "tvOS" "watchOS" "xrOS")
39+
40+
# Loop through platforms and build
41+
for platform in "${platforms[@]}"; do
42+
if ! build_platform "$platform"; then
43+
exit 1
44+
fi
45+
done
46+
47+
echo "All platforms built successfully!"

scripts/build_platform.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Documentation:
4+
# This script builds a <TARGET> for a specific <PLATFORM>.
5+
6+
# Verify that all required arguments are provided
7+
if [ $# -ne 2 ]; then
8+
echo "Error: This script requires exactly two arguments"
9+
echo "Usage: $0 <TARGET> <PLATFORM>"
10+
exit 1
11+
fi
12+
13+
TARGET=$1
14+
PLATFORM=$2
15+
16+
xcodebuild -scheme $TARGET -derivedDataPath .build -destination generic/platform=$PLATFORM

0 commit comments

Comments
 (0)