코틀린 멀티플랫폼 Android & iOS 토치앱 만들기
개발/Kotlin2023. 9. 4. 19:56코틀린 멀티플랫폼 Android & iOS 토치앱 만들기

코틀린 멀티플랫폼을 통해 Android/iOS를 연구/개발하면서 슬슬 iOS Platform API를 통해 Native Feature를 다뤄봐야지라는 생각을 하였습니다. 사실 그전까지 안드로이드/데스크탑 위주의 코틀린 멀티플랫폼만을 만들기도 하였고 Swift는 다루지 못하기에 그동안 제한이 있었습니다. 그러다 지난 4월 Swift 공부를 하면서 간단하게나마 개발을 해보자는 생각을 하였고 무엇을 만들까 고민하다 토치(플래시)앱을 주제로 삼았습니다. 결과물 미리보기 Logic Share 범위 설정 우선 가장 먼저 고민한 부분은 토치 기능 뿐만이 아니라 UI까지 컴포즈 멀티플랫폼으로 구현할지, 아니면 UI를 제외한 토치 기능만 코틀린 멀티플랫폼으로 구현할지 고민하였습니다. UI를 제외한 공통된 로직(토치 기능..

RuntimeException - Shortly: The required symbol androidx.compose.runtime/remember
개발/Compose2023. 8. 7. 15:29RuntimeException - Shortly: The required symbol androidx.compose.runtime/remember

컴포즈 멀티플랫폼으로 개발하다보면 아래의 컴파일 오류를 만나는 경우가 있습니다. Shortly: The required symbol androidx.compose.runtime/remember|1835138394250687683[0] is missing in the module or module dependencies. This could happen if the required dependency is missing in the project. Or if there is a dependency that has a different version (without the required symbol) in the project than the version (with the required symbol) ..

ERROR: Compose targets '[uikit]' are experimental and may have bugs!
개발/Compose2023. 8. 1. 15:42ERROR: Compose targets '[uikit]' are experimental and may have bugs!

Compose Multiplatform을 처음 개발하면 다음과 같은 오류를 만나볼 수 있습니다. ERROR: Compose targets '[uikit]' are experimental and may have bugs! But, if you still want to use them, add to gradle.properties: org.jetbrains.compose.experimental.uikit.enabled=true 말 그대로 uikit을 대상으로 하는 컴포즈는 실험적이기에 많은 버그가 있다는 것을 의미합니다. 하지만 우리는 위험을 무릅쓰고 연구/사용을 할 것이기에 가볍게(?) 무시하고 강행하면 됩니다. 위의 오류에서도 설명은 나와있지만 이를 해결하는 방법은 간단합니다. gradle.propert..

Compose iOS: Undefined symbols for architecture arm64
개발/Compose2023. 5. 1. 17:09Compose iOS: Undefined symbols for architecture arm64

Compose Multiplatform을 통해 Compose iOS를 구현하는 경우 매우 높은 확률로 아래의 컴파일 오류를 만날 것 이다. 물론 아래의 시나리오 외에도 발생할 수 있지만 가장 크게 만날 수 있는 오류이다. Undefined symbols for architecture arm64: "_kfun:com.haeyum.crosscomposemobile#HomeScreen(){}", referenced from: _objc2kotlin_kfun:com.haeyum.crosscomposemobile#HomeScreen(){} in shared(result.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command fa..

Compose Android & iOS 통합 UI 연구...1
개발/개발 일기2023. 3. 29. 20:26Compose Android & iOS 통합 UI 연구...1

예전에 해커톤에서 만들었던 기능 중 화면 하나를 Compose로 만들어 보았습니다. (사실 귀차니즘으로 일부는 하드코딩 되어 있습니다) 그렇습니다. iOS에서의 UI도 Compose iOS로 구현되었습니다. UI는 컴포즈. API는 Ktor. 비동기는 Coroutine. iOS에서는 KMM에서 생성된 ComposeView를 draw 해준 것 외 작성된 swift 코드는 전혀 없습니다. (와!) import SwiftUI import shared struct ComposeView: UIViewControllerRepresentable { func makeUIViewController(context: Context) -> UIViewController { IosKt.MainViewController() } ..

넷플릭스에서도 사용하는 코틀린 멀티플랫폼에 대해 아시나요?
강좌2023. 3. 20. 06:55넷플릭스에서도 사용하는 코틀린 멀티플랫폼에 대해 아시나요?

코틀린 멀티플랫폼은 동일 코틀린 로직을 안드로이드, iOS, 웹, 데스크탑 등 여러 플랫폼에서 사용 가능합니다. 코틀린으로 작성된 코드는 각 플랫폼의 네이티브 코드로 컴파일되기 때문에, 같은 코드베이스를 사용해 여러 플랫폼에서 마치 크로스 플랫폼처럼 개발할 수 있습니다. 하지만 플러터와 다른 점은 네이티브의 역할을 침범하지 않으면서 공통 로직을 코틀린으로 개발할 수 있기에 네이티브 개발을 유지하면서 멀티플랫폼 개발이 가능하다는 점 입니다. 코틀린 멀티플랫폼이 무엇인지 그리고 예시 개발 모습을 보고 싶으시다면 아래의 유튜브에서 확인해보세요! (10분 요약하여 알려드립니다 😎😎😎) 혹시라도 아래의 영상 내용 및 외적으로 궁금하신 부분이 있으시다면 티스토리나 유튜브 댓글 남겨주시면 아는 내용에 한하여 답변 드..

image