|
|
Line 1: |
Line 1: |
| | == Language and OS == |
| Modern iOS mobile app development in mid-2022 is done in Swift 5.0 and macOS 15. | | Modern iOS mobile app development in mid-2022 is done in Swift 5.0 and macOS 15. |
|
| |
| == Concepts ==
| |
| * @Binding: allows one "source of truth" with many references called bindings
| |
| * @StateObject: an object owned and mutated by its parent class
| |
| * Codable: a designation that an object can be en/decoded
| |
| * Identifiable: a designation that an object uses predictable identification (eg via an ID)
| |
| * [https://www.hackingwithswift.com/books/ios-swiftui/custom-modifiers Custom modifiers] allow you to put all your modifiers (eg .font(.headline)) into one reusable set.
| |
|
| |
| === Modifiers vs Custom View ===
| |
| Tip: Often folks wonder when it’s better to add a custom view modifier versus just adding a new method to View, and really it comes down to one main reason: custom view modifiers can have their own stored properties, whereas extensions to View cannot.
| |
|
| |
| == SwiftUI vs UIKit ==
| |
|
| |
| UIKit is OLD and BIG. You'll still need it to get to some Apple services until SwiftUI is fully fleshed out. For my JSON API driven apps, I WILL AVOID IT LIKE THE PLAGUE, and hold out for SwiftUI expansion.
| |
|
| |
|
| == Installation == | | == Installation == |
Revision as of 22:49, 25 July 2022
Language and OS
Modern iOS mobile app development in mid-2022 is done in Swift 5.0 and macOS 15.
Installation
macOS Environment
An actual macOS development environment is required to build, test and publish an iPhone app. I set one up on the Matcha melange VM.
Development Environment
Primarily use XCode to do pretty much everything.
- I created my app using Apple's sample app, which mocks up a simple UI.
- I'm following a simple example to load JSON data from API.