IOS: Difference between revisions

From Bitpost wiki
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Modern iOS mobile app development in mid-2022 is done in Swift 5.0 and macOS 15.
== Language and OS ==
Modern iOS mobile app development in mid-2022 is done in [[Swift]] 5.0 and macOS 15.


== Concepts ==
== Tools ==
* @Binding: allows one "source of truth" with many references called bindings
* Manage certificates etc from this specific [https://developer.apple.com/account/ developer account link]
* @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 ==
Line 26: Line 16:
* I created my app using Apple's [https://developer.apple.com/tutorials/app-dev-training sample app], which mocks up a simple UI.
* I created my app using Apple's [https://developer.apple.com/tutorials/app-dev-training sample app], which mocks up a simple UI.
* I'm following a simple [https://www.ralfebert.com/ios-app-development/swiftui-async-await-tutorial/ example] to load JSON data from API.
* I'm following a simple [https://www.ralfebert.com/ios-app-development/swiftui-async-await-tutorial/ example] to load JSON data from API.
==== Testing ====
Testing is done by pushing the app through App Store Connect to TestFlight users.
My testers:
* My iphone 12 mini
* Regina's big iphone
* (Erik won't update his iOS)
==== Adding testers ====
* It was fairly easy to add a user via my TestPlan UI on apple's website.  I added Regina's email, and sent her an invite.  From there, she got a code and could install TestPlan with the code to get A better Trader installed.  Yay!
* First time, I went through this awful process to get the phone UDID.  I had to use a hacked up app on my iPhone.  Erik got his number by plugging his phone into his macbook.

Latest revision as of 17:35, 11 December 2022

Language and OS

Modern iOS mobile app development in mid-2022 is done in Swift 5.0 and macOS 15.

Tools

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.

Testing

Testing is done by pushing the app through App Store Connect to TestFlight users.

My testers:

  • My iphone 12 mini
  • Regina's big iphone
  • (Erik won't update his iOS)

Adding testers

  • It was fairly easy to add a user via my TestPlan UI on apple's website. I added Regina's email, and sent her an invite. From there, she got a code and could install TestPlan with the code to get A better Trader installed. Yay!
  • First time, I went through this awful process to get the phone UDID. I had to use a hacked up app on my iPhone. Erik got his number by plugging his phone into his macbook.