feat: add iOS platform and upgrade Capacitor to v8#333
feat: add iOS platform and upgrade Capacitor to v8#333theianjones wants to merge 1 commit intomainfrom
Conversation
- Upgrade @capacitor/core, @capacitor/cli, @capacitor/network, @capacitor/preferences from v7 to v8 - Add @capacitor/ios for iOS builds - Initialize iOS native project via `cap add ios` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughThis PR establishes a complete iOS app environment for the wodsmith-gameday application using Capacitor framework. It adds Xcode project configuration, Swift Package Manager setup, app lifecycle handlers, storyboard resources, and asset catalogs. The package.json is updated to upgrade Capacitor from v7 to v8 and introduce iOS platform support. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
apps/wodsmith-gameday/ios/App/App/Info.plist (2)
31-34: Consider removing outdatedarmv7device capability requirement.The
armv7architecture is 32-bit and was deprecated by Apple. iOS 11+ requires 64-bit devices only, and yourPackage.swifttargets iOS 15 which exclusively supportsarm64. This capability requirement is unnecessary and could be removed or replaced witharm64.📱 Suggested update
<key>UIRequiredDeviceCapabilities</key> <array> - <string>armv7</string> + <string>arm64</string> </array>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/wodsmith-gameday/ios/App/App/Info.plist` around lines 31 - 34, The Info.plist currently declares a UIRequiredDeviceCapabilities array containing the string "armv7", which is outdated for an app targeting iOS 15; remove the "armv7" entry (or replace it with "arm64" if you need to explicitly require 64-bit) so the UIRequiredDeviceCapabilities key no longer forces 32-bit-only devices; update the <key>UIRequiredDeviceCapabilities</key> array to either be removed entirely or to include "arm64" instead of "armv7".
1-50: Minor: Inconsistent indentation throughout the plist.The file mixes tabs and spaces for indentation (e.g., line 6 uses a tab, line 10 uses spaces). This is common in auto-generated plists and won't affect functionality, but could be normalized for consistency if desired.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/wodsmith-gameday/ios/App/App/Info.plist` around lines 1 - 50, The Info.plist mixes tabs and spaces for indentation (e.g., around keys like CAPACITOR_DEBUG and CFBundleDisplayName); normalize the file to use a single indentation style (prefer spaces) consistently throughout (all <key> / <string> / <array> blocks), either by running a plist/XML formatter or converting tabs to spaces in your editor and saving so entries like CAPACITOR_DEBUG, CFBundleDisplayName, CFBundleIdentifier, UISupportedInterfaceOrientations, etc. all follow the same indentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/wodsmith-gameday/package.json`:
- Around line 15-18: Add an "engines" field to package.json to require Node.js
22+ by inserting "engines": { "node": ">=22.0.0" } at the top-level of the
package manifest; update the package.json near the existing dependency list
(refer to the entries "@capacitor/core", "@capacitor/ios", "@capacitor/network",
"@capacitor/preferences") so npm/yarn enforces the Node version, and also
confirm the iOS Xcode project deployment target is set to 15.0 or higher to
match Capacitor v8 requirements.
---
Nitpick comments:
In `@apps/wodsmith-gameday/ios/App/App/Info.plist`:
- Around line 31-34: The Info.plist currently declares a
UIRequiredDeviceCapabilities array containing the string "armv7", which is
outdated for an app targeting iOS 15; remove the "armv7" entry (or replace it
with "arm64" if you need to explicitly require 64-bit) so the
UIRequiredDeviceCapabilities key no longer forces 32-bit-only devices; update
the <key>UIRequiredDeviceCapabilities</key> array to either be removed entirely
or to include "arm64" instead of "armv7".
- Around line 1-50: The Info.plist mixes tabs and spaces for indentation (e.g.,
around keys like CAPACITOR_DEBUG and CFBundleDisplayName); normalize the file to
use a single indentation style (prefer spaces) consistently throughout (all
<key> / <string> / <array> blocks), either by running a plist/XML formatter or
converting tabs to spaces in your editor and saving so entries like
CAPACITOR_DEBUG, CFBundleDisplayName, CFBundleIdentifier,
UISupportedInterfaceOrientations, etc. all follow the same indentation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8e2c5381-9d31-4b58-ab0e-3e96360e0d8d
⛔ Files ignored due to path filters (5)
apps/wodsmith-gameday/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.pngis excluded by!**/*.pngapps/wodsmith-gameday/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.pngis excluded by!**/*.pngapps/wodsmith-gameday/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.pngis excluded by!**/*.pngapps/wodsmith-gameday/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.pngis excluded by!**/*.pngpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (18)
apps/wodsmith-gameday/ios/.gitignoreapps/wodsmith-gameday/ios/App/App.xcodeproj/project.pbxprojapps/wodsmith-gameday/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedataapps/wodsmith-gameday/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistapps/wodsmith-gameday/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolvedapps/wodsmith-gameday/ios/App/App/AppDelegate.swiftapps/wodsmith-gameday/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.jsonapps/wodsmith-gameday/ios/App/App/Assets.xcassets/Contents.jsonapps/wodsmith-gameday/ios/App/App/Assets.xcassets/Splash.imageset/Contents.jsonapps/wodsmith-gameday/ios/App/App/Base.lproj/LaunchScreen.storyboardapps/wodsmith-gameday/ios/App/App/Base.lproj/Main.storyboardapps/wodsmith-gameday/ios/App/App/Info.plistapps/wodsmith-gameday/ios/App/CapApp-SPM/.gitignoreapps/wodsmith-gameday/ios/App/CapApp-SPM/Package.swiftapps/wodsmith-gameday/ios/App/CapApp-SPM/README.mdapps/wodsmith-gameday/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swiftapps/wodsmith-gameday/ios/debug.xcconfigapps/wodsmith-gameday/package.json
| "@capacitor/core": "^8.2.0", | ||
| "@capacitor/ios": "^8.2.0", | ||
| "@capacitor/network": "^8.0.1", | ||
| "@capacitor/preferences": "^8.0.1", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Capacitor v8 breaking changes from v7
💡 Result:
Key breaking changes when upgrading Capacitor v7 → v8 (core + official tooling/plugins):
-
Config
- iOS
appendUserAgentbug fix changes the resulting UA string (workaround: add a whitespace toios.appendUserAgentif you must preserve the old value). (capacitorjs.jp) android.adjustMarginsForEdgeToEdgeremoved (replaced by the new System Bars approach / CSS env vars). (capacitorjs.jp)
- iOS
-
CLI
- New iOS projects created by the CLI default to Swift Package Manager (SPM) templates (CocoaPods template requires
--packagemanager CocoaPods). (capacitorjs.jp)
- New iOS projects created by the CLI default to Swift Package Manager (SPM) templates (CocoaPods template requires
-
@capacitor/android
bridge_layout_main.xmlremoved; usecapacitor_bridge_layout_main.xmlinstead. (capacitorjs.jp)
-
@capacitor/ios
- Capacitor now emits
CAPBridgeViewControllernotifications forviewDidAppearandviewWillTransition; if you were emitting these via extensions, remove your custom emission to avoid duplication. (capacitorjs.jp)
- Capacitor now emits
-
Runtime/toolchain minimums
- Node.js 22+ required. (capacitorjs.jp)
- iOS: raise deployment target to iOS 15.0 (and update Podfile if using CocoaPods). (capacitorjs.jp)
- Android: update project mins (notably minSdkVersion 24, compile/targetSdkVersion 36) and update Gradle/AGP as per the guide. (capacitorjs.jp)
-
Official plugin behavior changes called out in the v8 guide
- Geolocation:
timeoutis applied more broadly; may need higher values;watchPositionon Android can use newinterval. (capacitorjs.jp) - Barcode Scanner / Screen Orientation: orientation locking options have no effect on large screens on Android 16+ (temporary manifest opt-out noted). (capacitorjs.jp)
- Status Bar: removal of iOS-side files that emitted certain events; listen from
@capacitor/iosinstead. (capacitorjs.jp)
- Geolocation:
Citations:
- 1: https://capacitorjs.jp/docs/updating/8-0
- 2: https://capacitorjs.jp/docs/updating/8-0
- 3: https://capacitorjs.jp/docs/updating/8-0
- 4: https://capacitorjs.jp/docs/updating/8-0
- 5: https://capacitorjs.jp/docs/updating/8-0
- 6: https://capacitorjs.jp/docs/updating/8-0
- 7: https://capacitorjs.jp/docs/updating/8-0
- 8: https://capacitorjs.jp/docs/updating/8-0
- 9: https://capacitorjs.jp/docs/updating/8-0
- 10: https://capacitorjs.jp/docs/updating/8-0
- 11: https://capacitorjs.jp/docs/updating/8-0
🏁 Script executed:
# Check package.json for engines field and full content
cat -n apps/wodsmith-gameday/package.jsonRepository: wodsmith/thewodapp
Length of output: 1309
🏁 Script executed:
# Look for capacitor.config.ts or similar
fd -t f "capacitor.config" apps/wodsmith-gameday/Repository: wodsmith/thewodapp
Length of output: 103
🏁 Script executed:
# Check for .nvmrc or Node.js version files
fd -t f -E node_modules "\.nvmrc|\.node-version" apps/wodsmith-gameday/ || echo "No .nvmrc/.node-version found"Repository: wodsmith/thewodapp
Length of output: 44
🏁 Script executed:
# Search for iOS and Android configuration files
find apps/wodsmith-gameday -type f \( -name "Podfile*" -o -name "build.gradle*" -o -name "*.plist" -o -name "AndroidManifest.xml" \) 2>/dev/null | head -20Repository: wodsmith/thewodapp
Length of output: 208
🏁 Script executed:
# Check capacitor.config.ts content
cat -n apps/wodsmith-gameday/capacitor.config.tsRepository: wodsmith/thewodapp
Length of output: 550
🏁 Script executed:
# Search for Android gradle files
fd -t f "build\.gradle" apps/wodsmith-gameday/Repository: wodsmith/thewodapp
Length of output: 44
🏁 Script executed:
# Check iOS project settings for deployment target
find apps/wodsmith-gameday/ios -name "project.pbxproj" -exec head -50 {} \; 2>/dev/null | head -50Repository: wodsmith/thewodapp
Length of output: 3705
🏁 Script executed:
# Check if there's documentation or CI config mentioning Node version
fd -t f -E node_modules "\.(github|gitlab|gitea)" apps/wodsmith-gameday/ 2>/dev/null || \
rg -l "node.*version|22\.0|nodejs" apps/wodsmith-gameday/ --type yaml --type json 2>/dev/null || echo "No Node version config found"Repository: wodsmith/thewodapp
Length of output: 44
🏁 Script executed:
# Check iOS deployment target in Info.plist
cat -n apps/wodsmith-gameday/ios/App/App/Info.plist 2>/dev/null | head -40Repository: wodsmith/thewodapp
Length of output: 1660
🏁 Script executed:
# Check if this is a web-only app or if Android exists
ls -la apps/wodsmith-gameday/ | grep -E "^d.*\s(ios|android)"Repository: wodsmith/thewodapp
Length of output: 115
🏁 Script executed:
# Search more broadly for any gradle or Android config
fd -t f "gradle|AndroidManifest" apps/wodsmith-gameday/ 2>/dev/null || echo "No Android gradle/manifest found"Repository: wodsmith/thewodapp
Length of output: 44
Add Node.js 22+ requirement to package.json.
Capacitor v8 requires Node.js 22+, but the package.json lacks an engines field to enforce this. Add "engines": { "node": ">=22.0.0" } to ensure developers use a compatible Node.js version. The dependency versions are correctly aligned at v8.x, and the iOS SPM setup is compatible with v8. Verify iOS deployment target is set to 15.0 or higher in the Xcode project if you haven't already.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/wodsmith-gameday/package.json` around lines 15 - 18, Add an "engines"
field to package.json to require Node.js 22+ by inserting "engines": { "node":
">=22.0.0" } at the top-level of the package manifest; update the package.json
near the existing dependency list (refer to the entries "@capacitor/core",
"@capacitor/ios", "@capacitor/network", "@capacitor/preferences") so npm/yarn
enforces the Node version, and also confirm the iOS Xcode project deployment
target is set to 15.0 or higher to match Capacitor v8 requirements.
Summary
core,cli,network,preferences) from v7 to v8@capacitor/iosfor iOS simulator/device buildsios/directory) viacap add iosTest plan
pnpm --filter wodsmith-gameday build && pnpm --filter wodsmith-gameday exec cap sync ioscap open ios) and build for simulator🤖 Generated with Claude Code
Summary by cubic
Upgrade Capacitor to v8 and add the iOS platform for
wodsmith-gameday. This enables building and running the app on iOS simulators and devices.Dependencies
@capacitor/core,@capacitor/cli,@capacitor/network,@capacitor/preferencesto v8.@capacitor/iosand generated the native iOS project underapps/wodsmith-gameday/ios.Migration
@capacitor/cliv8).pnpm --filter wodsmith-gameday build && pnpm --filter wodsmith-gameday exec cap sync ios, thencap open iosand build in Xcode.Written for commit 0303e2d. Summary will update on new commits.
Summary by CodeRabbit
New Features
Chores