Skip to content

koin in iOS module #171

Description

@bbetter

I'm stuck with the issue while using koin in ios in the common module.

KClass for Objective-C classes is not supported yet

It's not for kampkit, but it's heavily based on your codebase

What's wrong with koin injection here?

actual val platformModule = module {
    try {
        single { NSUserDefaults(suiteName = "TTR") }
    }
    catch (ex: Exception){
        NSLog("%s", ex.message)
    }

    try {
        single<Storage> { StorageImpl(get()) }
    }
    catch (ex: Exception){
        NSLog("%s", ex.message)
    }

    try {
        single<UUIDGenerator> { UUIDGeneratorImpl() }
    }
    catch (ex: Exception){
        NSLog("%s", ex.message)
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions