Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

feat: Remove iOS platform components to transition to Android-only application - #6

Merged
stanvx merged 11 commits into
mainfrom
feat/remove-ios-platform-components
Jul 27, 2025
Merged

feat: Remove iOS platform components to transition to Android-only application#6
stanvx merged 11 commits into
mainfrom
feat/remove-ios-platform-components

Conversation

@stanvx

@stanvx stanvx commented Jul 27, 2025

Copy link
Copy Markdown
Owner

Summary

This PR completes the iOS decommissioning work to transition Notely Capture from a Kotlin Multiplatform (Android + iOS) application to an Android-only application, as outlined in task-053.

Changes Made

Core iOS Platform Removal

  • Removed entire iosApp/ directory (173 files, ~56MB including Whisper.xcframework)
  • Updated build configurations:
    • shared/build.gradle.kts: Removed iOS targets (iosX64, iosArm64, iosSimulatorArm64)
    • core/audio/build.gradle.kts: Removed iOS framework configurations
    • Removed iOS C interop configurations for Whisper framework
  • Preserved expect/actual declarations with Android implementations intact

Documentation & Configuration Updates

  • Updated .gitattributes: Removed obsolete iOS merge rules for upstream sync compatibility
  • Updated README.md: Changed from "cross-platform" to "Android note-taking application"
  • Updated CLAUDE.md: Removed iOS build commands, development sections, and source set references
  • Updated Makefile: Platform description now reflects Android-only status

Code Cleanup & Simplification

  • Simplified onboarding system:
    • Removed iOS/Android platform conditionals from OnboardingWalkthrough.kt
    • Simplified OnboardingPage data class (removed iOSResources field)
    • Updated ModelSetupPage.kt to use Android-only resource selection
  • Resource cleanup: Removed 8 unused iOS onboarding images (.webp files)
  • Maintained functionality: All Android features working correctly

Testing & Validation

  • Android build successful: Project compiles and runs properly on Android
  • Upstream sync tested: ./upstream-sync.sh functionality verified and working
  • Code quality confirmed: All linting checks pass (ktlintCheck)
  • No regressions detected: Core functionality remains intact
  • Architecture preserved: Clean architecture layers maintained

Impact Assessment

Positive Impact

  • Reduced complexity: Simplified build system and development workflow
  • Smaller codebase: Removed ~56MB of iOS-specific files and dependencies
  • Android focus: Enables more focused Android optimizations
  • Maintained compatibility: Upstream sync functionality preserved

Breaking Changes

  • iOS support removed: Application no longer supports iOS platform
  • Build targets: iOS build targets no longer available

Related Tasks

  • Resolves task-053: Remove iOS platform components to transition to Android-only application
  • Implements doc-002: iOS Component Removal Audit recommendations

Deployment Notes

  • This change affects the build system but does not impact existing Android users
  • No migration required for Android installations
  • Release builds will be smaller due to removed iOS components

Future Considerations

  • Consider addressing the 18 security vulnerabilities detected by GitHub (separate task)
  • Potential for additional Android-specific optimizations now that iOS constraints are removed

stanvx added 9 commits July 20, 2025 07:01
- Resolved merge conflict in task-013 markdown file
- Preserved completed status and implementation notes from upstream
- Maintained quick record feature documentation and bug fixes
…plication

- Remove entire iosApp/ directory and all iOS-specific build artifacts
- Clean up shared/build.gradle.kts: remove iOS targets, source sets, and cinterop configurations
- Clean up core/audio/build.gradle.kts: remove iOS targets and framework configurations
- Remove iOS source directories: shared/src/iosMain/, core/audio/src/iosMain/, shared/src/iosTest/
- Remove nativeInterop directory containing iOS-specific cinterop definitions
- Verify all expect/actual declarations maintain Android implementations
- Confirm Android build functionality remains intact

This transformation aligns with the project's focus on Android development while
maintaining clean architecture and the ability to sync with upstream changes for
Android and common modules.

Implements: task-053
- Update .gitattributes to remove obsolete iOS merge rules
- Update README.md to reflect Android-only focus and remove iOS references
- Update CLAUDE.md to remove iOS build commands and development sections
- Update Makefile platform description to Android-only
- Simplify onboarding code by removing iOS platform conditionals
- Remove unused iOS onboarding images from drawable resources

This completes the iOS decommissioning work started in the previous commit,
ensuring all documentation and code properly reflects the Android-only
transition while maintaining upstream sync compatibility.

Related: task-053
@claude

claude Bot commented Jul 27, 2025

Copy link
Copy Markdown

Claude finished @stanvx's task —— View job


Kotlin Multiplatform PR Review ✅

