CrossUI Kit - iOS/Swift Example
CrossUI Kit - iOS/Swift Example
SwiftUI implementation of CrossUI Kit showcasing native iOS theme integration and components.
Requirements
- Xcode 15.0 or later
- iOS 15.0 or later
- macOS for development
Project Structure
Sources/
CrossUIKitDemoApp.swift
- Main app entry point
Views/
ContentView.swift
- Main view implementation with theme demos
Features
Theme System
- Native iOS dark/light mode support
- System theme integration
- Real-time theme switching
- Theme persistence with UserDefaults
Components
- SwiftUI-native buttons
- Custom theme toggle
- Dynamic color palette demo
- Adaptive layout support
Building and Running
-
Open in Xcode:
cd swift-app xed .
Or open
Package.swift
in Xcode -
Configure:
- Select your development team
- Choose a target device/simulator
- Verify deployment target (iOS 15.0+)
-
Run:
- Press Cmd + R or click the Play button
- Select device/simulator if prompted
Testing Instructions
-
Theme Testing:
- Launch app on device/simulator
- Toggle between light/dark themes
- Test system theme integration
- Verify theme persistence
- Check theme change animations
-
Component Verification:
- Test button tap interactions
- Verify button style variants
- Check haptic feedback
- Test accessibility features
-
Layout Testing:
- Test on different device sizes
- Verify adaptive layout
- Check Dynamic Type support
- Test rotation handling
Development Notes
- Swift Package Manager for dependencies
- SwiftUI for modern UI implementation
- Combine for reactive updates
- Mock implementation for development
- Uses latest Swift concurrency features
Troubleshooting
-
Build Issues:
- Clean build folder (Cmd + Shift + K)
- Clean derived data
- Re-resolve packages
-
Runtime Problems:
- Check iOS version compatibility
- Verify simulator settings
- Reset simulator state if needed
-
SwiftUI Preview Issues:
- Restart Xcode
- Clear derived data
- Rebuild project