- 14
- 19 560
Joe Masilotti
United States
Registrace 24. 04. 2020
Turbo 8 and Turbo Native
Turbo 8 works out of the box with Turbo Native, on both iOS and Android
But there's a big gotcha. The latest releases of Turbo iOS and Turbo Android show a very noticeable flicker when changes are broadcasted.
Lucky for us there are already PRs to fix the issues on both platforms. So I put together an 8 minute video showing how to fix the issue in your Turbo Native apps.
But there's a big gotcha. The latest releases of Turbo iOS and Turbo Android show a very noticeable flicker when changes are broadcasted.
Lucky for us there are already PRs to fix the issues on both platforms. So I put together an 8 minute video showing how to fix the issue in your Turbo Native apps.
zhlédnutí: 1 406
Video
Daily Log code deep dive - Strada
zhlédnutí 998Před 4 měsíci
The second video in a series diving into the code of Daily Log, an open source Ruby on Rails and Turbo Native app. This video focuses on building native Swift components with Strada. I cover how to wire up a native button powered by HTML and a Stimulus controller.
Daily Log code deep dive - Authentication
zhlédnutí 1,4KPřed 4 měsíci
The first video in a series diving into the code of Daily Log, an open source Ruby on Rails and Turbo Native app. This video focuses on authentication which is powered by a single Rails controller concern. I cover how the concern securely persists cookies and how it's used in controllers to sign folks in and out. The second half of the video outlines how the Turbo Native iOS app uses this authe...
How to add SwiftUI views to Turbo Native apps
zhlédnutí 769Před 8 měsíci
A major advantage of Turbo Native is the ability to drop down to Swift when needed. You can interact with native APIs or even render your entire view with SwiftUI. Upgrading a web screen to native can add some polish to your app and make it feel a bit more at home on an iPhone. You also unlock some doors, like caching data for offline access and launching faster than a pure web-powered app. Thi...
JavaScript alerts in Turbo Native
zhlédnutí 617Před 10 měsíci
Learn how to add support for native JavaScript alerts like alert() and confirm() in your Turbo Native app. We'll also cover responding to data-turbo-confirm so you can render these entirely from your Rails app without any additional Swift code.
Turbo Native in 15 minutes
zhlédnutí 6KPřed 11 měsíci
Learn how to get up and running with Turbo Native on iOS in 15 minutes. All you need to get started is a free copy of Xcode downloaded from the App Store. I'll walk through adding the turbo-ios Swift package, wiring up a navigation controller, and handling link clicks. I also show how you can make your web content feel a little more at home on iOS. Want to learn more about Turbo Native? I wrote...
What about the frontend using VUE.js so turbo native still working?
Thank you Joe!
Does the backend need to be rails? Can it be spring mvc with java?
Technically, no. It can be anything that is running Turbo.js for navigation. But you'll jump through fewer hoops if you use Rails because Turbo Native was meant to be used with that framework.
@@joemasilotti thanks for your reply. If it could be backend agnostic it would be super awesome. Anyways, great work!
Just discovered turbo native through your presentation in Rails Conf. Thanks for this sharing
I learnt a lot from this, thanks Joe. Would love to watch a video on Strada when you have the time.
Hi, Joe, following exactly but getting this at 35:00: Class 'MainSessionNavHostFragment' is not abstract and does not implement abstract base class member public abstract val pathConfigurationLocation: TurboPathConfiguration.Location defined in dev.hotwire.turbo.session.TurboSessionNavHostFragment I have installed Android Studio today, maybe something has changed?
disappeared as soon as i added registeredFragments and registeredActivities
Really useful and clear - thank you!🙂
Excellent demo!! Thanks for sharing this information!
Can you share this example repo? Thank you
My reason for asking is that in attempting to add this to the Daily Log app that we worked through on the course - I'm getting lots of Action Cable errors. I'm convinced that I've missed some config and being able to compare might help highlight my error. Cheers.
Subscribe to my newsletter for access to the Rails, iOS, and Android codebase: masilotti.com/newsletter/
This is a fantastic demo 😍
Thank you!
Cool!
:D
I set notifications for this and then I missed it. I was cooking and realised afterwards, grrrr 😂
Ha, oh no! Definitely check out the chat when you watch the replay - there are a ton of links that I referenced.
@@joemasilottiThanks for the reply, I did watch and definitely found a lot of useful information 🙂
Is there a way to get the links that were added to the live chat?
It takes a little while for CZcams to process the live chat replay. Once that's done all the links will appear!
Chat with all the links are now live!
Awesome video! Super helpful hearing your thought process and seeing your code thanks for putting out this rails content
This is one of the downsides with Strada that I hoped would be solved, you still have to know a little bit of Swift / Java to still being able to build for the mobile devices.
For sure, you still have to build the native component, well, natively. And I don't think there's a way around that.
If only Strada could work with something like Dart @@joemasilotti
Really enjoyed a lot! Thankyou❤
Glad to hear it!
Another excellent video
Thanks for the example! Curious why you are using a separate link at the bottom of the page, instead of adding the data-bridge attributes to the web button you already have? 🤔
There's a web-based link for client versions that don't have the necessary Strada code yet.
Hi Joe, I love your work. Can you share please the repo for both the rails app and the iOS app?
github.com/joemasilotti/daily-log
thanks a lot@@joemasilotti
Hi Joe. Do I need to know swift/kotlin to use strada
@@raheebwa For Strada, yes, you'll definitely want to have a baseline understanding of how Swift and Kotlin development works.
f yeah! Thank you for this Sir 🙏❤
Glad you liked it! :D
Really appreciate you taking the time to demo all this! Great videos, keep it up!
Thank you! Glad it was helpful. :D
Could you please bring the vim tutorial or how to setup vim for rails?
I came for Turbo Native stuff, I've stayed for the Rails stuff. Really insightful, Learned bunch of new tricks 👍👍👍 Thank you Sir. More videos please 🙏
That’s great to hear! Rails + Turbo Native = ❤️
I have never seen something so simple yet so powerful
That's awesome to hear! Glad it was helpful.
This is excellent, Joe. I rarely comment, but this is so simple and straightforward. Thanks for doing this. Looking forward to more videos.
Thanks, that's awesome to hear!
Hey Joe. Rails sets the cookie max age to 20 years in the future, but browsers have recently introduced a max age for cookies of 400 days (it's roughly 13 months so people going to a site on a yearly basis won't need to log in again). See draft-ietf-httpbis-rfc6265bis-latest. Otherwise, I think it's better to use the session object instead of the cookie, as it can handle security issues by default.
Really liked a simplicity of rolling out our own authentication with few lines of code. Just wondering if I need to have Admin user login as well so does it require any more checks in this code apart from having is_admin attribute to differentiate user and navigating accordingly?
You shouldn’t need to change auth at all for admin stuff. Show/hide UI and restrict endpoints by checking if the current user is an admin.
You do an incredible job explaining everything so simply. Kudos!
Thank you! 😄
Daily Log - dailylog.ing Codebase - github.com/joemasilotti/daily-log
legend 💪
This was awesome. But damn I just get a white screen trying to access my ruby.
At which step? Are there any errors in your server or Xcode logs?
@@joemasilotti no i think its ssl issue?
Thank you very much for going so in-depth on this topic, I really appreciate it!
Thank you so much for sharing this! Super clear and helpful 🙏
Glad to hear it was helpful!
Which Xcode theme and font are you using? Looks neat.
Thanks! I'm running the base16 color scheme with the Inconsolata font. • github.com/kreeger/base16-xcode • fonts.google.com/specimen/Inconsolata
Which Xcode theme and font are you using? Looks neat.
Thanks! I'm running the base16 color scheme with the Inconsolata font. • github.com/kreeger/base16-xcode • fonts.google.com/specimen/Inconsolata
Source code on GitHub: github.com/joemasilotti/turbo-native-example
thanks awesome video!
Thank you! Glad you enjoyed it. :D
How can I style the native naviagtion bar? the title and color gets ovveriden everytime a page loads
You will want to use the UINavigationBarAppearance proxy to set the colors before the initial view loads: developer.apple.com/documentation/uikit/uinavigationcontroller/customizing_your_app_s_navigation_bar#3950605 And the title will get overwritten when the <title> of the web page changes. You will need to subclass UINavigationController or VisitableViewController to override that behavior.
how do you do logins !!
Well done!
Thank you! 😄
I uploaded the Xcode project to GitHub, complete with all code written in this video. github.com/joemasilotti/Turbo-Native-demo
Great video, Joe! Love this content. Is it actually impossible to style that confirm button when using Turbo or just too hard?
Thank you! It is possible but I don't recommend it. If you want to do anything outside this standard UI I say use the JavaScript bridge to render a fully custom component.
8:17 👏 renders localhost 11:29 clicking links works!
3¼ minutes - new record! 😄
This is fantastic. It also helps clear out how Turbo Native looks and feel in an iOS app. As someone who's not well versed in iOS development, I couldn't really tell before what the difference between a webview wrapping the whole app incl. navigation vs webview + native navigation meant, but now I do! This feels so much closer to native. Thanks!
Thanks Bruno! Glad it was helpful. Check out my crash course on Swift (for Ruby developers) to pick up just enough Swift for Turbo Native development.
'Promosm' 😈
Amazing tool, can be used with react native too?
I think you’ll have to choose between the two frameworks, unfortunately.
Love it! I'm excited to try this out on my own. I've been wanting to build an iOS app but didn't want to use something other than Rails for my server
Turbo Native should be perfect then!
Great introduction! I'd be interested to hear why storyboards don't work so well with turbo-ios
Thanks Dom! From my experience, Storyboards can help visualize flows between view controllers. But since most of a Turbo Native app is pushing the same VC with a different URL they don’t have much benefit.
Thanks! Would there be any benefit if I wanted to display a fixed native view within the navigation view (eg an audio player that persists between visits). Seems like the docs often recommend adding these components visually rather than programmatically
@@DomChristie I would still probably do it programatically. But if you went Storyboard you could add the VisitableViewController as a child view controller of your custom one which might clean things up a bit.
Yeah Swift, so far she never fails to make me start new Expo app again
Yeah this is neat and all but Expo is the way to go here in my opinion