<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sagar Unagar</title>
    <description>The latest articles on Forem by Sagar Unagar (@sagarunagar).</description>
    <link>https://forem.com/sagarunagar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F283852%2F89fe43d0-480b-48cb-a546-92893b5caeb1.jpeg</url>
      <title>Forem: Sagar Unagar</title>
      <link>https://forem.com/sagarunagar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sagarunagar"/>
    <language>en</language>
    <item>
      <title>Basic structure of SwiftUI project</title>
      <dc:creator>Sagar Unagar</dc:creator>
      <pubDate>Mon, 23 Dec 2019 06:57:22 +0000</pubDate>
      <link>https://forem.com/sagarunagar/basic-structure-of-swiftui-project-1g54</link>
      <guid>https://forem.com/sagarunagar/basic-structure-of-swiftui-project-1g54</guid>
      <description>&lt;p&gt;Apple introduced &lt;a href="https://developer.apple.com/xcode/swiftui/" rel="noopener noreferrer"&gt;SwiftUI&lt;/a&gt; in WWDC 2019 that enabled a new way to create user-interface of your iOS app.&lt;/p&gt;

&lt;p&gt;Whenever you create your single view app using SwiftUI, You will get the following basic template of your app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F9fqyrmhzy3rigq7q65ld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F9fqyrmhzy3rigq7q65ld.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
SwiftUI default project structure



&lt;p&gt;Let's discuss more about this all files,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AppDelegate.swift&lt;/strong&gt;&lt;br&gt;
After SwiftUI introduced, Appdelegate is only responsible for setting up external dependency and managing application data(ex. coredata).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SceneDelegate.swift&lt;/strong&gt;&lt;br&gt;
This is something new you can see in a project that is created using SwiftUI. SeceneDelegate is responsible for managing the way your app is shown. This contains the app transition methods that handle the app enter in the foreground, enter in the background, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ContentView.swift&lt;/strong&gt;&lt;br&gt;
This is an initial view of your application. In this file, you can create your app interface using a declarative way. This is equivalent to ViewController that is being generated in the project that is created without using SwiftUI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assets.assets&lt;/strong&gt;&lt;br&gt;
As usual as previous, Assets contain all the images and colors that are used in our project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LaunchScree.storyboard&lt;/strong&gt;&lt;br&gt;
This screen is displayed as a launch screen(splash screen) of your app. Nothing changes the way we setting up the launch screen previously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Info.plist&lt;/strong&gt;&lt;br&gt;
This is a property list file that states all the system related settings like app name, app version, build number, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preview Contain&lt;/strong&gt;&lt;br&gt;
This folder includes one another asset catalog that is used at preview time in canvas.&lt;/p&gt;

&lt;p&gt;Thanks for reading, Happy Holidays 🎅🎄&lt;/p&gt;

</description>
      <category>swift</category>
      <category>swiftui</category>
      <category>ios</category>
      <category>xcode</category>
    </item>
  </channel>
</rss>
