๐Ÿš€ 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