badoo/Decompose

Add an iOS app for the Master-Detail sample

arkivanov opened this issue · 5 comments

The sample is here, would be good to add an iOS app for it using SwiftUI. Another SwiftUI iOS app can be found in the Counter sample, just for reference.

Hello, I'd like to try this one. I've already forked and made the it.

But I am uncertain about two things. Mostly related to the Framework/ build setup.

The build script has come to this (had to add the JVM version manually as it wouldn't build properly any other way)

cd "$SRCROOT" // This points to the XCode proj dir
cd ../../.. // So i'd have to go up the hierarchy to reach the shared module
./gradlew :sample:master-detail:shared:packForXCode -PXCODE_CONFIGURATION=${CONFIGURATION} -Dorg.gradle.java.home=//Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home

Would this pose a problem if submitted as is?

It doesn't seem to work on IPhone 8, something to do with the new lifecycle with the AppDelegates and Scene Delegates. The code isn't really related to the sample and it's more of a general IOS development issue with which I am not too familiar.

This is my first contribution ever, but the sample resembles the Jetbrains TODO sample and the approaches used there. It should also pretty readable and understandable. I haven't done anything for the multi-planes, should that be added?

WhatsApp Image 2021-06-15 at 12 59 00 PM
WhatsApp Image 2021-06-15 at 12 59 00 PM (1)

Hello @Nikola-Milovic, thanks for contributing to the project!

had to add the JVM version manually

I never specified JDK path in the script, usually JDK is already installed in the system and so used automatically. My build phase scripts are always without -Dorg.gradle.java.home parameter.

It doesn't seem to work on IPhone 8

Could you please elaborate? Is the problem specific to iPhone 8 only? What is the issue exatcly?

the sample resembles the Jetbrains TODO sample

This sample is specifically for dual-pane/single-pane adaptive layout demonstration. So I supposed it should run on both iPhone and iPad. The former should be single-pane (as on the screenshots), the latter should be dual-pane - so both list and details are on the same screen. The iOS app should call root.setMultiPane(false), and the iPad app should call ``root.setMultiPane(true)`.

Please feel free to ask any questions.

never specified JDK path in the script, usually JDK is already installed in the system and so used automatically.

After copying the Build setup from Counter sample, I resolved both this and the Iphone 8 issue. After testing on other Ipads and Iphones it seems that everything is working as intended.

Could you please elaborate? Is the problem specific to iPhone 8 only? What is the issue exatcly?

It was something to do with the app launch and the launch screen, some changes occurred in the newer versions of IOS or something along those lines. But as stated above, it's resolved.

Is there a need to differentiate screen orientations for the IOS with mutli-paning?

This is how Ipads look like now.
WhatsApp Image 2021-06-16 at 12 46 11 PM

Glad that all issues are resolved!

Is there a need to differentiate screen orientations for the IOS with mutli-paning?

No need, I think it's fine to just have single-pane for iPhone and dual-pane for iPad.

I will be happy to review a PR!

Closed via #168. Thanks for your contribution!