Skip to content

Integrate iOS App#3

Open
jewelboi14 wants to merge 7 commits intomainfrom
feature/kmp-ios-impl
Open

Integrate iOS App#3
jewelboi14 wants to merge 7 commits intomainfrom
feature/kmp-ios-impl

Conversation

@jewelboi14
Copy link
Collaborator

🎉 iOS Native Application Implementation

This PR implements a complete native iOS application for Drop KMP, bringing full feature parity with the Android app using SwiftUI and native iOS patterns.

📋 Overview

This implementation adds a fully functional iOS app that integrates seamlessly with the existing Kotlin Multiplatform shared module. The app includes all core features: file sending/receiving via QR codes, transfer history, and user profile management.

✨ What's New

🍎 Complete iOS UI Implementation

  • Home Screen - Central hub with navigation to all features
  • Send Feature - File selection, QR code generation, transfer progress, and completion
  • Receive Feature - QR code scanning, manual IP input, transfer tracking
  • History - View past transfers with file details
  • Profile Management - Edit user profile with avatar customization
  • About Screen - App information and settings

🎨 Design System

Created a comprehensive design system matching the Android app:

  • Color palette with semantic naming
  • Typography styles and hierarchy
  • Spacing tokens for consistent layouts
  • Reusable UI components library

🧩 UI Components

Built reusable components following iOS design patterns:

  • AvatarView - User avatar display with multiple options
  • DropButton - Primary action buttons
  • DropCard - Container component for content cards
  • EmptyStateView - Empty state handling
  • ErrorView - Error state display
  • LoadingView - Loading indicators
  • ProgressBar - Transfer progress visualization

🔗 Native Bridge Layer

Implemented a robust bridge between Swift/iOS APIs and Kotlin:

  • Objective-C Bridge (ArkDropBridge.h/m) - Native iOS API wrappers
  • Swift Bridge (ArkDropBridge.swift) - File operations, QR scanning, network utilities
  • Kotlin Wrapper (ArkDropBridgeWrapper.ios.kt) - C-interop integration
  • Full bidirectional communication between Swift UI and Kotlin business logic

📦 Shared Module Enhancements

Extended the Kotlin Multiplatform shared module with iOS-specific implementations:

Platform Helpers:

  • AvatarHelper.ios.kt - Avatar resource management
  • NetworkStatus.ios.kt - Network connectivity monitoring
  • PermissionsHelper.ios.kt - iOS permissions handling
  • ResourcesHelper.ios.kt - File system and resource access

Drop Protocol Implementations:

  • DropSendFilesBubbleImpl.ios.kt - Sender bubble
  • SenderFileDataImpl.ios.kt - File data handling for sending
  • SenderFilesSubscriberImpl.ios.kt - Send progress subscription
  • DropReceiveFilesBubbleImpl.ios.kt - Receiver bubble
  • DropReceiveFilesSubscriberImpl.ios.kt - Receive progress subscription

Dependency Injection:

  • KoinHelper.kt - iOS Koin initialization
  • KoinInitializer.kt - DI setup for Swift access
  • Enhanced PlatformModule.ios.kt

🏗️ Architecture

  • Core layer - App configuration, DI container, navigation coordinator
  • SKIE Integration - Improved Kotlin-to-Swift API generation
  • C-Interop - Native bridge communication via ArkDropBridge.def
  • Build automation - add_files_to_xcode.sh script for Xcode project management

Breakdown:

  • 29 new Swift files
  • 11 new Kotlin iOS implementations
  • 3 Objective-C bridge files
  • Updated build configuration and dependencies

🔧 Technical Details

Dependencies Added:

  • SKIE plugin for enhanced Swift interop
  • Updated Kotlin Multiplatform configuration
  • Swift package dependencies

Build Configuration:

  • Enhanced C-interop setup
  • iOS native target configuration
  • Xcode project updates

🚀 How to Test

  1. Open the Xcode project: iosApp/iosApp.xcodeproj
  2. Build and run on iOS simulator or device (iOS 14.0+)
  3. Test file sending by selecting files and generating QR code
  4. Test file receiving by scanning QR code or entering IP manually
  5. Verify transfers appear in history
  6. Test profile editing and avatar selection

📝 Notes

  • Full feature parity with Android application
  • Native iOS experience using SwiftUI and iOS design patterns
  • Production-ready with comprehensive error handling
  • Maintainable architecture with clear separation of concerns
  • Type-safe bridge layer between Swift and Kotlin

Please pay special attention to:

  • Native bridge implementation and memory management
  • Swift/Kotlin interop patterns
  • UI/UX consistency with Android app
  • Error handling and edge cases

mdrlzy and others added 4 commits January 24, 2026 02:53
- Added NSObject import from platform.darwin for iOS protocol implementations
- Fixed NSMutableData initialization for receive file buffer
- Added ExperimentalForeignApi opt-in annotations
- Fixed UInt/ULong type conversions in use cases
- Configured proper iosMain source set hierarchy in build.gradle.kts
- Added Java 17 configuration for Xcode builds
- Linked SystemConfiguration framework for network monitoring
- Implemented ArkDrop bridge wrapper for iOS
- Added send/receive file implementations for iOS
- Configured cinterop for Objective-C bridge
- Add .github/workflows/release-ios.yml (Testflight, same secrets as Rate-iOS)
- Add fastlane Fastfile, Appfile, Gemfile
- Add shared iosApp.xcscheme
- Update bundle ID to com.arkbuilders.Drop (from deprecated Drop-iOS)
- Update Release config: Team SQNXHTL7FT, manual signing

Co-authored-by: Cursor <cursoragent@cursor.com>
…ties

Gradle will use JAVA_HOME from environment (set by GitHub Actions)

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants