Skip to content

A Xcode Swift starter project with SwiftLint, TinyConstraints and our recommended folder structure.

Notifications You must be signed in to change notification settings

rojanstha04/swift-starter-project

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Quick start

  1. Install SwiftLint

    Use the Gatsby CLI to create a new site, specifying the minimal starter.

    brew install SwiftLint
  2. Open Xcode

    Open this project in Xcode

  3. Resolve Package Versions

    In Xcode, Select File -> Packages -> Resolve Package Dependencies.

    This is required to get TinyConstraints working found at: TinyConstraints: Nothing but sugar.

πŸ’» Keyboard Shortcuts

Select Many lines Control + Shift + Click

##Find

Find in File Command + F

Find and Replace in Project Command + Shift + F

##Find and Replace Same as the above and select replace from the dropdown.

πŸ“° Guides

  1. Apple App Launch Screen Best Practices πŸ”—
  2. How to localize iOS, MacOS, TVOS & WatchOS apps in XCode and Swift πŸ”—
  3. SwiftData Quick Start Guide πŸ”—
  4. Apple App Store E-Commerce Business Guide πŸ”—
  5. E-Commerce Fees in Apple App Store Apps πŸ”—
  6. Apple In-App Purchases and Subscriptions Development Guide πŸ”—
  7. How to reduce risk when developing Apple e-commerce apps πŸ”—
  8. How to build an app that uses Apple In-App Purchases and Subscriptions πŸ”—
  9. Free Open-Source Apple StoreKit 2 Swift Project πŸ”—
  10. How to Create a Website Smart App Banner for your App & App Clip. πŸ”—
  11. iOS Accessibility Resource Guide πŸ”—
  12. Debugging recommendations for XCode & Swift (iOS) πŸ”—
  13. Recommendations for creating a structured custom UIView in Swift πŸ”—
  14. Apple Metal Resources Guide πŸ”—

πŸ“š Tutorials

Core

Setup

  1. How to create a SwiftLint enabled Swift Xcode Project πŸ”—
  2. How to add a Swift Package Manager package dependency πŸ”—
  3. How to add a local Swift Package in XCode πŸ”—

Splash Screen

  1. Apple App Launch Screen Best Practices πŸ”—
  2. How to create a launch screen in XCode πŸ”—
  3. How to stop an App build at the Launch Screen in XCode πŸ”—
  4. How to make an iPhone, iPad or Mac show an updated launch screen πŸ”—

Storyboard

  1. How to add a UI component to a storyboard in XCode πŸ”—
  2. How to use an image within a storyboard in XCode πŸ”—
  3. How to constrain a UI component in a storyboard in XCode πŸ”—
  4. How to constrain a UI component to the edges of a UIViewController πŸ”—

Debugging

  1. How to add and use a breakpoint in XCode πŸ”—
  2. How to view all breakpoints in XCode πŸ”—
  3. How to activate or deactivate breakpoints in XCode πŸ”—
  4. How to remove a breakpoint in XCode πŸ”—
  5. How to profile CPU usage using Instruments in XCode πŸ”—
  6. How to diagnose a hang, severe hang or freeze in XCode πŸ”—

Design Systems

  1. How to create a singleton in Swift πŸ”—
  2. How to create a styleguide in XCode & Swift πŸ”—

Constraints

  1. How to implement Safe Area Insets in Swift πŸ”—
  2. How to activate & deactivate constraints in Swift πŸ”—
  3. How to update constraints in Swift πŸ”—
  4. How to animate constraints in Swift πŸ”—

Notifications

  1. How to send and receive Notifications in Swift πŸ”—

Errors

  1. How to create custom errors in Swift πŸ”—
  2. How to resolve an XCode sandbox build error πŸ”—

Media

  1. How to add and structure local images in Swift πŸ”—
  2. How to add a hosted image to a view in Swift πŸ”—
  3. How to add a local image to a view in Swift πŸ”—
  4. How to add and use images as files instead of xcassets in XCode

SF Symbols

  1. How to use SF Symbols in Swift πŸ”—

UI Basics

  1. How to add a label to a view in Swift πŸ”—
  2. How to create an attributed label in Swift πŸ”—
  3. How to make a custom button in Swift πŸ”—

