Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
iOS 17 Programming for Beginners

You're reading from   iOS 17 Programming for Beginners Unlock the world of iOS development with Swift 5.9, Xcode 15, and iOS 17 – your path to App Store success

Arrow left icon
Product type Paperback
Published in Oct 2023
Publisher Packt
ISBN-13 9781837630561
Length 604 pages
Edition 8th Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Ian Lockett Ian Lockett
Author Profile Icon Ian Lockett
Ian Lockett
Ahmad Sahar Ahmad Sahar
Author Profile Icon Ahmad Sahar
Ahmad Sahar
Arrow right icon
View More author details
Toc

Table of Contents (34) Chapters Close

Preface 1. Part 1: Swift
2. Exploring Xcode FREE CHAPTER 3. Simple Values and Types 4. Conditionals and Optionals 5. Range Operators and Loops 6. Collection Types 7. Functions and Closures 8. Classes, Structures, and Enumerations 9. Protocols, Extensions, and Error Handling 10. Swift Concurrency 11. Part 2: Design
12. Setting Up the User Interface 13. Building Your User Interface 14. Finishing Up Your User Interface 15. Modifying App Screens 16. Part 3: Code
17. Getting Started with MVC and Table Views 18. Getting Data into Table Views 19. Passing Data between View Controllers 20. Getting Started with Core Location and MapKit 21. Getting Started with JSON Files 22. Getting Started with Custom Views 23. Getting Started with the Camera and Photo Library 24. Getting Started with Search 25. Getting Started with Collection Views 26. Part 4: Features
27. Getting Started with SwiftData 28. Getting Started with SwiftUI 29. Getting Started with Widgets 30. Getting Started with visionOS 31. Testing and Submitting Your App to the App Store 32. Other Books You May Enjoy
33. Index

Downloading and installing Xcode from the App Store

Xcode is Apple’s IDE for developing macOS, iOS, iPadOS, watchOS, tvOS, and visionOS apps. You’ll need to download and install Xcode prior to writing your first app. Follow these steps:

  1. Choose App Store from the Apple menu.
  2. In the search field in the top-right corner, type Xcode and press the Return key.
  3. You’ll see Xcode in the search results. Click Get and then click Install.
  4. If you have an Apple ID, type it in the Apple ID text box and enter your password when prompted. If you don’t have one, click the Create Apple ID button and follow the step-by-step instructions to create one:

    Figure 1.1: Apple ID creation dialog box

    You can see more information on how to create an Apple ID using this link: https://support.apple.com/en-us/HT204316#appstore.

  1. Once Xcode has been installed, launch it. You’ll see a License Agreement screen. Click on Agree:

Figure 1.2: License agreement screen

  1. You’ll be prompted to enter your Mac’s administrator username and password. Once you have done so, click OK:

Figure 1.3: Prompt for administrator username and password

  1. You’ll see a screen showing you the available development platforms. You just need macOS and iOS for now. Leave the settings at their default values and click on Download and Install:

Figure 1.4: Development platforms screen

  1. If you are using an Apple Silicon Mac and have not yet installed Rosetta, which allows Intel-based Mac apps to run on Apple Silicon Macs, you’ll be prompted to install it now. Click on Install:

Figure 1.5: Rosetta prompt

  1. You’ll see a What’s New in Xcode screen. Click on Continue:

Figure 1.6: What’s New in Xcode screen

  1. You’ll see the Welcome to Xcode screen. Click on Create New Project... in the left-hand pane:

Figure 1.7: Welcome to Xcode screen

  1. Xcode will start to download iOS 17.0 Simulator automatically. Note that you will not be able to run any apps on Simulator until this process has been completed:

Figure 1.8: Simulator download progress bar

  1. You’ll see the new project screen as follows. In the Choose a template for your new project: section, select iOS. Then choose App and click Next:
Figure 1.9: Choose a template for your new project: screen
  1. You’ll see the Choose options for your new project: screen:

    Figure 1.10: Choose options for your new project: screen

    Configure the options as follows:

    • Product Name: The name of your app. Enter JRNL in the text field.
    • Organization Identifier: Used to create a unique identifier for your app on the App Store. Enter com.myname for now. This is known as reverse domain name notation format and is commonly used by iOS developers.
    • Interface: The method used to create the user interface for your app. Set this to Storyboard.
    • Include Tests: Uncheck this check box.

    Leave the other settings at their default values. Click on Next when done.

  1. You’ll see a Save dialog box. Choose a location to save your project, such as the Desktop or Documents folder, and click on Create:

Figure 1.11: Save dialog box

  1. You’ll see a dialog box saying Git Repository Creation Failed. Click on Fix.

    The reason why you see this dialog box is because the Source Control checkbox in the Save dialog box was ticked. Apple recommends that Source Control be turned on. Source Control is outside the scope of this book but if you wish to learn more about version control and Git, see this link: https://git-scm.com/video/what-is-version-control.

  1. You will see the Source Control screen as follows:

Figure 1.12: Source Control preference screen

Enter the following information:

  • Author Name: Your own name
  • Author Email: Your email address

Close the Source Control screen by clicking the close button in the top-left corner when done. The Xcode main window will appear.

Fantastic! You have now successfully downloaded and installed Xcode and created your first project. In the next section, you will learn about the Xcode user interface.

You have been reading a chapter from
iOS 17 Programming for Beginners - Eighth Edition
Published in: Oct 2023
Publisher: Packt
ISBN-13: 9781837630561
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image