Skip to content

chore(ios): enable iOS builds and add a macOS CI job#169

Open
code418 wants to merge 2 commits into
masterfrom
chore/ios-build-macos-ci
Open

chore(ios): enable iOS builds and add a macOS CI job#169
code418 wants to merge 2 commits into
masterfrom
chore/ios-build-macos-ci

Conversation

@code418

@code418 code418 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bump the iOS deployment target 8.0 → 15.0 (project.pbxproj all three configs + AppFrameworkInfo.plist), required by the Firebase iOS SDK 12.14 pods that firebase_core 4.x pulls in.
  • Add ios/Podfile (platform :ios, '15.0' + post_install hook forcing every pod to iOS 15).
  • Add ios/Runner/GoogleService-Info.plist (real config from the Firebase project) and wire it into the Runner target's Resources build phase — mirroring the already-committed Android google-services.json.
  • Modernise AppDelegate.swift and bump SWIFT_VERSION 4.0 → 5.0 (Swift 4 mode is deprecated on current Xcode).
  • Add a build-ios GitHub Actions job on macos-latest running flutter build ios --release --no-codesign, plus workflow_dispatch so it can be run on demand.

Why

The iOS side of the app was unbuildable against the current stack, and there is no Mac available to build it locally. The scaffold still carried the ancient Flutter template defaults (deployment target 8.0, Swift 4.0, pre-4.2 AppDelegate), so CocoaPods would have refused to install the Firebase 12.x pods. Wiring a macOS CI job is the only way to compile, and eventually sign/ship, an iOS build without owning a Mac. This PR gets the project to a green, unsigned iOS build; a paid Apple Developer account is only needed later for signing/TestFlight (steps stubbed in the workflow).

Test plan

  • build-ios job runs green on this PR (pod install resolves Firebase pods against iOS 15, flutter build ios --release --no-codesign links Runner.app).
  • Existing build (Ubuntu) job still passes — no regression to web/test/analyze.
  • GoogleService-Info.plist is present in the built app bundle and its BUNDLE_ID matches com.code418.postboxGame.

🤖 Generated with Claude Code

code418 and others added 2 commits July 6, 2026 20:22
The iOS scaffold could not build against the current stack. The
deployment target was still the ancient template default of 8.0, but
firebase_core 4.x pulls in Firebase iOS SDK 12.14, whose pods
hard-require iOS 15, so pod install would have refused. The Swift config
was likewise stuck on 4.0 with a pre-4.2 AppDelegate, a language mode
now deprecated on modern Xcode.

- bump IPHONEOS_DEPLOYMENT_TARGET (and AppFrameworkInfo MinimumOSVersion)
  from 8.0 to 15.0
- add a Podfile pinning platform :ios, '15.0' with a post_install hook
  that forces every pod to iOS 15
- add ios/Runner/GoogleService-Info.plist (real iOS config from the
  Firebase project) wired into the Runner target, mirroring how the
  Android google-services.json is already committed
- modernise AppDelegate.swift and bump SWIFT_VERSION to 5.0
- add a build-ios GitHub Actions job on macos-latest running
  flutter build ios --release --no-codesign, so the app can be built for
  iOS without owning a Mac

This proves the iOS toolchain end to end without a paid Apple Developer
account; signing and TestFlight steps are stubbed in the workflow for
later.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pubspec's `default-flavor: phone` (added so `flutter run` picks a flavor
given the three Android product flavours) is applied to every build,
including iOS. The iOS project only had the stock `Runner` scheme, so
`flutter build ios` looked for a non-existent `Phone` scheme and failed
with the misleading "does not define custom schemes / cannot use the
--flavor option" error before pod install even ran.

Mirror the Android `phone` flavour on iOS:
- add Debug/Profile/Release-phone build configurations (project + target)
- add a shared phone.xcscheme pointing at those configurations
- map the new configs to build types in the Podfile so CocoaPods links
  the right pod variant per configuration

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant