Skip navigation
Some have asked why not develop it in SwiftUI? I actually love Swift in general.
0:00 / 0:44

Some have asked why not develop it in SwiftUI? I actually love Swift in general.

Nathan Walker

@wwwalkerrun3.9K followers

Visit on X
45 likesDownloadOriginal post

19,872 views

Some have asked why not develop it in SwiftUI? I actually love Swift in general. The reason I used NativeScript is because I plan to deploy this to Android foldables as well. Here it is on a Samsung Galaxy Z Fold3.

9 Comments

Comments from the original post on X (Twitter)

  • Vitaliy Podolskiy's profile picture

    @onlyapps_org

    @NativeScript NativeScript makes sense here because the hinge drives the product, not just the layout. I’d isolate fold-angle → audio parameters from the view layer and replay a recorded hinge trace in tests. Then Android sensor quirks cannot silently change the mix.

    3 likes

  • Nathan Walker's profile picture

    @wwwalkerrun

    @NativeScript Good call - right now, a per-platform hinge tracker normalizes UIHingeInteraction on iOS and TYPE_HINGE_ANGLE on Android into one reading, then a store maps angle > openness > reverb, tone and stereo width straight into the audio engine. Your trace-replay idea would work!

  • Rob Stadnick's profile picture

    @robstadnick

    @NativeScript This is the way

    3 likes

  • Julien Kermarec  💸's profile picture

    @JulienKermarec

    @NativeScript Can @NativeScript support iPhone Duo with native iOS TabBar / ToolBar ?

    2 likes

  • Nathan Walker's profile picture

    @wwwalkerrun

    @NativeScript Hey Julien, yes see this repo:

    4 likes

  • Julien Kermarec  💸's profile picture

    @JulienKermarec

    @NativeScript Oh nice, you are the author / creator of this plugin ? Why UIKit & not SwiftUI components ? Seems perfect for iPhone duo support, I hope it will be officially merged to NativeScript repo & docs 🤞

    1 like

  • Nathan Walker's profile picture

    @wwwalkerrun

    @NativeScript This may help explain

  • ❀ Sof r's profile picture

    @itslily61

    @NativeScript Cross-platform often means losing platform-specific feel. Does NativeScript match SwiftUI's gesture handling on foldables?

    1 like

  • Nathan Walker's profile picture

    @wwwalkerrun

    Yes, NativeScript runs its JavaScript on the main thread, so a spring stepped by CADisplayLink in TypeScript does what SwiftUI's animations do: each frame's value is computed in the app process and committed to the layer. Nothing goes through the render server. See this side-by-side showing the same interruptible interactions and also this gist for deeper explanation:

    8 likes