conference-app-2019 icon indicating copy to clipboard operation
conference-app-2019 copied to clipboard

Implement :data:db for iOS instead of :data:db-room

Open kikuchy opened this issue 6 years ago β€’ 11 comments

Overview (Required)

  • In order to achieve #136, we should make iOS implementation (as Kotlin/Native module) of :data:db instead of :data:db-room .
  • Or make :data:db-room Kotlin Multiplatform module.
  • The role of :data:db-room is caching of Sessions, Speakers and Sponsers (maybe). iOS implementatuon can use NSUserDefaults to save data.

Links

  • https://developer.apple.com/documentation/foundation/nsuserdefaults

kikuchy avatar Jan 10 '19 13:01 kikuchy

Sorry, I think :data:db is now interface module. Is that :data:db-impl ?

takahirom avatar Jan 10 '19 17:01 takahirom

Sorry for my misleading.

Currently :data:db-room is Android implementation module of :data:db.
We need iOS implementation module of :data:db.

Of cource, renaming :data:db-room to :data:db-impl and including both Android/iOS implementation in :data:db-impl is good way.
(But I think it’s little hard. I tried to make :data:db-room Kotlin Multiplatform module, and it broke building :frontend. I can’t investigate why it cause yet. :cry: So I think making each implementation modules individually is good.)

kikuchy avatar Jan 11 '19 00:01 kikuchy

I have a question πŸ™‹β€β™‚οΈ How we debug iOS implementation for development?

takahirom avatar Jan 11 '19 02:01 takahirom

Debugging means testing?
I never tried testing iOS library written in Kotlin, but maybe this ( https://github.com/JetBrains/kotlin-mpp-example/pull/1 ) will help us.

If you mean "running app in DEBUG mode and stopping at breakpoint", we should make Xcode project of app ( maybe on frontend/ios ?) first.

kikuchy avatar Jan 11 '19 07:01 kikuchy

I think that it will be easier to contribute if we can create an empty frontend / ios project. What do you think?

takahirom avatar Jan 11 '19 07:01 takahirom

Good idea!
And making the direction of implementation of iOS app is more better.
What do you think about below?

  • Where should we place ViewControllers?
    • All VC is in frontend/ios
    • Each iOS Framework projects in feature/*
  • Where is the threshold of language?
    • Only Data modules -> Kotlin, Feature and Root modules -> Swift
    • Data and Feature modules -> Kotlin, Only Root module -> Swift

kikuchy avatar Jan 11 '19 08:01 kikuchy

Sorry, I don't have an idea. But I think we can implement All VC is in frontend/ios. Because that is Swift source code. I think Only Data modules are written in Kotlin for iOS. What do you think? πŸ‘€

takahirom avatar Jan 11 '19 08:01 takahirom

Perhaps, it might be useful? https://github.com/square/sqldelight

nukka123 avatar Jan 11 '19 12:01 nukka123

If we migrate that, Yes. It becomes 1.0. We can consider that πŸ‘

takahirom avatar Jan 11 '19 12:01 takahirom

I think Only Data modules are written in Kotlin for iOS.

Ok. I think it’s simple and understandable.
We need the template of Xcode project on this direction, and the issue to make that Xcode project... πŸ™„ I’ll open issue this weekend if I can...

kikuchy avatar Jan 11 '19 13:01 kikuchy

Opened https://github.com/DroidKaigi/conference-app-2019/issues/389 πŸŽ‰

kikuchy avatar Jan 12 '19 02:01 kikuchy