chore(ios): enable iOS builds and add a macOS CI job#169
Open
code418 wants to merge 2 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
8.0 → 15.0(project.pbxprojall three configs +AppFrameworkInfo.plist), required by the Firebase iOS SDK 12.14 pods thatfirebase_core4.x pulls in.ios/Podfile(platform :ios, '15.0'+post_installhook forcing every pod to iOS 15).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 Androidgoogle-services.json.AppDelegate.swiftand bumpSWIFT_VERSION 4.0 → 5.0(Swift 4 mode is deprecated on current Xcode).build-iosGitHub Actions job onmacos-latestrunningflutter build ios --release --no-codesign, plusworkflow_dispatchso 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-iosjob runs green on this PR (pod installresolves Firebase pods against iOS 15,flutter build ios --release --no-codesignlinksRunner.app).build(Ubuntu) job still passes — no regression to web/test/analyze.GoogleService-Info.plistis present in the built app bundle and itsBUNDLE_IDmatchescom.code418.postboxGame.🤖 Generated with Claude Code