Mustafa Ozhan
01/19/2021, 2:39 PMrb90
01/19/2021, 3:28 PMMegan Teahan
01/19/2021, 7:51 PMdataSource
auth
umbrella
The auth module holds a common interface for an auth flow I want apps to follow. Because of issues I was having importing iOS frameworks into Kotlin, I was thinking of just creating a Swift Auth Module (I’m new to iOS development so I apologize if that’s not the right language) that would pull in the Kotlin auth framework and make an iOS implementation of that auth interface.
Then my client would pull in the umbrella framework created and also this Swift Auth module/framework.
Would this potentially collide because the Swift Auth Module is referencing one Kotlin Multiplatform framework and the client is also referencing the Kotlin umbrella framework? Or do people have other recommendations on how to tackle this?Jack Darlington
01/19/2021, 8:24 PMios()
cocoapods {
...
pod("Firebase/Auth", moduleName = "FirebaseAuth")
pod("Firebase/Firestore", moduleName = "FirebaseFirestore")
pod("FirebaseMessaging", moduleName = "FirebaseMessaging")
...
}
Is this normal?Jeff Lockhart
01/19/2021, 9:07 PM// commonMain
expect class FooClass : BarInterface {
fun fooFun()
}
interface BarInterface {
fun barFun()
}
// androidMain
actual typealias FooClass = FooImpl
class FooImpl {
fun fooFun() {}
fun barFun() {}
}
I get the error on `typealias FooClass`:
Actual typealias 'FooClass' has no corresponding expected declaration The following declaration is incompatible because some supertypes are missing in the actual declaration:
public final expect class FooClass : BarInterface defined in ...
FooImpl
is from a library, so it’s not a class I can modify. But I’m trying to simplify declaring the expect API, as there are several classes that have the same interface.Kishore
01/19/2021, 11:54 PMdates/times
, I'm currently using threeTenBP for both Android and Server.
I'm curious, what is the approach for dealing with DateTime
as its fairly complex with types ( LocalDate, LocalTime, LocalDateTime ) ?
Thanks!Lammert Westerhoff
01/20/2021, 11:42 AMDavid Hart
01/20/2021, 1:28 PMThread.currentThread()
from a Kotlin Mobile Multiplatform project to check that I am in the main thread, but it doesn't seem accessible. Are my missing something? Is there another way?zeugederunity
01/21/2021, 8:26 AMDavid Hart
01/21/2021, 1:03 PMMichal Klimczak
01/21/2021, 2:59 PMchi
01/21/2021, 5:08 PMEmil Kantis
01/22/2021, 11:03 AMFrancis Mariano
01/22/2021, 11:45 AMpod install
command, until here with no problem.
However when I build the code on Xcode I get the following message:
Link /Users/engenharia/Library/Developer/Xcode/DerivedData/iosApp-ebvxupurowfpqseswfpszjmhtudk/Build/Products/Debug-iphonesimulator/iosApp.app/iosApp
ld: framework not found SnapKit
Ok, so I thought is necessary to add also the cocoapods library in common code. I did that normally with:
kotlin("native.cocoapods")
ios()
cocoapods {
summary = "Test"
homepage = "me"
ios.deploymentTarget = "10.0"
pod("SnapKit", "~> 5.0")
}
Ok, all the tasks were executed with success. Again in xcode after the build the code I get a new error message:
> Task :shared:cinteropSnapKitIosX64 FAILED
Exception in thread "main" java.lang.Error: /var/folders/l8/vxy_yfbx3wz2z0q_r5068d2h0000gn/T/tmp3849060542759213327.m:1:9: fatal error: module 'SnapKit' not found
In according to the messahe the task shared:cinteropSnapKitIosX64 failed, but it is executed with success in Android Studio.Paul Dhaliwal
01/22/2021, 2:22 PMMegan Teahan
01/23/2021, 12:03 AMandroid
and source folders for androidMain
and androidTest
.Md Hanif
01/24/2021, 10:12 AMwilliam
01/24/2021, 4:34 PMwilliam
01/24/2021, 11:10 PMMichal Klimczak
01/25/2021, 8:42 AMMichal Klimczak
01/25/2021, 6:47 PMwuseal
01/26/2021, 7:34 AMwuseal
01/26/2021, 7:42 AMchi
01/26/2021, 8:40 PMwuseal
01/27/2021, 5:55 AMincludeBuild
my KMM project into a normal android project, I can't reference my KMM shared library class in commonMain, but I can reference androidMain's classes in KMM project's sharedLibrary, Need I do any config else for that? Bros🤔Daniele B
01/27/2021, 11:08 AMYaniv Sosnovsky
01/27/2021, 1:16 PMFrancis Mariano
01/27/2021, 6:50 PMiosArm32 {
binaries {
framework {
baseName = "shared"
}
}
}
After sync the gradle file the tasks to arm32 architecture were enabled. However, the task compileKotlinIosArm32 fails when executed.
I noted that the expect/actual was not resolved for shared.iosArm32Main (Create actual class for module shared.iosArm32Main)
Can any help me?Marko Novakovic
01/27/2021, 6:58 PMFrancis Mariano
01/27/2021, 8:21 PMdyld: Library not loaded: /usr/lib/libate.dylib
Referenced from: /private/var/containers/Bundle/Application/ED5BC0AF-C75B-4DF3-92F5-C7B62B0F6DF5/myapp.app/Frameworks/shared.framework/shared
Reason: image not found
My packForXCode task is default, but I replace target name to Arm32:
val targetName = "ios" + if (sdkName.startsWith("iphoneos")) "Arm32" else "X64"
I search about this problem and found the following issue on kotlin-native github https://github.com/JetBrains/kotlin-native/issues/2555 but I don't understand very well.
Again, I am new in iOS perspective and I am studying and learning very much with the community.
Can any help? Thank you
Edit: On simulator the build and running is okFrancis Mariano
01/27/2021, 8:21 PMdyld: Library not loaded: /usr/lib/libate.dylib
Referenced from: /private/var/containers/Bundle/Application/ED5BC0AF-C75B-4DF3-92F5-C7B62B0F6DF5/myapp.app/Frameworks/shared.framework/shared
Reason: image not found
My packForXCode task is default, but I replace target name to Arm32:
val targetName = "ios" + if (sdkName.startsWith("iphoneos")) "Arm32" else "X64"
I search about this problem and found the following issue on kotlin-native github https://github.com/JetBrains/kotlin-native/issues/2555 but I don't understand very well.
Again, I am new in iOS perspective and I am studying and learning very much with the community.
Can any help? Thank you
Edit: On simulator the build and running is okThomas Myrden
01/27/2021, 8:26 PMFrancis Mariano
01/27/2021, 8:27 PMThomas Myrden
01/27/2021, 8:28 PMFrancis Mariano
01/27/2021, 8:31 PMThomas Myrden
01/27/2021, 8:31 PMArtyom Degtyarev [JB]
01/28/2021, 7:48 AMlibate.dylib
presented in the ninth one. This is not the best source, but it made me think that maybe Kotlin/Native does not support some iOS version at the moment.
I’ve found this answer, telling that Apple added libate only with iOS 10. Not sure why Kotlin/Native framework depends on it, probably worth an issue at kotl.in/issue
Also there is a thread with some devices list, not sure how relevant is it:
https://stackoverflow.com/questions/41916922/which-ios-devices-dont-support-astc-texture-compressionFrancis Mariano
01/28/2021, 10:49 AM