ScrollViews & CollectionViews

  1. How to implement a UIScrollView in Swift πŸ”—
  2. How to create a custom carousel in Swift πŸ”—
  3. How to snap a carousel to position in Swift πŸ”—
  4. How to create a scroll indicator for a carousel in Swift πŸ”—
  5. How to create a UICollectionView with multiple sections in Swift πŸ”—
  6. How to animate changes in a UICollectionView datasource in Swift πŸ”—

Actors

  1. How to create and use a global actor in Swift πŸ”—
  2. How to use actor properties from the main actor without async/await πŸ”—
  3. How to update actor properties from the main actor πŸ”—

SwiftData

  1. SwiftData Quick Start Guide πŸ”—

Setup

  1. How to create or access a SwiftData Persistent Container in Swift πŸ”—

Modelling

  1. How to create a SwiftData Model in Swift πŸ”—
  2. How to add complex values to SwiftData models πŸ”—
  3. How to create a SwiftData model variable that does not persist πŸ”—

Operations

  1. How to get all SwiftData objects in Swift πŸ”—
  2. How to get an object from SwiftData in Swift πŸ”—
  3. How to know if an object already exists in SwiftData πŸ”—
  4. How to add an object to SwiftData in Swift πŸ”—
  5. How to delete an object from SwiftData in Swift πŸ”—
  6. How to delete all objects from SwiftData in Swift πŸ”—
  7. How to update an object in SwiftData in Swift πŸ”—

Errors

  1. SwiftData crashes when trying to access a deleted object πŸ”—
  2. How to solve "No exact matches in call to instance method 'setValue'" πŸ”—

Advanced UI

  1. How to create a UIView that dynamically adapts to its contents πŸ”—
  2. How to make a custom search bar in Swift. πŸ”—
  3. How to create a filtered search experience in Swift πŸ”—
  4. How to create a UICollectionView with cells that size to fit content πŸ”—</a
  5. How to make a custom data driven UICollectionView πŸ”—
  6. How to create a multi-section UICollectionViewCompositionalLayout πŸ”—
  7. How to create an animated progress indicator in Swift πŸ”—

Async / Await

  1. How to use async and await in Swift projects πŸ”—

Utilities

  1. How to open a URL in Safari in Swift πŸ”—
  2. How to observe changes in screen size in Swift πŸ”—
  3. How to observe device orientation changes in Swift πŸ”—
  4. How to get the device orientation of an iPhone or iPad in Swift πŸ”—
  5. How to convert a JSON object into data in Swift πŸ”—
  6. How to convert data into a JSON object in Swift πŸ”—
  7. How to send an email from an app in Swift πŸ”—

API / GraphQL

  1. How to setup a Swift project to make API calls in XCode. πŸ”—
  2. How to make an GraphQL call in Swift πŸ”—
  3. How to make an API call with a variable codable type in Swift πŸ”—

CADisplayLink

  1. How to perform animations in Metal using a CADisplayLink πŸ”—
  2. How to pause, resume, remove or invalidate a CADisplayLink in Swift πŸ”—

Bluetooth

  1. How to hide the Bluetooth Alert in Swift πŸ”—

Speech Recognition (Voice)

  1. How to setup speech recognition in Swift πŸ”—
  2. How to recognize voice commands in Swift πŸ”—
  3. How to continuously start and stop speech recognition in Swift πŸ”—

Reviews

  1. How to Request Customers to Leave a Review on the Apple App Store πŸ”—

App Clip

  1. How to create an App Clip in XCode πŸ”—
  2. How to Generate a QR Code or NFC Tag for your App Clip Experience. πŸ”—
  3. How to Create a Website Smart App Banner for your App & App Clip. πŸ”—

MAC Catalyst

  1. How to make a Mac Catalyst App Full Screen (MacOS 12+) πŸ”—
  2. How to archive an app with Firebase SDK using CocoaPods (Mac Catalyst) πŸ”—

StoreKit

Setup

  1. How to create a StoreKit Coordinator in Swift πŸ”—
  2. How to sync a StoreKit configuration file with App Store Connect πŸ”—
  3. How to setup StoreKit products in XCode πŸ”—
  4. How to create a StoreKit offering in XCode or App Store Connect πŸ”—
  5. How to convert a synced StoreKit configuration file into a local file πŸ”—

Creating and Modifying

  1. How to create a local StoreKit In-App Purchase in XCode πŸ”—
  2. How to create a local StoreKit Subscription in XCode πŸ”—
  3. How to add localizations to local In-App Purchases or Subscriptions πŸ”—
  4. How to plan price changes for local StoreKit In-App Purchases πŸ”—
  5. How to plan price changes for local StoreKit subscriptions πŸ”—
  6. How to turn on family sharing in In-App Purchases or Subscriptions πŸ”—
  7. How to tier subscriptions in a local StoreKit configuration file πŸ”—
  8. How to manage Auto-Renewable Subscriptions in XCode πŸ”—
  9. How to change the Subscription Renewal Rate in XCode πŸ”—

Offers

  1. How to create local introductory offers for subscriptions in StoreKit πŸ”—
  2. How to create local promotional offers for subscriptions in StoreKit πŸ”—
  3. How to create local offer codes for subscriptions in StoreKit πŸ”—
  4. How to code and test custom offer code redemption in Swift and Xcode πŸ”—

Gathering Information in Code

  1. How to get StoreKit In-App Purchases and Subscriptions in Swift πŸ”—
  2. How to get a StoreKit Subscription period in Swift πŸ”—
  3. How to get an Auto-Renewable Subscription's status in Swift πŸ”—
  4. How to get a StoreKit Subscription Introductory Offer period in Swift πŸ”—
  5. How to get the type of Introductory Offer in Swift πŸ”—
  6. How to determine if an introductory offer has been used in Swift? πŸ”—
  7. How to check if a Subscription is being upgraded in Swift πŸ”—
  8. How to get a Subscription Renewal or Expiration Date in Swift πŸ”—
  9. How to check if a Subscription is expiring or renewing in Swift? πŸ”—

UX E-Commerce Functionality

  1. How to allow users to manage a Subscription in an app in Swift πŸ”—
  2. How to code and test restore purchases in Swift and Xcode πŸ”—

Testing

  1. How to enable StoreKit testing in XCode πŸ”—
  2. How to code and test StoreKit purchases in Swift and XCode πŸ”—
  3. How to code and test localized StoreKit product names and descriptions πŸ”—
  4. How to test StoreKit failed purchases in Swift and XCode πŸ”—
  5. How to code and test refund requests in Swift and Xcode πŸ”—
  6. How to simulate a StoreKit Transaction refund in XCode πŸ”—
  7. How to code and test StoreKit pending purchases in Swift and XCode πŸ”—
  8. How to change StoreKit Storefront in XCode πŸ”—
  9. How to change StoreKit Localization in XCode πŸ”—
  10. How to open the StoreKit Transaction Manager in XCode πŸ”—
  11. How to deny or approve a pending StoreKit Transaction in XCode πŸ”—
  12. How to delete StoreKit Transactions in XCode πŸ”—
  13. How to code and test international StoreKit product prices πŸ”—
  14. How to enable and disable StoreKit Interrupted Purchases in XCode πŸ”—
  15. How to test interrupted purchases in Swift and XCode πŸ”—
  16. How to enable or disable StoreKit Billing Retry in XCode πŸ”—
  17. How to enable or disable StoreKit Fail Transactions in XCode πŸ”—
  18. How to enable or disable StoreKit Ask to Buy in XCode πŸ”—
  19. How to enable or disable the StoreKit Billing Grace Period in XCode πŸ”—
  20. How to simulate a price increase consent request in XCode πŸ”—
  21. How to test Billing Grace Period and Billing Retry for a Subscription πŸ”—

Errors

  1. How to solve the no active account StoreKit error in Xcode πŸ”—
  2. How to solve the StoreKit Finance Authentication Error in Xcode πŸ”—
  3. How to solve the StoreKit did not receive any products error in Xcode πŸ”—

App Store Connect

  1. How to access an App in App Store Connect πŸ”—

In-App Purchases

  1. How to access an In-App Purchase in App Store Connect πŸ”—
  2. How to create In-App Purchases in App Store Connect πŸ”—
  3. How to add localizations to In-App Purchases in App Store Connect πŸ”—
  4. How to plan a In-App Purchase price change in App Store Connect πŸ”—
  5. How to create a family plan In-App Purchase on App Store Connect πŸ”—

Subscriptions

  1. How to access subscriptions in App Store Connect πŸ”—
  2. How to access an auto-renewable subscription in App Store Connect πŸ”—
  3. How to access a non-renewing subscription in App Store Connect πŸ”—
  4. How to create tiered subscriptions in App Store Connect πŸ”—
  5. How to create an auto-renewable subscription in App Store Connect πŸ”—
  6. How to create a non-renewing subscription in App Store Connect πŸ”—
  7. How to add localizations to a subscription in App Store Connect πŸ”—
  8. How to add localizations to a Subscription Group in App Store Connect πŸ”—
  9. How to create a family plan subscription on App Store Connect πŸ”—
  10. How to plan a subscription price change in App Store Connect πŸ”—
  11. How to change the duration of a Subscription in App Store Connect πŸ”—
  12. How to setup a subscription grace period in App Store Connect πŸ”—
  13. How to edit or turn off subscription grace period in App Store Connect πŸ”—
  14. How to create, edit and delete offers in App Store Connect πŸ”—

E-Commerce

Transactions & Entitlements

  1. What are Apple App Store Entitlements and how to use them πŸ”—
  2. What is the Apple App Store Server API? πŸ”—
  3. What can I use the App Store Server API for? πŸ”—
  4. What are Apple App Store Transactions ? πŸ”—
  5. What information comes with an Apple App Store Server API Transaction? πŸ”—
  6. How do Apple App Store Transactions work? πŸ”—
  7. Acquiring Customer Transactions from the Apple App Store πŸ”—
  8. What information comes with Apple App Store Transactions in an app? πŸ”—

App Store Server Notifications

  1. What are Apple App Store Server Notifications? πŸ”—
  2. Apple App Store Server Notifications: What you get and How to use them πŸ”—

Refunds

  1. How do Apple App Store Refunds work? πŸ”—
  2. How does Billing Retry and a Grace Period work in the Apple App Store? πŸ”—
  3. What is the Apple App Store Grace Period? πŸ”—
  4. What is Apple App Store Billing Retry? πŸ”—

IAP

  1. What are Apple App Store Consumable In-App Purchases? πŸ”—
  2. What are Apple App Store Non-Consumable In-App Purchases? πŸ”—
  3. What is Apple Family Sharing? πŸ”—
  4. Popular In-App Purchase Mechanics πŸ”—
  5. Examples of Consumable In-App Purchases πŸ”—
  6. Challenges and Benefits of In-App Purchases πŸ”—
  7. Examples of Non-Consumable In-App Purchases πŸ”—

Subscriptions

  1. What are Apple App Store Auto-Renewable Subscriptions? πŸ”—
  2. What are Apple App Store Non-Renewing Subscriptions? πŸ”—
  3. What are Apple App Store Subscription Groups? πŸ”—
  4. What is Apple Family Sharing? πŸ”—

Offers

  1. What are Apple App Store Introductory Offers? πŸ”—
  2. What are Apple App Store Promotional Offers? πŸ”—
  3. What are Apple App Store Custom Offer Codes? πŸ”—
  4. Combining Offers in Apple App Store Apps πŸ”—

Metal

Basics

  1. What is Metal in Apple's Ecosystem ? πŸ”—
  2. How to structure variables & functionality in shared files in Metal πŸ”—
  3. How to use Metal with a UIView in Swift πŸ”—
  4. How to change the background color of an MTKView in Swift πŸ”—
  5. How to draw a stroke on a primitive in Metal πŸ”—

Shaders

  1. How to pass variables or data to a Metal Shader in XCode πŸ”—
  2. How to pass data from the vertex to the fragment function in Metal πŸ”—
  3. How to use color interpolation in a Metal shader πŸ”—
  4. How to include utility functions in a Metal shader πŸ”—

Drawing

  1. How to draw a polygon in Metal πŸ”—
  2. How to code a MTKView that draws multiple shapes πŸ”—
  3. How to use multiple shaders to draw multiple shapes within a MTKView πŸ”—
  4. How to draw an outlined shape with a line width in Metal πŸ”—
  5. How to make a Metal fragment shader change alpha transparency πŸ”—
  6. How to control the anti-aliasing of an MTKView in Swift πŸ”—

Rendering & ANimations

  1. How to start and stop the rendering of a MTKView πŸ”—
  2. How to perform animations in Metal using a CADisplayLink πŸ”—

Errors

  1. MTKView clearcolor doesn't change transparency πŸ”—

About

A Xcode Swift starter project with SwiftLint, TinyConstraints and our recommended folder structure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 97.2%
  • Shell 2.8%