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

iOS Native App #6

Closed
adesugbaa opened this issue May 26, 2021 · 10 comments
Closed

iOS Native App #6

adesugbaa opened this issue May 26, 2021 · 10 comments

Comments

@adesugbaa
Copy link

Thanks for this project - I love the idea of the business logic and view models in the Kotloin shared layer.

I am concerned about the iOS application - it does not feel like a native application due to the navigation style being employed. There are no animations. Is this by design? Can we use this architecture with the regular iOS Navigation, so it feels completely native?

@dbaroncelli
Copy link
Owner

dbaroncelli commented May 26, 2021

It could be easily solved by setting up the same iOS animation of the iOS Navigation. I am just not expert with iOS animations. Someone with experience in iOS animations can fix this.
I have also tried wrapping the SwiftUI navigation, but I couldn't find a proper way, as SwiftUI NavigationLink is a dreadful piece of software. Let's hope that at the new WWDC, in a couple of weeks time, there will be upgrades to NavigationLink and SwiftUI navigation in general, so that it can be easier to wrap the native iOS navigation.
Generally speaking, SwiftUI navigation is very limited and can get very messy when projects get complex. A shared navigation can make things very easy on bigger multiplatform projects. D-KMP is also providing multiple/vertical backstacks (i.e. remembering the deepest backstack entry in the previously selected level1/bottombar item), which natively on SwiftUI doesn't exist.

@dbaroncelli
Copy link
Owner

dbaroncelli commented May 28, 2021

I actually found a solution, to use native SwiftUI navigation!
It achieved that by keeping a map of all active NavigationLinks.
I should be able to publish the update within a week.

@adesugbaa
Copy link
Author

This is great to hear. Will look forward to the update - hopefully I can help with the iOS refinements...

@adesugbaa
Copy link
Author

Hi. How are you? Any progress on the code?

@dbaroncelli
Copy link
Owner

Hi @adesugbaa, it took more time than expected. I am still refining. Hopefully I will be able to publish the update this week.

@dbaroncelli
Copy link
Owner

I am currently blocked by an issue on Compose beta08:
https://issuetracker.google.com/issues/190795684

I will have to solve this, before publishing the new version

@dbaroncelli
Copy link
Owner

I read the issue will be fixed in Compose beta09, which will be released next week.
So I should release the new version then.

@dbaroncelli
Copy link
Owner

I am trying to put all together now with the Desktop and Web version too, but it's still not ready.
For the time being, writing shared code that is optimised for 4 different platforms (Android, iOS, Desktop, Web) presents several challenges. I still trying to understand a few things.
I am planning to publish the next update when I am happy with overall result, but as it looks now, it might take some time.

@dbaroncelli
Copy link
Owner

dbaroncelli commented Jun 25, 2021

Hi @adesugbaa, I have finally managed to publish the update.
Now the iOS app is using NavigationLink under the hood, so native animation occurs when navigating to a new screen. Give me some feedback when you get the chance to try.
I have also published the Desktop app.

@adesugbaa
Copy link
Author

Thanks @dbaroncelli. I will test and provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants