Apple's new Swift UI designed to help developers build better apps with less code

Posted:
in General Discussion edited February 2020
Apple's migration and evolution of Swift continues, with the company releasing the latest iteration of the technology in Swift UI.




Introducing the newest generation of Swift, Apple's Craig Federighi demonstrated how a hundred-line piece of code simplified down to about a dozen lines.

Xcode has a new interactive developer experience. A preview on a simulated device updates immediately, based on developer changes.

The new Swift UI uses graphical modules to drop in segments of code, adding the lines as it expands. Pull-down menus make parameter alternation simpler for developers.

A single click allows developers to shift to the simulator. Apps can be moved to actual hardware nearly instantly, with live edits in Xcode automatically migrated to the attached device.

Swift UI also integrated with other APIs, like ARKit. Automatic language optimization for left-to-right languages is included.

The new additions can be used across the entire run of Apple's platforms, including Apple TV, and the Apple Watch.

AppleInsider will be reporting live throughout WWDC 2019, starting with the keynote on Monday, June 3. Get every announcement as it happens by downloading the AppleInsider app for iOS, and by making sure to follow us on YouTube, Twitter @appleinsider, Facebook and Instagram.

Comments

  • Reply 1 of 15
    mjtomlinmjtomlin Posts: 2,673member

    AMAZEBALLS!!!

    StrangeDaysrezwitscaladanianlolliverSpamSandwichAppleExposed
  • Reply 2 of 15
    wizard69wizard69 Posts: 13,377member
    This is something I need to follow because honestly I hate Apples approach to GUI building.   Will be reviewing WWDC videos with great interest.  
    not_anton
  • Reply 3 of 15
    rezwitsrezwits Posts: 879member
    2 comments?  One codebase for all Devices... ahh... time to do full re-writes, but willingly! LOL
    caladanianlolliverAppleExposed
  • Reply 4 of 15
    jogujogu Posts: 9member
    Sadly SwiftUI seems to be tagged as an iOS 13 only feature, so existing apps aren’t going to be able to move their views to it in the immediate future unless they’re willing to drop iOS 12 and lower support.

    Still awesome though!
  • Reply 5 of 15
    Eric_WVGGEric_WVGG Posts: 968member
    wizard69 said:
    This is something I need to follow because honestly I hate Apples approach to GUI building. 
    Pretty wild… I was evaluating a couple third-party libs that do more or less the same thing, but as soon as you started to get into interesting stuff like NSSplitViewNavigator they pretty much fell to pieces. 

    If I was starting a new app today, I'd use it, backward compatibility be damned. 
    cat52lolliverAppleExposed
  • Reply 6 of 15
    volcanvolcan Posts: 1,799member
    What do guys think?

    As a study in future job opportunities do you think learning Swift or Node.js is a better direction. Right now I’m 100%
    PHP, LAMP which has served me well. Just looking toward the future.
  • Reply 7 of 15
    dewmedewme Posts: 5,363member
    At a high level this sounds very similar to Microsoft WPF and XAML/C# code behind. Should provide a big productivity boost for Swift developers.
    edited June 2019
  • Reply 8 of 15
    not_antonnot_anton Posts: 36member
    This is a total gem of the show! So under-appreciated. Apple made Swift as a beautiful compiled language with python-like syntax combining the best of the two worlds: scripting and system languages. But the framework for UI writing was atrocious (speaking as a Python researcher learning to build an iOS AI tools). Finally new coders could create simple programs without reading a few books on the topic first.
    edited June 2019 SpamSandwich
  • Reply 9 of 15
    This is a huge step BACKWARDS! I don't want all that garbage https://developer.apple.com/xcode/swiftui/ in my CODE. That belongs in Interface Builder.

    Since Swift still doesn't support generics and therefor doesn't have something like the biggest advance in programming since the IDE - the Standard Template Library, I'll stick with the most powerful coding system ever - Objective C++.
    FileMakerFeller
  • Reply 10 of 15
    hmlongcohmlongco Posts: 537member
    New developers are going to embrace SwiftUI and existing app developers could well get left behind if they're not careful.

    All of their existing hard-won iOS development knowledge was rendered useless in about, what, a 10-minute demo?

  • Reply 11 of 15
    AppleExposedAppleExposed Posts: 1,805unconfirmed, member
    I don't even code and this makes me wanna start.
  • Reply 12 of 15
    Rayz2016Rayz2016 Posts: 6,957member
    hmlongco said:
    New developers are going to embrace SwiftUI and existing app developers could well get left behind if they're not careful.

    All of their existing hard-won iOS development knowledge was rendered useless in about, what, a 10-minute demo?


    That's the nature of software development. If you're doing it right then it's a constant process of learning and refining.

    FileMakerFeller
  • Reply 13 of 15
    Rayz2016Rayz2016 Posts: 6,957member

    not_anton said:
    This is a total gem of the show! So under-appreciated. Apple made Swift as a beautiful compiled language with python-like syntax combining the best of the two worlds: scripting and system languages. But the framework for UI writing was atrocious (speaking as a Python researcher learning to build an iOS AI tools). Finally new coders could create simple programs without reading a few books on the topic first.

    Hah! I knew it! I always said that Swift was based on Python, not Java. 

    What nailed it for me was when they removed the currying declaration, which made it a lot more Python-like.

  • Reply 14 of 15
    Rayz2016Rayz2016 Posts: 6,957member

    This is a huge step BACKWARDS! I don't want all that garbage https://developer.apple.com/xcode/swiftui/ in my CODE. That belongs in Interface Builder.

    Since Swift still doesn't support generics and therefor doesn't have something like the biggest advance in programming since the IDE - the Standard Template Library, I'll stick with the most powerful coding system ever - Objective C++.

    Here's a page explaining how those non-existent generics work in Swift.

    Generics.html

    When you spend your life looking backwards, you often miss the stuff ahead.
    FileMakerFellerjony0
  • Reply 15 of 15
    Rayz2016Rayz2016 Posts: 6,957member
    volcan said:
    What do guys think?

    As a study in future job opportunities do you think learning Swift or Node.js is a better direction. Right now I’m 100%
    PHP, LAMP which has served me well. Just looking toward the future.

    At least someone is.

    In my opinion, either will serve you well. I prefer Swift, but Node.js is probably the better choice if you want to stay in web development.
    edited June 2019
Sign In or Register to comment.