Robert Munro
10/10/2022, 12:04 PMdomainKmm
class LoginUseCase {
sealed class State {
object Initial : State()
object StartAuthorization : State()
object AuthorizationTokenReceived : State()
object AccessTokenReceived : State()
object SuppliersLoading : State()
data class SuppliersLoaded(val suppliers: List<Supplier>) : State()
data class ConfirmSupplierChange(val chosenSupplier: Supplier, val currentSupplier: Supplier) : State()
data class SupplierLoadError(val e: Throwable) : State()
object NoSupplier : State()
data class LoggedInSuccess(val isNewSupplier: Boolean) : State()
}
}
So i can use DomainKmmLoginUseCase
and DomainKmmLoginUseCase.State
but i cant use DomainKmmLoginUseCase.State.Initial
I cant find any declaration of things like Initial
or StartAuthorization
in the generated iOS header file.
is there any guidance on using sealed classes in iOS? i've seen they dont really map to swift well - but havent been able to find any usage examples.Akram Bensalem
10/10/2022, 3:41 PMspierce7
10/10/2022, 4:40 PMno
10/10/2022, 4:54 PM:arrow-optics:compileKotlinIosX64
Invalid device: iPhone 12
Invalid device: iPhone 12
Invalid device: iPhone 12
Does it mean that I have an iPhone 12 connected but I require some other version? Does it mean that it is looking for an iPhone 12 but couldn't find it?itnoles
10/11/2022, 3:19 AMDaniele B
10/11/2022, 10:48 AMcolintheshots
10/11/2022, 9:08 PMJustin Xu
10/12/2022, 2:59 AMThe 'java' plugin has been applied, but it is not compatible with the Android plugins.
. Is there a better way to have a single client/server app in kmm mobile?darkmoon_uk
10/12/2022, 5:49 AM1.11.0
, due to the arbitrary decision from Cocoapods to make it a hard requirement to have a LANG
environment variable set.
• Here is a tracking issue in Cocoapods repo, requesting this requirement be stepped-back
• I've also raised a youtrack YouTrack issue to hopefully restore compatibility with latest Cocoapods.Pablo
10/12/2022, 9:08 AMTower Guidev2
10/12/2022, 9:13 AMSeb Jachec
10/12/2022, 1:59 PM(arm64) could not find object file symbol for symbol ...
after changing version. Seems like most relate to iOS code written in Kotlin, or 3rd party dependencies (Okio, SQLDelight, Koin, Apollo, NSExceptionKt).Neil
10/12/2022, 3:46 PMService
and the iOS equivalent to keep an app running in the background with UI closed?Lucas
10/13/2022, 1:11 AMGellért Biró
10/13/2022, 9:18 AMplatform.Network.NWConnection
to an actual
Kotlin class? I can see classes like platform.Network.nw_connection_t
but I am not sure they are the same.elect
10/13/2022, 10:38 AMclass DesignControllerTest {
@Nested
inner class DeleteDesign {
@Test
fun `design is removed from db`() {}
}
}
but @Nested
isn't available, it looks like it requires Junit5. However, JUnit is for JVM only, or?
Is there a way to nest test for all platforms?Natalia
10/13/2022, 2:47 PMtylerwilson
10/13/2022, 4:34 PMKieren Searle
10/13/2022, 7:32 PMIsaac Akakpo
10/13/2022, 10:38 PMelect
10/14/2022, 3:43 AMbuild
task:
tasks {
val generateCode by registering(GenerateCode::class)
kotlin.sourceSets.commonMain { kotlin.srcDir(generateCode.get().outputs.files) }
Joey
10/14/2022, 1:40 PM"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
This works fine in xCode, but in Android studio it points to my git repo that contains the project code, whereas xCode properly defines that as the directory in the derivedData. Is this perhaps an issue with how KMM builds the project when ran from Android Studio? As that for some reason $BUILD_DIR seems to have a different value when ran from the KMM buildSlava Kornienko
08/03/2022, 5:07 PMTop-level Android dependencies are not supported – please declare the dependencies for an individual source set.
And message from AppCode (doesn’t shows in gradle log)
Collection contains no element matching the predicate.
AppCode 2022.2
Build #OC-222.3345.144, built on August 2, 2022
com.jetbrains.appcode.android (222.3345.144)
com.intellij.appcode.kmm (222.3345.144)shahroz
10/15/2022, 2:25 PMBlake Anderson
10/16/2022, 8:12 PMmain
is always exported regardless.
• Within a package, @JsExport works as expected (making sure any identifiers included are not mangled). However, any function not referenced is not included. Functions that are referenced at the root level but not themselves exposed (likely because they aren't referenced?) are still included. Unlike the root level, main
is not exported.
In hindsight, it seems like the issue here is that functions are only included in the output if 1) they're referenced, or 2) they're the root main (rather than being an issue with @JsExport). Is this intended? How can I force the output to include these functions for the purpose of a library?lilypuchi
10/17/2022, 3:54 AMinterface FetchTalkUseCase {
suspend fun execute(talkID: String): Talk
}
When I use KMP-NativeCouroutines to generate native async methods, this interface generates the following header file
__attribute__((swift_name("FetchTalkUseCase")))
@protocol DomainFetchTalkUseCase
@required
/**
@note This method converts instances of CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeTalkID:(NSString *)talkID completionHandler:(void (^)(DomainTalk * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(talkID:completionHandler:)")));
- (DomainKotlinUnit *(^(^)(DomainKotlinUnit *(^)(DomainTalk *, DomainKotlinUnit *), DomainKotlinUnit *(^)(NSError *, DomainKotlinUnit *)))(void))executeNativeTalkID:(NSString *)talkID __attribute__((swift_name("executeNative(talkID:)")));
@end;
Which when I implement in Swift code is as Screenshot.
Is it working as intended? Can I restrict it to generate only the async
type ignoring the completionHandler one? 🙇Jeff Lockhart
10/17/2022, 6:25 AMinternal
API of moduleA in moduleB.
4. moduleA and moduleB produce unique published artifacts.
I considered adding moduleA as a dependency to moduleB with exclude
for dependencyA, but #3 isn't possible this way.
Next I considered adding *moduleA*'s source directories to *moduleB*'s such that the same source files would be compiled along with *moduleB*'s API additions. But I ran into this IDE restriction, where "duplicate content root" error causes the source directories to be removed from moduleB.
As a workaround, I've added symlinks from moduleB to *moduleA*'s source directories. While this seems to work, I'm not convinced this is the best way to achieve the goals listed above. Are there other project configuration options I could consider?Lukáš Kúšik
10/17/2022, 10:49 AMAdam Brown
10/18/2022, 2:49 AMMarkRS
10/18/2022, 10:57 AM