Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kikuchy opened this issue Jan 10, 2019 · 11 comments
Open

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

kikuchy opened this issue Jan 10, 2019 · 11 comments

Comments

@kikuchy
Copy link
Contributor

kikuchy commented Jan 10, 2019

Overview (Required)

  • In order to achieve Kotlin Multiplatform API implementation #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

@takahirom
Copy link
Member

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

@kikuchy
Copy link
Contributor Author

kikuchy commented Jan 11, 2019

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. 😢 So I think making each implementation modules individually is good.)

@takahirom
Copy link
Member

I have a question 🙋‍♂️
How we debug iOS implementation for development?

@kikuchy
Copy link
Contributor Author

kikuchy commented Jan 11, 2019

Debugging means testing?
I never tried testing iOS library written in Kotlin, but maybe this ( Kotlin/kmp-basic-sample#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.

@takahirom
Copy link
Member

takahirom commented Jan 11, 2019

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

@kikuchy
Copy link
Contributor Author

kikuchy commented Jan 11, 2019

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

@takahirom
Copy link
Member

takahirom commented Jan 11, 2019

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? 👀

@nukka123
Copy link
Contributor

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

@takahirom
Copy link
Member

If we migrate that, Yes.
It becomes 1.0. We can consider that 👍

@kikuchy
Copy link
Contributor Author

kikuchy commented Jan 11, 2019

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
Copy link
Contributor Author

kikuchy commented Jan 12, 2019

Opened #389 🎉

@takahirom takahirom unpinned this issue Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants