Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
I'm learning how to make iOS and macOS apps and I'm wondering if I should use UIKit/AppKit or SwiftUI? The app is going to be for iOS, iPadOS, watchOS and macOS.

From what I have read it seems that SwiftUI is the best choice but I wanted to get some feedback from people so I can make an informed decision. What the main selling points of each and why should I use one over the other?
 

coffeemilktea

macrumors 65816
Nov 25, 2022
1,399
6,170
It depends on what kind of app you want to make, but you'd realistically have an easier time with SwiftUI since it's the "preferred" way to make apps now, Apple is focusing a lot of their efforts on it, and it works great for all of Apple's platforms.

UIKit is better if you want more fine control over certain things or better performance or if you want your app to be supported on older devices and operating systems. But if you're just starting out, these aren't things you would need to worry about for a very long time.
 

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
It depends on what kind of app you want to make, but you'd realistically have an easier time with SwiftUI since it's the "preferred" way to make apps now, Apple is focusing a lot of their efforts on it, and it works great for all of Apple's platforms.

UIKit is better if you want more fine control over certain things or better performance or if you want your app to be supported on older devices and operating systems. But if you're just starting out, these aren't things you would need to worry about for a very long time.
Thank you! Much appreciated :D.
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
I would add that if you intend to get hired as a professional iOS developer you'll most likely need to know both.

With SwiftUI you can write your UI code once and basically re-use it across all the platforms. Not quite so with AppKit/UIKit. What's your current knowledge level and background? SwiftUI is declarative in nature and mostly uses value types. UIKit/AppKit is more rooted in Object Oriented models and tends to use reference types. That's arguably the biggest difference
 
  • Like
Reactions: ennisw

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
I would add that if you intend to get hired as a professional iOS developer you'll most likely need to know both.

With SwiftUI you can write your UI code once and basically re-use it across all the platforms. Not quite so with AppKit/UIKit. What's your current knowledge level and background? SwiftUI is declarative in nature and mostly uses value types. UIKit/AppKit is more rooted in Object Oriented models and tends to use reference types. That's arguably the biggest difference
I'm a Python and Javascript web dev at the moment but I want to make the switch to Apple hardware. I'd say I'm an intermediate programmer.
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
I'm a Python and Javascript web dev at the moment but I want to make the switch to Apple hardware. I'd say I'm an intermediate programmer.

In that case, you'll be fine with either and pick up both pretty fast I think :) SwiftUI rolls faster off the ground but you may get to a point where getting something very bespoke and specific done is harder than UIKit, but all the simple stuff is easier
 
  • Like
Reactions: Cromulent

Fingernail

Contributor
Nov 5, 2020
16
16
I'm learning how to make iOS and macOS apps and I'm wondering if I should use UIKit/AppKit or SwiftUI? The app is going to be for iOS, iPadOS, watchOS and macOS.

From what I have read it seems that SwiftUI is the best choice but I wanted to get some feedback from people so I can make an informed decision. What the main selling points of each and why should I use one over the other?
This is exactly what I'm dealing with now. I have a macOS application that was developed using SwiftUI. It's been a mixed bag. I'm considering rebuilding it without SwiftUI, because I am targeting older versions of the OS (pre-macOS 10.15/pre-iOS 13*) that do not support SwiftUI.

The good part is, SwiftUI is generally productive but opaque if you want to do anything outside the most common use cases. This is my first SwiftUI app, so part of this is me learning what it's meant to do and how it's meant to be used.

Newer SwiftUI capabilities are only supported by more recent versions of the OS, so if you try to use more recent capabilities of SwiftUI, you will be limited to clients running sufficiently modern versions of macOS or require more work coding and testing across multiple client versions.

* or so the docs say. I haven't written an iOS SwiftUI app.
 
  • Like
Reactions: Cromulent

MisterSavage

macrumors 601
Nov 10, 2018
4,860
5,760
I would add that if you intend to get hired as a professional iOS developer you'll most likely need to know both.

With SwiftUI you can write your UI code once and basically re-use it across all the platforms. Not quite so with AppKit/UIKit. What's your current knowledge level and background? SwiftUI is declarative in nature and mostly uses value types. UIKit/AppKit is more rooted in Object Oriented models and tends to use reference types. That's arguably the biggest difference
You always respond with what I would have responded with on this topic. :D

IMO if your goal is to create apps and not a goal of getting a job immediately I would start with SwiftUI. You can get a lot done faster, which can make you even more motivated.
 

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
This is exactly what I'm dealing with now. I have a macOS application that was developed using SwiftUI. It's been a mixed bag. I'm considering rebuilding it without SwiftUI, because I am targeting older versions of the OS (pre-macOS 10.15/pre-iOS 13*) that do not support SwiftUI.

The good part is, SwiftUI is generally productive but opaque if you want to do anything outside the most common use cases. This is my first SwiftUI app, so part of this is me learning what it's meant to do and how it's meant to be used.

Newer SwiftUI capabilities are only supported by more recent versions of the OS, so if you try to use more recent capabilities of SwiftUI, you will be limited to clients running sufficiently modern versions of macOS or require more work coding and testing across multiple client versions.

* or so the docs say. I haven't written an iOS SwiftUI app.

You always respond with what I would have responded with on this topic. :D

IMO if your goal is to create apps and not a goal of getting a job immediately I would start with SwiftUI. You can get a lot done faster, which can make you even more motivated.
Thank you both! That really helps.
 
  • Like
Reactions: MisterSavage
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.