Skip to content

Commit 00556b0

Browse files
committed
feat: update iOS templates to use UIScene lifecycle
- Add iOS build CI workflow to verify UIScene configuration - Update documentation with iOS Requirements section - Update CHANGELOG Requires updated template bundles from BrickHub after VeryGoodOpenSource/very_good_templates#416 is merged. Closes #1436
1 parent eb44516 commit 00556b0

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

.github/workflows/ios_build.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: iOS Build Verification
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "lib/src/commands/create/templates/**"
7+
push:
8+
branches: [main]
9+
paths:
10+
- "lib/src/commands/create/templates/**"
11+
12+
jobs:
13+
ios-build:
14+
runs-on: macos-latest
15+
strategy:
16+
matrix:
17+
template:
18+
- very_good_core
19+
- very_good_flame_game
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: subosito/flutter-action@v2
24+
with:
25+
flutter-version: "3.38.x"
26+
channel: stable
27+
28+
- name: Install Dependencies
29+
run: dart pub get
30+
31+
- name: Generate Test Project
32+
run: |
33+
if [ "${{ matrix.template }}" = "very_good_core" ]; then
34+
dart run bin/very_good.dart create flutter_app test_app --template core -o /tmp
35+
else
36+
dart run bin/very_good.dart create flutter_app test_app --template ${{ matrix.template }} -o /tmp
37+
fi
38+
39+
- name: Build iOS (no-codesign)
40+
working-directory: /tmp/test_app
41+
run: flutter build ios --no-codesign --debug
42+
43+
- name: Verify UIScene Configuration
44+
run: |
45+
echo "Checking for UIApplicationSceneManifest in Info.plist..."
46+
grep -q "UIApplicationSceneManifest" /tmp/test_app/ios/Runner/Info.plist || (echo "FAILED: UIApplicationSceneManifest not found" && exit 1)
47+
48+
echo "Checking for SceneDelegate.swift..."
49+
test -f /tmp/test_app/ios/Runner/SceneDelegate.swift || (echo "FAILED: SceneDelegate.swift not found" && exit 1)
50+
51+
echo "Checking for @main in AppDelegate.swift..."
52+
grep -q "@main" /tmp/test_app/ios/Runner/AppDelegate.swift || (echo "FAILED: @main not found in AppDelegate.swift" && exit 1)
53+
54+
echo "Checking for FlutterImplicitEngineDelegate in AppDelegate.swift..."
55+
grep -q "FlutterImplicitEngineDelegate" /tmp/test_app/ios/Runner/AppDelegate.swift || (echo "FAILED: FlutterImplicitEngineDelegate not found" && exit 1)
56+
57+
echo "All UIScene configuration checks passed!"

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Features
6+
7+
* update iOS templates to use UIScene lifecycle for Flutter 3.38+ ([#1436](https://github.com/VeryGoodOpenSource/very_good_cli/issues/1436))
8+
9+
### Continuous Integration
10+
11+
* add iOS build verification workflow ([#1436](https://github.com/VeryGoodOpenSource/very_good_cli/issues/1436))
12+
313
## [0.28.0](https://github.com/VeryGoodOpenSource/very_good_cli/compare/v0.27.0...v0.28.0) (2025-10-03)
414

515

site/docs/templates/core.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,29 @@ When you create a new project, it has a default launcher icon. To customize this
262262

263263
3. Verify the icon has been replaced by running your app using `flutter run`.
264264

265+
## iOS Requirements 🍏
266+
267+
Very Good Core uses Apple's UIScene lifecycle, which is required for all UIKit apps built with iOS 26+ SDK. This ensures your app is future-proof and follows Apple's current platform guidance.
268+
269+
### Requirements
270+
271+
- **Flutter**: 3.38.0 or later
272+
- **Xcode**: 15.0 or later
273+
274+
### UIScene Architecture
275+
276+
The generated iOS project includes:
277+
278+
- **`SceneDelegate.swift`** - Extends `FlutterSceneDelegate` to handle scene lifecycle events
279+
- **`AppDelegate.swift`** - Implements `FlutterImplicitEngineDelegate` for plugin registration
280+
- **`Info.plist`** - Contains `UIApplicationSceneManifest` configuration
281+
282+
This architecture follows [Flutter's official UIScene migration guide][flutter_uiscene_migration].
283+
284+
:::note
285+
If you're migrating an existing project to the UIScene lifecycle, refer to [Flutter's breaking changes documentation][flutter_uiscene_migration].
286+
:::
287+
265288
[android_application_element]: https://developer.android.com/guide/topics/manifest/application-element
266289
[android_configuration_qualifiers]: https://developer.android.com/guide/topics/resources/providing-resources#AlternativeResources
267290
[bloc_pub]: https://pub.dev/packages/bloc
@@ -279,5 +302,6 @@ When you create a new project, it has a default launcher icon. To customize this
279302
[material_design_product_icons]: https://material.io/design/iconography/
280303
[sentry_link]: https://sentry.io
281304
[very_good_coverage]: https://github.com/marketplace/actions/very-good-coverage
305+
[flutter_uiscene_migration]: https://docs.flutter.dev/release/breaking-changes/ios-flutterviewcontroller-scenedelegate
282306
[vga]: https://github.com/VeryGoodOpenSource/very_good_analysis
283307
[vgv]: https://verygood.ventures

0 commit comments

Comments
 (0)