πŸš€ Project Overview

CrossPlatformLogin demonstrates the power of writing Swift code once and deploying it natively on both iOS and Android platforms. The app features a modern, polished login interface with social authentication options, built using SwiftUI for iOS and automatically transpiled to Jetpack Compose for Android via Skip.

license
Code Fusion Bit

Screenshot πŸ–ΌοΈ

✨ Key Features

  • 🎨 Beautiful UI Design – Modern, consistent design across platforms
  • πŸ“± Native Performance – True native performance on both iOS and Android
  • πŸ” Authentication System – Email/password and social login options
  • ⚑ Real-time Validation – Form validation and loading states
  • πŸŒ“ Theme Support – Light/dark mode compatibility
  • πŸ“Š Data Management – CRUD operations with local persistence

πŸ—οΈ Architecture

Tech Stack

  • Language: Swift 5.9+
  • UI Framework: SwiftUI (iOS) β†’ Jetpack Compose (Android via Skip)
  • Cross-Platform: Skip Framework
  • State Management: SwiftUI @State, @Observable
  • Navigation: NavigationStack with routing
  • Data Persistence: JSON file storage

Project Structure

CrossPlatformLogin/
β”œβ”€β”€ Sources/
β”‚   └── CrossPlatformLogin/
β”‚       β”œβ”€β”€ CrossPlatformLoginApp.swift    # Main app entry point
β”‚       β”œβ”€β”€ RootViewRouter.swift           # Navigation routing
β”‚       β”œβ”€β”€ LoginView.swift                # Authentication UI
β”‚       β”œβ”€β”€ ContentView.swift              # Main app content
β”‚       └── ViewModel.swift                # Data management
β”œβ”€β”€ Tests/
β”œβ”€β”€ Package.swift                          # Swift Package configuration
└── README.md

πŸ› οΈ Prerequisites

Before getting started, ensure you have:

  • macOS 14+ with Xcode 16
  • Android Studio 2025 (for Android development)
  • Homebrew package manager
  • Android Emulator configured and running

βš™οΈ Installation & Setup

1. Install Skip Framework

# Install Skip CLI via Homebrew (Recommended)
brew install skiptools/skip/skip

# Alternative: Direct installation (if Homebrew not available)
curl -L https://source.skip.tools/install.sh | bash

# Upgrade to latest version
skip upgrade

# Install Android SDK tools
skip android sdk install

# Verify installation (may take time on first run)
skip checkup --native

# Check Skip version
skip --version

2. Create New Project (Optional – for new projects)

# Create a new Skip cross-platform project
skip init --native-app --open-xcode --appid=com.yourcompany.CrossPlatformLogin cross-platform-login CrossPlatformLogin

# This command will:
# - Create project structure
# - Configure iOS and Android targets  
# - Set up Skip transpilation
# - Automatically open in Xcode

3. Clone & Setup Existing Project

# Clone the repository
git clone https://github.com/codefusionbitllp/cross-platform-login.git
cd CrossPlatformLogin

# Resolve Swift package dependencies
swift package resolve

# Open in Xcode
open CrossPlatformLogin.xcworkspace

πŸš€ Running the Application

Development Mode

  1. Start Android Emulator via Android Studio
  2. Open Xcode and select iOS simulator target
  3. Build & Run (Cmd+R) – App launches on both platforms simultaneously!

Platform-Specific Testing

# iOS only (Xcode)
- Select iOS Simulator target
- Press Cmd+R

# Android only (Skip)
skip android run

# Both platforms
skip run --all-platforms

πŸ“¦ Build & Export

iOS Build

# Debug build
xcodebuild -scheme CrossPlatformLogin -configuration Debug

# Release build for App Store
xcodebuild -scheme CrossPlatformLogin -configuration Release archive

# Export IPA for distribution
xcodebuild -exportArchive -archivePath "CrossPlatformLogin.xcarchive" -exportPath "Export/" -exportOptionsPlist "ExportOptions.plist"

Android Build

# Debug APK
skip android build --debug

# Release APK
skip android build --release

# Android App Bundle (for Play Store)
skip android bundle --release

Skip Export Commands

# Export for iOS App Store
skip export ios --release

# Export for Google Play Store  
skip export android --release

# Export both platforms
skip export --all-platforms --release

# Export with specific configurations
skip export ios --configuration Release --destination "Export/iOS/"
skip export android --configuration Release --destination "Export/Android/"

Export Locations

  • iOS Archive: Build/Products/Release-iphoneos/
  • iOS IPA: Export/iOS/
  • Android APK: Android/app/build/outputs/apk/
  • Android Bundle: Android/app/build/outputs/bundle/
  • Skip Exports: Export/ directory

πŸ” Authentication System

Demo Credentials

For testing purposes, use:

  • Email: demo@example.com or any valid email format
  • Password: password123 or any password (6+ characters)

Authentication Flow

// Email validation
email.contains("@") && email.contains(".")

// Password validation  
password.count >= 6

// Social login simulation
handleSocialLogin("Apple" | "Google")

Security Features

  • Input validation and sanitization
  • Secure field for password entry
  • Loading states during authentication
  • Error handling for invalid credentials

πŸ“ Directory Structure

CrossPlatformLogin/
β”œβ”€β”€ πŸ“± Sources/CrossPlatformLogin/
β”‚   β”œβ”€β”€ 🎯 CrossPlatformLoginApp.swift     # App delegate & lifecycle
β”‚   β”œβ”€β”€ 🧭 RootViewRouter.swift            # Navigation & routing logic
β”‚   β”œβ”€β”€ πŸ” LoginView.swift                 # Authentication interface
β”‚   β”œβ”€β”€ πŸ“‹ ContentView.swift               # Main app content (tabs)
β”‚   └── πŸ’Ύ ViewModel.swift                 # Data models & persistence
β”œβ”€β”€ πŸ§ͺ Tests/CrossPlatformLoginTests/
β”œβ”€β”€ πŸ“¦ Package.swift                       # Dependencies & configuration
β”œβ”€β”€ 🎨 Resources/                          # Images, icons, assets
└── πŸ“š Documentation/

🎨 UI Components

Custom Components

  • LoginView – Beautiful authentication interface
  • SocialLoginButton – Reusable social auth buttons
  • PlatformHeartView – Cross-platform component demo
  • ItemListView – CRUD operations with SwiftUI List

Design System

  • Colors: Primary blue, accent purple/pink gradients
  • Typography: SF Pro (iOS), Roboto (Android)
  • Spacing: Consistent 8px grid system
  • Corner Radius: 10px fields, 12px buttons

🏒 Company Information

Β© 2025 CodeFusion Bit LLP. All rights reserved.

  • Website: https://www.codefusionbit.com
  • Contact: info@codefusionbit.com
  • Specialization: Cross-platform mobile app development
  • Technologies: Swift, SwiftUI, Skip Framework, Flutter, TypeScript, Next.js, Django, and cross-platform development for iOS & Android.
  • Technical Project Manager / Team Lead / Developer: Hitesh Sapra (@saprahits)

About CodeFusion Bit

CodeFusion Bit LLP is a leading mobile app development company specializing in innovative cross-platform solutions. We leverage cutting-edge technologies like Skip Framework to deliver truly native experiences across iOS and Android platforms from a single Swift codebase.

πŸ“‹ Development Notes

Platform-Specific Considerations

// Platform detection
#if os(Android)
    // Android-specific code
#else
    // iOS-specific code  
#endif

// Custom extensions for cross-platform compatibility
extension View {
    func platformPadding() -> some View {
        // Different padding for iOS vs Android
    }
}

Skip Framework Benefits

  • βœ… Single Codebase – Write Swift, run everywhere
  • βœ… Native Performance – No bridge overhead
  • βœ… Native UI – SwiftUI β†’ Jetpack Compose
  • βœ… Hot Reload – Fast development iteration
  • βœ… Package Ecosystem – Access to Swift packages

πŸ“š Documentation & Resources

Official Skip Documentation

Helpful Links

🀝 Contributing & Acknowledgments

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request