Wilson Mar bio photo

Wilson Mar

Hello!

Calendar YouTube Github

LinkedIn

SwiftUI

Use Apple’s XCode IDE to build native VisionOS apps for Vision Pro, iPhones, iPads.

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

VIDEO: Apple first released SwiftUI in 2019 for all Apple platforms (iOS 13+, tvOS 13, macOS 10.15+, watchOS 6+, VisionOS). Before that, no SDK was provided by Apple to build apps for iPhoneOS 1 (with no SDK) in 2007. After 3rd party developers were able to build apps for iPhoneOS 2 in 2008, a UIKit SDK was provided for each platform to build apps.

Apple’s official documentation is at https://developer.apple.com/documentation/swiftui

Apple’s Human Interface Guidelines (HIG) applies to all Apple platforms.

  • Vision uses the same font point system as on other Apple platforms.

  • There is no “dark mode” in VisionOS, which changes the color scheme of the UI based on the color of the user’s room.

https://developer.apple.com/sf-symbols – Apple’s comprehensive library of vector-based symbols included in Apple’s system fonts that you can incorporate into your app. Icons are 2D images containing layers.


VisionOS

  • VIDEO: Vision UIs consist of Windows, Volumes, and Spaces.

Volumes are 3D experiences (with depth), such as a spinning globe. Volumes are created using the Unity IDE or RealityKit. Reality Composer Pro is a separate app for creating Volumes (3D scenes, particles, spatial audio).

Spaces are 3D experiences (with depth), such as a spinning globe.
Full Spaces take over your entire field of view for full immersion.
Full Spaces display ARKit features such as displaying your hands.

Shared Spaces contain multiple Volumes.


Vision Pro device

https://www.apple.com/apple-vision-pro

Although Apple does not use the terms VR, AR, or Metaverse even though they had a ARKit product for Augmented Reality. Vision Pro v1 from Apple is a combination of a VR headset and AR glasses.

Apple uses the term “Vision”.

Apple announced the Vision Pro at WWDC in June 2023.

The $3,500 Vision Pro pre-orders begin 5pm PT January 19, 2024, with delivery in Apple Stores beginning February 2, 2024.

It will be purchased by early adopters, such as developers, and those who want to be the first to have the latest technology.

Pay $199 to buy through Apple Zeiss prescription glasses that slots into the Vision Pro headset, unlike the Oculus Quest 2 which presses on glass frames under the headset.

Vision Pro is a standalone device, with no need for a computer or phone.

Apple released the VisionOS SDK June 21, 2023.

SwiftUI is the only way to build apps for VisionOS.

It contains an M2 Apple Silicon chip like the one in MacBook Pros.

So realistic, it seems like you’re really there, fully immersive in the real world.

  • A front display to display your eyes.

  • A 4K display for each eye to display 3D Spaces.

  • Internal IR cameras and IR illuminators to track your eyes with
    A 3D eye tracking system to allow you to interact with the virtual world.

    Authentication with OpticID to unlock the device based on your unique eye pattern.

    When you look at the edge of the screen, the screen scrolls. When you look at the menu at the edge of the screen, it is expanded.
    When you look at an object, it is selected.

  • A 3D microphone system to record spatial audio.

    Connection with Siri to say instead of typing on a keyboard.

    It has noise cancellation so it seems like you’re in a quiet room.

  • A 3D gesture system to allow you to interact with the virtual world.

    The Vision Pro has no controllers like other VR headsets.

  • A 3D audio system to play spatial audio such that when you turn your head, the sound appears to be stationary.

    Within the Facetime app, when you move a person, sound from that person appears to come from that person.

  • Pairs of external cameras that look down, to each side.

  • A 3D touch system to allow you to feel objects in the virtual world.
  • A 3D haptic system to allow you to feel objects in the virtual world.

    Vibrancy is a new feature of Vision Pro that allows you to feel the vibrations of objects in the virtual world.

  • A 3D temperature system to allow you to feel the temperature of objects in the virtual world. (not really)
  • A 3D smell system to allow you to smell objects in the virtual world. (not really)
  • A 3D taste system to allow you to taste objects in the virtual world. (not really)
  • A 3D wind system to allow you to feel the wind in the virtual world. (not really)
  • A 3D water system to allow you to feel water in the virtual world. (not really)

VIDEO: Apple Vision Pro Impressions! by Marques Brownlee

VIDEO: I tried the Apple Vision Pro! Here’s what it’s really like by GadgetGuy (Adam Quinn)

VIDEO: Apple Vision Pro Will Change You by Hololinked

VIDEO: Apple Vision Pro - Is it worth $3500? by Mrwhosetheboss

VIDEO: Patent Leak Shows Vision Pro’s Game Changing Secret | Quick Tech News on Apple CrazyOnes Tech News

Tutorials

VIDEO: How to Make an App - Lesson 1 (2023 / Xcode 14 / SwiftUI) by CodeWithChris


Xcode

Install XCode 15.1+ A separate VisionOS simulator app is installed automatically.

    https://developer.apple.com/xcode/

“Swift” refers to macros, functions, and classes in the Swift language.

Each GitHub repo has these files and folders:

  • .gitignore
  • README.md
  • LICENSE
  • Within folder AuthSample.xcodeproj:
    • project.pbxproj
    • project.xcworkspace
    • xcuserdata

Within the folder with the app name:

  • Folder Assets.xcassets
    • Folder AccentColor.colorset
    • Folder AppIcon.appiconset
    • File Contents.json
  • Folder Model
    • File User.swift
  • Folder Preview Content/Preview Assets.xcassets
    • File Contents.json
  • Folder View
    • Folder Auth containing:
      • LoginView.swift
      • SignUpView.swift
    • File HomeView.swift
    • File MainTabView.swift
    • File ProfileView.swift
  • Folder ViewModel (data models such as Firebase)
    • File AuthViewModel.swift
  • File AuthSampleApp.swift
  • File ContentView.swift