Reviewed this major architectural transition from Kotlin Multiplatform to Android-only application.

Review Checklist

  • Analyze build configuration changes and target removal
  • Review code simplifications in onboarding system
  • Check for remaining iOS references or dead code
  • Verify Clean Architecture boundaries are maintained
  • Review Compose UI patterns and performance considerations
  • Examine dependency injection and expect/actual patterns
  • Check for potential security issues and bugs
  • Assess documentation accuracy and completeness

Excellent work! This PR successfully transitions to Android-only while maintaining clean architecture.

🎯 Key Strengths

Build Configuration

  • ✅ Clean removal of iOS targets from shared/build.gradle.kts and core/audio/build.gradle.kts
  • ✅ Preserved -Xexpected-actual-classes compiler flag for remaining platform abstractions
  • ✅ Maintained proper Android target configuration with JVM 17

Expect/Actual Pattern Usage

  • Well-structured abstractions: Platform.kt, StatusBarManager.kt, AudioRecorder.kt
  • Clean Android implementations: All expect declarations have proper actual implementations
  • No orphaned expectations: No iOS-specific expect declarations left behind

Code Quality & Architecture

  • Clean Architecture preserved: UI → Presentation → Domain → Data layers intact
  • Dependency injection properly maintained: Koin modules work correctly (audioModule.android.kt)
  • Onboarding simplification excellent: Removed iOS/Android conditionals while preserving tablet support
  • Resource management: Smart OnboardingResource sealed class pattern for platform-specific drawables

Compose UI & Performance

  • Efficient resource selection: OnboardingResource.forPlatform() pattern eliminates runtime checks
  • Proper state management: collectAsState() and LaunchedEffect usage is correct
  • Animation performance: Page indicators use animateDpAsState and animateColorAsState properly

Security & Validation

  • Comprehensive security testing: SecurityTests.kt covers XSS, path traversal, input validation
  • OWASP HTML Sanitizer: Properly integrated for rich text security
  • Input validation: Audio file validation, path sanitization, filename validation

🔍 Minor Observations

Documentation Cleanup Needed

  • ⚠️ CLAUDE.md:176,197,210,283,308,312,385 still contain iOS references
  • 💡 Recommendation: Update these to reflect Android-only status

Code Organization

  • OnboardingWalkthrough.kt:24 still imports getPlatform() but usage seems minimal
  • ✅ Platform state management is clean and well-structured

Performance Considerations

  • Audio processing: Amplitude flow pattern is well-designed for real-time audio
  • Memory management: Proper lifecycle handling in ViewModels
  • Resource loading: Efficient image resource selection without platform checks

🚀 Testing & Quality Assurance

Excellent Test Coverage

  • Security tests comprehensive: XSS prevention, path traversal, input validation
  • Audio validation: File extension validation, path sanitization
  • HTML sanitization: Proper OWASP integration testing

Coroutines & StateFlow

  • Proper scope usage: viewModelScope and rememberCoroutineScope() correctly used
  • Flow patterns: amplitudeFlow and state collection patterns are idiomatic
  • Effect handling: LaunchedEffect usage in ModelSetupPage.kt is correct

🎯 Summary

This is a high-quality PR that successfully removes iOS platform components while:

  • Maintaining clean architecture boundaries
  • Preserving all Android functionality
  • Implementing proper security measures
  • Following Kotlin Multiplatform best practices
  • Demonstrating excellent Compose UI patterns

The only minor issue is some outdated iOS references in documentation files, which should be updated in a follow-up commit.

Recommendation: ✅ Ready to merge after documentation cleanup.


stanvx added 2 commits July 27, 2025 20:19
- Fix platform context handling to enable proper tablet/landscape detection
- Add context-aware getPlatform() overload with proper DI integration
- Simplify UI components by removing unnecessary iOS platform conditionals
- Update documentation to reflect Android-focused approach
- Ensure BuildConfig.VERSION_NAME is used consistently

Resolves platform detection issues identified in PR review while
maintaining clean architecture and backward compatibility.
- Move constants in NoteListViewModel to companion object for better encapsulation
- Replace hard-coded resource selection in ModelSetupPage with sealed class pattern
- Add comprehensive unit tests for OnboardingViewModel covering state transitions
- Add comprehensive unit tests for PlatformViewModel covering platform operations
- Remove iOS references from GitHub workflow files

These changes address minor code quality suggestions from the automated PR review
while maintaining existing functionality and architectural patterns.
@stanvx
stanvx merged commit 6118d76 into main Jul 27, 2025
5 of 6 checks passed
@stanvx
stanvx deleted the feat/remove-ios-platform-components branch July 27, 2025 11:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant