I've created the necessary files for Apple Watch support. To complete the setup, follow these steps in Xcode:
zaCalc2-watch Watch App/- Contains the watchOS app filesWatchResultsView.swift- Simplified results view for Apple WatchContentView.swift- Main watch app viewzaCalc2_Watch_AppApp.swift- Watch app entry pointCalculatorData.swift- Copy of shared data model- Info.plist is auto-generated by Xcode (GENERATE_INFOPLIST_FILE = YES)
-
Open the zaCalc2.xcodeproj in Xcode
-
Add watchOS Target:
- Select your project in the navigator
- Click the "+" button to add a new target
- Choose "watchOS" → "App"
- Name it "zaCalc2 Watch App"
- Make sure it's set to use SwiftUI
- Click "Finish"
-
Watch App Files:
- The watch app files are already in the "zaCalc2-watch Watch App" folder
- These files are automatically configured for the watch target
-
Configure Target Membership:
- Select
CalculatorData.swiftand make sure it's included in both iOS and watchOS targets - Make sure all watch app files are only in the watchOS target
- Select
-
Build and Run:
- Select "zaCalc2 Watch App" scheme
- Choose your Watch simulator
- Build and run
- Two-page interface optimized for Apple Watch
- Page-based navigation (swipe or use Digital Crown)
- Simplified layout with bold variable names on left, values right-aligned
- Automatically adapts to user's measurement unit preferences
Page 1 - Recipe Results:
- Total Dough Weight
- Ball Weight
- Total Flour
- Preferment information (for sourdough)
- Baker's Yeast amount (for baker's yeast)
- Water, Salt, Oil, Sugar amounts
Page 2 - Toppings:
- Pizza size and selected style
- Scaled topping amounts for current pizza size
- All toppings from the selected pizza style
- Scaling information (from reference size to actual size)
All values automatically use the same units (grams/ounces) as configured in the iOS app.