Add a dependency on the shared module to your Android application You can learn more about the project structure. The wizard will create the Kotlin Multiplatform shared module, update the configuration files, and create files with classes that demonstrate the benefits of Kotlin Multiplatform. This is required for connecting the shared module to the iOS application. In the list of templates, select Kotlin Multiplatform Shared Module, enter the module name shared, and select the Regular framework in the list of iOS framework distribution options. In Android Studio, click File | New | New Module. Later you'll connect it to your existing Android application and your future iOS application. In your Android project, create a Kotlin Multiplatform shared module for your cross-platform code. The Kotlin Multiplatform plugin provides a special wizard for creating such modules. The cross-platform code that is used for both iOS and Android is stored in the shared module. Create a shared module for cross-platform code Your future iOS application will use the same logic, so you should make it cross-platform, as well. In your sample Android application, the business logic is stored in the package .data. The business logic is often the same for both Android and iOS, so it's a great candidate for reuse. A simple rule is: share what you want to reuse as much as possible. Run your cross-platform application on Android.ĭecide which code of your Android application is better to share for iOS and which to keep native. To make your application work on iOS, you'll first make your code cross-platform, and then you'll reuse your cross-platform code in a new iOS application.Ĭreate a shared module for cross-platform code.Īdd a dependency on the shared module to your Android application. To see the final state with the iOS application and the shared module, switch to the final branch. More features will be released gradually, stay tuned.The master branch contains the project's initial state - a simple Android application. Lock screen feature, supports gesture and PIN code unlocking, and also supports Touch ID and Face ID unlocking. Near-field transmission, allows file transfer between phones without consuming network data Network connectivity, supports FTP, SFTP, WebDAV, SMB, NFS and AList Cloud storage management, supports iCloud, Google Drive, Dropbox, OneDrive, Box, Baidu Netdisk and Alibaba Cloud Disk Scanner, supports scanning various documents and IDs QR code and barcode scanning and custom QR code generation Universal video player, supports m3u8 online playback, subtitle addition, channel switching, etc. Universal audio player, supports accelerated and decelerated playback Compression and decompression, supports almost all compression file formats such as rar, zip, 7z, lzma, tar, iso, tgz, txz, zstd, and also supports encrypted compression and file decryption Source code editor, supports over 100 programming languages and offers more than 80 selectable themes Comic reader, supports cbz and cbr file types Epub reader, supports various themes and text switching PDF reader, supports converting PDF pages to images Office document preview, supports Word, PPT, Excel, Pages, Keynote, Numbers, and other document formats Text editor, supports adjusting text size and offers hundreds of font options Image browser, supports JPG, JPEG, PNG, BMP, GIF, and other image formats File Manager - The best all-in-one file management app, chosen by over 100,000 users.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |