talmantel / CheapTripAndroid

0 stars 3 forks source link

Develop the iOS version of the application #25

Open denis-luttcev opened 3 years ago

denis-luttcev commented 3 years ago

Reason: reusing shared code.

Implementation:

1) see Kotlin for Cross-Platform Mobile Development for details about multiplatform development and target platform-specific implementation 2) see Kotlin Multiplatform for iOS Developers for setting Xcode and working with a KMM project for iOS 3) see 'Create your first multiplatform application' tutorial for acquaintance with an example of KMM application

Specific steps:

The shared (cross-platform) codebase covers the Model (data classes and repositories) and ViewModel (UX logic and retained application state) levels; infrastructure and payload. Therefore, next need to implement the main UI controller in iosApp module and dependency injection. If possible, try to adhere to the approved design and UI logic implemented on the Android side.

Special attention: examine the implementation AutoCompleteTextView.setup() in MainActivity class on the Android side. This method contain more UI/UX logic than we would like. Particularly, asking for matching options for auto-completion, filtering character input, handling errors with matching values, and interacting with the ViewModel level are here.

Resources: application resources (strings and images) related to the model and UI classes are allocated in the shared module. Use Moko-resources library's instruments for access to them.