Sample apps

Sample apps from Apple:

Hello World Use windows, volumes, and immersive spaces to teach people about the Earth.

https://developer.apple.com/documentation/swiftui/backyard-birds-sample”>Backyard Birds: Build an app with SwiftData and widgets with persistent data, interactive widgets, and an all new in-app purchase experience.

    https://github.com/apple/sample-backyard-birds

GitHub Repos

A search within all of GitHub.com reveals 60,800+ repos with SwiftUI in the repo name. The ones with most stars:

Awesome links:

Practices:

https://vapor.codes/ is a web framework for Swift used as a server backend for Apple apps. https://github.com/Alamofire/Firewalk?tab=readme-ov-file

Sample apps:

UI Controls:

  • SwiftUI Animations = A repository containing a variety of animations and Animated components created in SwiftUI that you can use in your own projects.

Migration

  • VIDEO: Vision Pro from a Developer’s Perspective by Paul Hudson

Previous apps written using UIKit need to be converted to SwiftUI code.

Apple expects that most iPadOS and iOS apps can run unmodified on Apple Vision Pro, so your app can easily extend to this new platform — with no additional work required. Your compatible iPad and iPhone apps will be published automatically on the App Store for Apple Vision Pro, using the metadata you’ve already provided. You can edit your app’s availability at any time in App Store Connect.

DOCS: These features in iPad and iPhone apps aren’t available in visionOS.

* Core Motion services
* Barometer and magnetometer data
* All location services except the standard service
* HealthKit data
* Video or still-photo capture
* Camera features like auto-focus or flash
* Rear-facing (selfie) cameras
<br /><br />

VisionOS framework APIs are used to determine when the features are available.


Developers

https://www.macworld.com/article/672537/when-is-apples-next-event.html

https://www.youtube.com/watch?v=Bc_6XNZos-4 Vision Pro Developer Hands-on by Developer Commentary (Jordi and Malin)


Language Constructs

UIKit is Imperative with MVC & MVVM.
SwiftUI is Declarative.

  • For views/view controllers, SwiftUI uses struct instead of class
  • Struct as a value type works differently with var internally
  • In structs, init is implicit
  • Ternary Conditional operators are used instead of if/else

Cards, Containers, ContentView.swift

  • Structs with protocols

  • Computed properties

  • Closures

  • Array methods

  • Conditional operators

Tutorials

At OReilly.com

https://learning.oreilly.com/videos/-/9781805121770/ Deep Dive iOS 16 Swift - SwiftUI Programming

https://learning.oreilly.com/videos/-/9781801070676/ SwiftUI - The Complete iOS 16 Developers Resource and Bible

https://learning.oreilly.com/library/view/-/9781803242071/ Elevate SwiftUI Skills by Building Projects

https://learning.oreilly.com/library/view/-/9781805121732/ SwiftUI Cookbook - Third Edition

At pluralsight.com

https://www.pluralsight.com/paths/ios iOS App Development Path of 14 courses.

VIDEO: SwiftFest Boston Sep 3, 2019 presentations

Apple doesn’t participate in big industry-wide events such as CES or E3.

On LinkedInLearning

https://www.linkedin.com/learning/search?keywords=swiftui

Composable SwiftUI Architecture Using Redux 2: Building the App by Mohammad Azam
Part 1
Part 2:

YouTube Videos

VIDEO: SwiftUI Bootcamp “most organized”.


Jobs

Indeed.com aggregates job postings: https://www.indeed.com/q-swiftui-jobs.html

https://www.ziprecruiter.com/Jobs/Swiftui says that the average SwiftUI salary is near $150,000 per year.

https://www.flexjobs.com/remote-jobs/ios-developer

https://www.simplyhired.com/search?q=swiftui&l=remote

https://workwithswiftui.com/swiftui-jobs

https://www.hackingwithswift.com/forums/jobs

Agencies

https://www.linkedin.com/company/swiftui-developers/

https://arc.dev/hire-developers/swiftui

More on Apple technologies

This is one of several topics:

  1. Evangelist Job Description (dreaming on both sides)

  2. Evangelism dependencies
  3. Deliverables and Events Budgeting spreadsheet
  4. Evangelism Cost-Benefit analysis (Bang-for-the-buck comparion)

  5. Events and Conferences
  6. Calendar of Announcements
  7. Milestone events

  8. Social media
  9. Social media strategy
  10. Tweets
  11. Sentiment analysis (of favorable words or not)
  12. Responses to social media
  13. Tech Press mentions

  14. Competitive Comparisons (by analysts and others)
  15. Competitive Strategy
  16. Competitive Comparison Kit (for people to run for themselves)
  17. Objections, and how to handle them

  18. Target Customers
  19. Customer References
  20. Proof Points
  21. Email databases (User Acquisition)
  22. Remarketing of current or lapsed users

  23. Product websites
  24. Product wikis
  25. User Forums (Google, LinkedIn, Reddit, etc.)
  26. Surveys

  27. Product Roadmaps
  28. Release Schedule
  29. Tasks
  30. Issues

  31. environments for development, testing, demos, training, etc.
  32. Demo presentation scripts
  33. Beta activities
  34. Release Notes

  35. Tutorials
  36. Live event sign-up administration
  37. Webinars
  38. Video production capability
  39. Live Video Streaming

  40. Spiffs
  41. Hackathons
  42. Participating in Conferences
  43. Running Conferences
  44. Dynamic projections of tweets, etc.

  45. Recruitment follow-up