What will you learn and what are the main objectives of this SwiftUI project?

  • How to build a fun Slot Machine minigame
  • How to build an iPhone and iPad app with outstanding graphics.
  • How to store data with User Defaults.
  • How to create a macOS application with Mac Catalyst.


Bring Your iPad App to Mac

Now it’s incredibly simple to start building a native Mac app from your current iPad app. With Mac Catalyst, your apps share the same project and source code so you can efficiently convert your iPad app’s desktop-class features, and add more just for Mac. Deliver your new Mac app to an engaged audience of over 100,000,000 active Mac users.


Get a Head Start on Your Native Mac App

If your iPad app would make an excellent Mac app, now is the perfect time to streamline your codebase and bring your app to life on Mac. The latest version of Xcode 11 is all you need. Begin by selecting the “Mac” checkbox in the project settings of your existing iPad app to create a native Mac app that you can enhance further. Your Mac and iPad apps share the same project and source code, making it easy to change your code in one place.


UserDefaults

An interface to the user’s defaults database, where you store key-value pairs persistently across launches of your app.

The UserDefaults class provides a programmatic interface for interacting with the defaults system. The default system allows an app to customize its behavior to match a user’s preferences. For example, you can allow users to specify their preferred units of measurement or media playback speed. Apps store these preferences by assigning values to a set of parameters in a user’s defaults database. The parameters are referred to as defaults because they’re commonly used to determine an app’s default state at startup or the way it acts by default.

At runtime, you use UserDefaults objects to read the defaults that your app uses from a user’s defaults database. UserDefaults caches the information to avoid having to open the User’s Default database each time you need a default value. When you set a default value, it’s changed synchronously within your process, and asynchronously to persistent storage and other processes.

APP ICON