Zephyr Weather now supports macOS via Mac Catalyst, including macOS-native widget functionality in Notification Center.
- ✅ Full macOS Catalyst support
- ✅ macOS widgets in Notification Center
- ✅ Native macOS window sizing and behavior
- ✅ App Sandbox for Mac App Store distribution
- ✅ Shared App Group data between app and widgets on macOS
- ✅ Native macOS two-column layout with sidebar and detail view
- ✅ Location search accessible from sidebar
- ✅ Settings accessible from sidebar
- ✅ Optimized for mouse/trackpad navigation
- macOS 13.0 or later (for development)
- Xcode 14.0 or later
- Mac with Apple Silicon or Intel processor
- CocoaPods installed (
sudo gem install cocoapods) - Node.js 18+ and npm/yarn
# Install npm dependencies
npm install
# Install iOS/macOS Pods
cd ios
pod install
cd ..Option A: Using Xcode
-
Open the workspace:
open ios/ZephyrWeather.xcworkspace
-
In Xcode's toolbar, select:
- Scheme:
ZephyrWeather - Destination:
My Mac (Designed for iPad)
- Scheme:
-
Click Run (⌘R) or Product → Run
Option B: Using React Native CLI
# Run on macOS Catalyst
npx react-native run-ios --scheme ZephyrWeather --destination "platform=macOS,variant=Mac Catalyst"- Run the Zephyr Weather app on macOS
- Add and configure your weather locations in the app
- Right-click on the desktop and select "Edit Widgets"
- Search for "Zephyr Weather"
- Drag the desired widget to Notification Center:
- Current Weather: Small, Medium, or Large sizes
- Daily Forecast: Medium, Large, or Extra Large sizes
-
Current Weather Widget
- Small: Temperature, condition icon, high/low temps
- Medium: Expanded current conditions
- Large: Full details with humidity, wind, feels-like, and hourly forecast
-
Daily Forecast Widget
- Medium: 4-day horizontal forecast
- Large: 7-day vertical forecast with temperature bars
- Extra Large (macOS only): Full 7-day forecast with enhanced spacing
Widgets can be configured to show different locations:
- Right-click on a widget in Notification Center
- Select "Edit Widget"
- Choose from your saved locations
The macOS version features a native desktop layout inspired by macOS Weather:
Left Sidebar (200px):
- Search bar at the top for quick location search
- List of all saved locations with:
- Location name
- "Home" badge for current location
- Current time
- Large temperature display
- Current weather condition
- High/Low temperatures
- Settings button at the bottom
Main Detail View:
- Full weather information for the selected location
- Location name displayed in the top-right corner with "HOME" badge
- Current conditions, hourly forecast, daily forecast
- All Open Settings (via sidebar button)
- Click location in sidebar to switch
- ⌘F: Search locations (when search is focuslity, wind, humidity, etc.)
- Seamless navigation without tab bar
This layout provides a more natural desktop experience optimized for larger screens and pointer devices.
The app window is configured with sensible size constraints:
- Minimum size: 400×600 pixels
- Maximum size: 1200×900 pixels
- Resizable and movable
The macOS version runs in the App Sandbox with the following entitlements:
- Network client access (for weather data)
- Location services (for current location)
- App Groups (for widget data sharing)
Standard macOS keyboard shortcuts work:
- ⌘Q: Quit
- ⌘W: Close window
- ⌘,: Settings (when implemented)
Key files modified for Catalyst support:
ios/Podfile: Mac Catalyst enabledios/ZephyrWeather.xcodeproj/project.pbxproj: Catalyst build settingsios/ZephyrWeather/Info.plist: macOS compatibility keysios/ZephyrWeather/AppDelegate.mm: macOS window configurationsrc/screens/MacOSHomeScreen.tsx: macOS two-column layoutsrc/components/LocationSidebar.tsx: Sidebar component for macOSsrc/utils/platformDetect.ts: Platform detection utilitysrc/navigation/RootNavigator.tsx: Conditional navigation for macOSios/ZephyrWeather/ZephyrWeather.entitlements: App Sandbox entitlementsios/ZephyrWeatherWidgets/*.swift: macOS widget family support
Key build settings for Mac Catalyst:
SUPPORTS_MACCATALYST = YESDERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YESTARGETED_DEVICE_FAMILY = "1,2,6"(iPhone, iPad, Mac)- iOS Deployment Target: 13.4+
To debug the macOS version:
- Open Xcode
- Select "My Mac (Designed for iPad)" as destination
- Set breakpoints in Swift/Objective-C code
- For JavaScript debugging, use Chrome DevTools or React Native Debugger
To debug widgets on macOS:
- Select the
ZephyrWeatherWidgetsExtensionscheme in Xcode - Run on "My Mac (Designed for iPad)"
- When prompted, choose "Zephyr Weather" as the host app
- The widget will launch in a preview window
If you encounter pod installation errors:
cd ios
rm -rf Pods Podfile.lock
pod cache clean --all
pod install
cd ..If widgets don't show updated data:
- Force quit the Zephyr Weather app
- Remove and re-add the widget
- Refresh weather data in the main app
- Check that App Group entitlements match in both targets
Common build issues and solutions:
Error: "Building for Mac Catalyst, but the linked library '...' was built for iOS"
- Solution: Run
pod installagain with the updated Podfile
Error: "Code signing entitlements are not compatible"
- Solution: Ensure entitlements files include App Sandbox keys
Error: "Library not loaded"
- Solution: Clean build folder (⌘⇧K) and rebuild
To distribute on the Mac App Store:
- Configure signing in Xcode with Mac App Store distribution profile
- Ensure all entitlements are properly configured
- Archive the app (Product → Archive)
- Submit via App Store Connect
For direct distribution outside the Mac App Store:
- Sign with Developer ID certificate
- Notarize the app with Apple
- Staple the notarization ticket
- Distribute as DMG or PKG
The app uses TARGET_OS_MACCATALYST macro to detect macOS at runtime:
#if TARGET_OS_MACCATALYST
// macOS-specific code
#else
// iOS-specific code
#endifIn Swift:
#if targetEnvironment(macCatalyst)
// macOS-specific code
#endifIn React Native JavaScript, Platform.OS returns 'ios' for Mac Catalyst, which is correct since the app uses UIKit.
- Some iOS-specific gestures may not work exactly as on touchscreen devices
- The app is optimized for mouse/trackpad instead of touch
- Some third-party React Native libraries may not be fully compatible with Catalyst
- Location services require explicit user permission on macOS
For issues specific to the macOS version, please include:
- macOS version
- Xcode version
- Build logs
- Steps to reproduce the issue