<?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>DEV Community: Rizwan</title>
    <description>The latest articles on DEV Community by Rizwan (@rizzu26).</description>
    <link>https://dev.to/rizzu26</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%2F120891%2Fa4550242-e59a-4fb7-8836-746adcdeefba.JPG</url>
      <title>DEV Community: Rizwan</title>
      <link>https://dev.to/rizzu26</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rizzu26"/>
    <language>en</language>
    <item>
      <title>SwiftUI Import/Export files - Part 2</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Wed, 07 Oct 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/swiftui-import-export-files-part-2-349i</link>
      <guid>https://dev.to/rizzu26/swiftui-import-export-files-part-2-349i</guid>
      <description>&lt;p&gt;There were lots of changes this year during the Xcode and iOS beta. Typically we will get major new features on initial beta and subsequent beta will have only bug fixes. This year is a little bit different, we even got changes to Swift UI at the end of the beta cycle.&lt;/p&gt;

&lt;p&gt;Beta 6 made a change for SwiftUI import/export files. Instead of environment variable now its a modifier. My &lt;a href="https://dev.to/rizzu26/swiftui-import-export-files-18e3"&gt;previous&lt;/a&gt; blog post is outdated and now that Xcode 12 is out, I guess these needs follow up post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importing
&lt;/h2&gt;

&lt;p&gt;To import file, we have to use the &lt;code&gt;fileImporter&lt;/code&gt; modifier. There is no limit where you have to use this modifier. It’s working same as presenting sheets before.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fileImporter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nv"&gt;isPresented&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;viewModel&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isImporting&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nv"&gt;allowedContentTypes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;viewModel&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;importingContentTypes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nv"&gt;allowsMultipleSelection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nv"&gt;onCompletion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;urls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;// you can do with the file urls here&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The parameters were self-explainable. It takes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;code&gt;Binding&amp;lt;Bool&amp;gt;&lt;/code&gt; for presented statues&lt;/li&gt;
&lt;li&gt;an array of content types &lt;code&gt;[UTType]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;a bool to allow multiple selections while importing&lt;/li&gt;
&lt;li&gt;a completion block when the import is success&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Exporting
&lt;/h2&gt;

&lt;p&gt;To export files, we have to use the &lt;code&gt;fileMover&lt;/code&gt; modifier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fileMover&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;isPresented&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;viewModel&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isExporting&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="nv"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;viewModel&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateExportURL&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;File mover takes a &lt;code&gt;Binding&amp;lt;Bool&amp;gt;&lt;/code&gt; for presented status and the URL of the file which needs to be exported.&lt;/p&gt;

&lt;p&gt;In case, if you would like to know a working example, take a look at &lt;a href="https://github.com/Ranchero-Software/NetNewsWire/pull/2384/files"&gt;this&lt;/a&gt; PR I have raised for NetNewsWire app.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>swiftui</category>
    </item>
    <item>
      <title>Tracker Prevention for WKWebView</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Wed, 12 Aug 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/tracker-prevention-for-wkwebview-59fi</link>
      <guid>https://dev.to/rizzu26/tracker-prevention-for-wkwebview-59fi</guid>
      <description>&lt;p&gt;In 2017, Apple WebKit team announced &lt;a href="https://webkit.org/tracking-prevention/"&gt;“Intelligent Trackers Protection”&lt;/a&gt; feature which blocks cross-site trackers and cookies. Slowly WebKit team is adding new features to WebKit and bringing the same to Safari.&lt;/p&gt;

&lt;h2&gt;
  
  
  Safari 14
&lt;/h2&gt;

&lt;p&gt;Safari 14 improves ITP and by default, it will block all the cross-site trackers by using on-device machine learning to identify trackers and the known trackers are identified by DuckDuckGo. Safari not only blocks the trackers, but it will also list all the trackers and websites in detail. Here is the screenshot of all trackers blocked from Safari 14. I have been using it from beta 1.&lt;/p&gt;

&lt;p&gt;&lt;a href="///static/61af2272658ea2680407b37ab9ebe180/71c1d/safari-privacy-report.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7EmRW3Gy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.rizwan.dev/static/61af2272658ea2680407b37ab9ebe180/fcda8/safari-privacy-report.png" alt="Safari Privacy Report" title="Safari Privacy Report"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  WKWebView
&lt;/h2&gt;

&lt;p&gt;The interesting thing with ITP is we (third party developers) can start using it for our in-app browsers which uses &lt;code&gt;WKWebView&lt;/code&gt; without any extra effort. It comes free when you use &lt;code&gt;WKWebView&lt;/code&gt; and you have iOS 14 or macOS Big Sur installed.&lt;/p&gt;

&lt;p&gt;In case if we want to opt-out from this default behaviour, we could simply set the purpose string &lt;code&gt;NSCrossWebsiteTrackingUsageDescription&lt;/code&gt; in &lt;code&gt;Info.plist&lt;/code&gt;. When present, this key causes the application’s Settings screen to display a user control to disable ITP. The setting cannot be read or changed through API calls.&lt;/p&gt;

&lt;p&gt;NOTE: As of beta 4, I couldn’t get the settings even after adding purpose string. Probably it will work on upcoming beta’s&lt;/p&gt;

&lt;p&gt;Incase if the app wants to be &lt;a href="https://developer.apple.com/documentation/xcode/allowing_apps_and_websites_to_link_to_your_content/preparing_your_app_to_be_the_default_browser_or_email_client"&gt;“Default Browser”&lt;/a&gt;, purpose strings is not necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;WebKit App Bound domains &lt;a href="https://webkit.org/blog/10882/app-bound-domains/"&gt;blog post&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Special thanks to &lt;a href="https://twitter.com/stuarticus"&gt;Stuart&lt;/a&gt; who introduced to me this feature in NetNewsWire Slack channel when we discussed having tracker protection for app.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webkit</category>
      <category>swift</category>
      <category>ios</category>
    </item>
    <item>
      <title>SwiftUI Color Scheme</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Wed, 22 Jul 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/swiftui-color-scheme-3f46</link>
      <guid>https://dev.to/rizzu26/swiftui-color-scheme-3f46</guid>
      <description>&lt;p&gt;In UIKit app, If you would like to change the color scheme within the app. Setting &lt;code&gt;UserInterfaceStyle&lt;/code&gt; object to your root window would help.&lt;/p&gt;

&lt;p&gt;Take a look at &lt;a href="https://github.com/Ranchero-Software/NetNewsWire"&gt;NetNewsWire&lt;/a&gt; iOS app. It gives Appearance settings where you can choose your color palette for the app. These are the possible options&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic: respects system color scheme and changes whenever user switching between light and dark mode from the OS&lt;/li&gt;
&lt;li&gt;Light: Light mode for the whole app and didn’t respect the system color scheme&lt;/li&gt;
&lt;li&gt;Dark: dark mode for the whole app and didn’t respect the system color scheme
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;updateUserInterfaceStyle&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="kt"&gt;AppDefaults&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;userInterfaceColorPalette&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;automatic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;!.&lt;/span&gt;&lt;span class="n"&gt;overrideUserInterfaceStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unspecified&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;light&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;!.&lt;/span&gt;&lt;span class="n"&gt;overrideUserInterfaceStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;light&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;dark&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;!.&lt;/span&gt;&lt;span class="n"&gt;overrideUserInterfaceStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dark&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Setting &lt;code&gt;unspecified&lt;/code&gt; makes the app respects the system-wide color scheme here.&lt;/p&gt;

&lt;h2&gt;
  
  
  SwiftUI Way
&lt;/h2&gt;

&lt;p&gt;SwiftUI gives us an environment variable and preferred color scheme modifier to change the color scheme.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;struct&lt;/span&gt; &lt;span class="kt"&gt;ContentView&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;View&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;@State&lt;/span&gt; &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;preferredColorScheme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;ColorScheme&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;

    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;some&lt;/span&gt; &lt;span class="kt"&gt;View&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;List&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kt"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;preferredColorScheme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;light&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kt"&gt;HStack&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="kt"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Light"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="kt"&gt;Spacer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;preferredColorScheme&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;light&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                        &lt;span class="n"&gt;selectedImage&lt;/span&gt;
                    &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="kt"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;preferredColorScheme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dark&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kt"&gt;HStack&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="kt"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Dark"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="kt"&gt;Spacer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;preferredColorScheme&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dark&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                        &lt;span class="n"&gt;selectedImage&lt;/span&gt;
                    &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;InsetGroupedListStyle&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preferredColorScheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preferredColorScheme&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;navigationBarTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"ColorScheme Test"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;selectedImage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;some&lt;/span&gt; &lt;span class="kt"&gt;View&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;systemName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"checkmark"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;foregroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In the above code, we are setting the &lt;code&gt;preferredColorScheme&lt;/code&gt; modifier to our content view and changing it via &lt;code&gt;@State&lt;/code&gt; object. It will give us one view with two options where you can change the color scheme.&lt;/p&gt;

&lt;p&gt;It’s also possible with the environment value like below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;@main&lt;/span&gt;
&lt;span class="kd"&gt;struct&lt;/span&gt; &lt;span class="kt"&gt;ColorSchemeTestApp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;App&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;some&lt;/span&gt; &lt;span class="kt"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;WindowGroup&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kt"&gt;ContentView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;(\&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;colorScheme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can also get to know the currently selected color scheme via environment object like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;@Environment&lt;/span&gt;&lt;span class="p"&gt;(\&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;colorScheme&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;colorScheme&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As of beta 2, there is no way that I can find, to set the &lt;code&gt;colorScheme&lt;/code&gt; to &lt;code&gt;unspecified&lt;/code&gt; to get automatic behaviour. I have even filed a Feedback. In case if you find a way to achieve it, let me know at &lt;a href="https://www.twitter.com/rizzu26"&gt;twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I did create a sample project to explain the behaviour and you can find it &lt;a href="https://github.com/rizwankce/SwiftUIColorSchemeTest"&gt;here&lt;/a&gt; at Github.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.apple.com/documentation/swiftui/environmentvalues/colorscheme"&gt;Color Scheme&lt;/a&gt; Apple documentation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.apple.com/documentation/swiftui/disclosuregroup/preferredcolorscheme(_:)"&gt;Preferred Color Scheme&lt;/a&gt; modifier Apple documenation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/Ranchero-Software/NetNewsWire"&gt;NetNewsWire&lt;/a&gt; project on Github&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>swift</category>
      <category>swiftui</category>
    </item>
    <item>
      <title>SwiftUI Import/Export files</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Sat, 18 Jul 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/swiftui-import-export-files-18e3</link>
      <guid>https://dev.to/rizzu26/swiftui-import-export-files-18e3</guid>
      <description>&lt;p&gt;As discussed on my previous blog &lt;a href="https://blog.rizwan.dev/blog/learning-swiftui-with-netnewswire"&gt;post&lt;/a&gt;, kickstarting my learnings from contributing to SwiftUI open source project.In this blog post, I try to explain what I have come across very recently which was missed out during WWDC and impressed when I came to know about it. It’s about import and exporting files.&lt;/p&gt;

&lt;p&gt;In traditional UIKit, whenever you want to export or import files. We have to rely on &lt;code&gt;UIDocumentPickerViewController&lt;/code&gt;.Here is the sample code from &lt;a href="https://github.com/Ranchero-Software/NetNewsWire"&gt;NetNewsWire&lt;/a&gt; iOS app where we try to export and import OPML files.&lt;/p&gt;

&lt;h3&gt;
  
  
  Importing files
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;docPicker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIDocumentPickerViewController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;documentTypes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;opmlUTIs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;import&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;docPicker&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;
&lt;span class="n"&gt;docPicker&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;modalPresentationStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;formSheet&lt;/span&gt;
&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;present&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;docPicker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;animated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Above code will present a document picker and user can select any OPML files from the Files app.&lt;/p&gt;

&lt;h3&gt;
  
  
  Exporting files
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;docPicker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIDocumentPickerViewController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tempFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exportToService&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;docPicker&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;modalPresentationStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;formSheet&lt;/span&gt;
&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;present&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;docPicker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;animated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Above code will present a document picker and user can export the OPML files to the Files app.&lt;/p&gt;

&lt;h1&gt;
  
  
  SwiftUI way
&lt;/h1&gt;

&lt;p&gt;We saw what it takes to import and export files in UIKit. But in SwiftUI all it takes is one environment object.By utilising the all new export and import files environment values we could easily add support to our SwiftUI apps for import/export functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;At first, define the environment object on your &lt;code&gt;View&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;@Environment&lt;/span&gt;&lt;span class="p"&gt;(\&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exportFiles&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;exportAction&lt;/span&gt;
&lt;span class="kd"&gt;@Environment&lt;/span&gt;&lt;span class="p"&gt;(\&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;importFiles&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;importAction&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2
&lt;/h3&gt;

&lt;p&gt;Use the environment variable to export or import files. As like UIKit importing action needs file types and exporting action needs the temporary file urls.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// consider you have file temporary url&lt;/span&gt;
&lt;span class="nf"&gt;exportAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;moving&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;importAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;multipleOfType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="kt"&gt;Error&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;?)&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;urls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// you can do with the file urls here&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It’s also possible to import/export multiple files.&lt;/p&gt;

&lt;p&gt;Check out more on my &lt;a href="https://github.com/Ranchero-Software/NetNewsWire/pull/2204/files"&gt;PR on Github&lt;/a&gt; for how it works on NetNewsWire app.&lt;/p&gt;

&lt;h1&gt;
  
  
  UniformTypeIdenfiers
&lt;/h1&gt;

&lt;p&gt;SwiftUI also comes with a new framework for all &lt;code&gt;UTTypes&lt;/code&gt; and it’s called &lt;code&gt;UniformTypeIdentifiers&lt;/code&gt;. This also helps us to define what kind of files we can choose from. It comes with predefined files types and you can find all the system declared types &lt;a href="https://developer.apple.com/documentation/uniformtypeidentifiers/uttype/system_declared_types"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For any specific case, we can also create our own &lt;code&gt;UTType&lt;/code&gt; with file extensions as well. Here is the code to select only OPML files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UTType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;filenameExtension&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"opml"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;Check out more info on Apple documentation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.apple.com/documentation/swiftui/importfilesaction"&gt;Import files action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.apple.com/documentation/swiftui/exportfilesaction"&gt;Export files action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.apple.com/documentation/uniformtypeidentifiers"&gt;UniformTypeIdentifiers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>swift</category>
      <category>swiftui</category>
    </item>
    <item>
      <title>Learning SwiftUI with NetNewsWire</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Fri, 17 Jul 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/learning-swiftui-with-netnewswire-4pdh</link>
      <guid>https://dev.to/rizzu26/learning-swiftui-with-netnewswire-4pdh</guid>
      <description>&lt;p&gt;After the release of SwiftUI 2.0 on WWDC 2020, I got excited and want to learn more about it. What is better than learning a new tech by building a real-world app? Here it goes my learnings…&lt;/p&gt;

&lt;h2&gt;
  
  
  NetNewsWire
&lt;/h2&gt;

&lt;p&gt;I got the chance to learn SwiftUI from an open-source project called &lt;a href="https://github.com/Ranchero-Software/NetNewsWire"&gt;NetNewsWire&lt;/a&gt;. It’s an RSS reader app for iOS, iPadOS and macOS. Build with UIKit/AppKit.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Shameless plug:- It’s a cool app, you should check it out&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After the WWDC, contributors to the project had a zoom call and decided to hope on the SwiftUI train. It’s not new for the team. They have already burnt the hand by investing some time last year when the SwiftUI 1.0 was released. For &lt;a href="https://inessential.com/2019/10/21/swiftui_is_still_the_future"&gt;various reasons&lt;/a&gt; the team had to stop and rollback everything done on SwiftUI. Since there are lots of improvements on 2.0, we have decided to try it to build the existing multi-platform app with the all-new SwiftUI multiplatform.&lt;/p&gt;

&lt;p&gt;The whole team is ramping up with the latest cool beta things and I learnt a ton by implementing some small set of features on the Settings screen for iOS/iPadOS. One of my goals, when I started learning, is to share what I have learnt via blog posts. So I’m gonna kick start a set of blog posts which explains specific new features from SwiftUI 2.0.&lt;/p&gt;

&lt;p&gt;The whole NetNewsWire community is great and I like to thank &lt;a href="https://twitter.com/brentsimmons"&gt;Brent Simmons&lt;/a&gt; for creating this project and making it open-source, &lt;a href="https://twitter.com/vincode_io"&gt;Maurice Parker&lt;/a&gt;,&lt;a href="https://twitter.com/stuarticus"&gt;Stuart&lt;/a&gt; for helping me and correct my direction whenever I lost in track, and all other &lt;a href="https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors"&gt;contributors&lt;/a&gt; and users. If you would like to join, please check out our &lt;a href="https://ranchero.com/netnewswire/slack"&gt;slack&lt;/a&gt; group. Everybody is welcome and encouraged to join.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>swiftui</category>
    </item>
    <item>
      <title>Blank SFSafariViewController</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Mon, 08 Jun 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/blank-sfsafariviewcontroller-4c5n</link>
      <guid>https://dev.to/rizzu26/blank-sfsafariviewcontroller-4c5n</guid>
      <description>&lt;p&gt;Recently We got continuous report from our clients saying they were getting blank In-App browser (&lt;code&gt;SFSafariViewController&lt;/code&gt;) instead of the web page it was intended to show. After a little bit of debugging I figured out that It was actually bug from iOS side.&lt;/p&gt;

&lt;p&gt;There is even a radar about it which you can find &lt;a href="http://openradar.appspot.com/22972440"&gt;here&lt;/a&gt;. Looks like it was intentionally done by Apple. Here is the response from the radar&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is done to ensure SafariViewController can’t be used for loading content offscreen.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In our app, we don’t actually load anything offscreen. There could be some delay to present the &lt;code&gt;SFSafariViewController&lt;/code&gt;. These are the possible fix I found on the internet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make a delay before presenting the view controller&lt;/li&gt;
&lt;li&gt;Load the view before in hand&lt;/li&gt;
&lt;li&gt;Make the current window as key window&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adding delay is not user friendly so let’s not look into that.Loading view before in hand works on some cases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;controller&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;SFSafariViewController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt; &lt;span class="c1"&gt;// load the view before in hand&lt;/span&gt;
&lt;span class="nf"&gt;present&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;animated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Other option would be make the current window as key window (only incase if you use multiple windows)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;window&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;
&lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;makeKey&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;controller&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;SFSafariViewController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;
&lt;span class="nf"&gt;present&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;animated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;What actually works for my case is to present the &lt;code&gt;SFSafariViewController&lt;/code&gt; from key window root view controller instead of some view controller in the view hierarchy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight swift"&gt;&lt;code&gt; &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;openUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="nv"&gt;urlString&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="nv"&gt;viewController&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;UIViewController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;Swift&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;Void&lt;/span&gt;&lt;span class="p"&gt;)?&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;string&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;urlString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;showIncorrectUrlAlert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;urlString&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;viewController&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;vc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;SFSafariViewController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;vc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;viewController&lt;/span&gt; &lt;span class="k"&gt;as?&lt;/span&gt; &lt;span class="kt"&gt;SFSafariViewControllerDelegate&lt;/span&gt;
    &lt;span class="c1"&gt;// Present with window root view controller to avoid blank SFSafariViewController&lt;/span&gt;
    &lt;span class="n"&gt;keyWindow&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rootViewController&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;present&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;animated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;My guess for this issue or fix would be disconnected view when you push safari view controller that causes window changes.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>ios</category>
      <category>apple</category>
    </item>
    <item>
      <title>Kotlin and Android Native</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Fri, 05 Jun 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/kotlin-and-android-native-26jb</link>
      <guid>https://dev.to/rizzu26/kotlin-and-android-native-26jb</guid>
      <description>&lt;p&gt;Long time iOS developer, but never actually tried anything in Android world. Though I Worked on the cross-platform stack and tried out Android Studio before but never tried to learn Android Native Development. Always I hear about Android X, app compatibility and Gradle build from my colleagues. Even I went into a rabbit hole of upgrading React Native version and stuck because It’s breaking the whole project due to the need for AndroidX support.&lt;/p&gt;

&lt;h2&gt;
  
  
  30DaysOfKotlin
&lt;/h2&gt;

&lt;p&gt;Last May, when everyone was under lockdown and I saw a tweet about #30DaysOfKotlin. It’s an online Bootcamp program which teaches Kotlin and Android Native development with a series of Offical tutorials (called Codelabs) and webinar from Google. I registered immediately. Then days passed I never got the chance to go through the code labs but watched the first live stream webinar and which got me some interest about Kotlin because of the similarity between Swift and Kotlin. Then I went through the code labs for “Kotlin for Beginners” and “Android Kotlin fundamentals”.&lt;/p&gt;

&lt;p&gt;As part of the program, I had to develop something on Kotlin and submit before June 6th 2020. Since all the modern apps are pretty much JSON viewer with better UX. I decided to build an app which consumes some sort of REST web service and build a minimal but functional app in the given time.&lt;/p&gt;

&lt;h2&gt;
  
  
  DevCast
&lt;/h2&gt;

&lt;p&gt;DevCast - A developer-focused podcast app which is using Offical APIs from &lt;a href="https://dev.to"&gt;dev.to&lt;/a&gt;. It has two screens, one to list the recent episodes and one for more details. The whole project itself open sourced and can be found &lt;a href="https://github.com/rizwankce/DevCast"&gt;here&lt;/a&gt;. Project is released under MIT License so you can do anything with it.&lt;/p&gt;

&lt;p&gt;Here is the screenshots of the app. It has two screens, where first screen lists all the latest episodes from differnet podcast and second screen show the details of the selected episode.&lt;/p&gt;

&lt;p&gt;&lt;a href="///static/d1ebebe8d553c95f871e47caf704639d/267f6/DevCast_screenshots.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hijZM0qw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.rizwan.dev/static/d1ebebe8d553c95f871e47caf704639d/267f6/DevCast_screenshots.png" alt="DevCast App Screenshots" title="DevCast App Screenshots"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are some links where I learnt most about Kotlin and Android Native development. Incase if you would like to start your journey like me.&lt;/p&gt;

&lt;h3&gt;
  
  
  Google Codelabs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/courses/kotlin-bootcamp/overview?utm_source=week1&amp;amp;utm_medium=email&amp;amp;utm_campaign=30DaysOfKotlin&amp;amp;utm_term=Basic"&gt;Kotlin Bootcamp for beginners&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/courses/kotlin-android-fundamentals/overview?utm_source=week1&amp;amp;utm_medium=email&amp;amp;utm_campaign=30DaysOfKotlin&amp;amp;utm_term=Intermediate"&gt;Android Kotlin Fundamentals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/courses/kotlin-android-advanced/overview?utm_source=week1&amp;amp;utm_medium=email&amp;amp;utm_campaign=30DaysOfKotlin&amp;amp;utm_term=Advanced"&gt;Advanced Android in Kotlin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://eventsonair.withgoogle.com/events/kotlin/resources"&gt;All Kotlin resources from Google Codelabs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Others
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.raywenderlich.com/10529094-android-bootcamp"&gt;Andriod Bootcamp by Raywenderlich&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=gDEGd174K_Q&amp;amp;list=WL&amp;amp;index=42&amp;amp;t=0s"&gt;Andriod Crash Course for iOS developers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>kotlin</category>
      <category>30daysofkotlin</category>
    </item>
    <item>
      <title>TestFlight Review Times</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Wed, 03 Jun 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/testflight-review-times-476p</link>
      <guid>https://dev.to/rizzu26/testflight-review-times-476p</guid>
      <description>&lt;p&gt;If you ever submitted an app update recently to TestFlight review on App Store Connect, you know the time take to get it approved. It was the case for even App Store app updates some time back. Recently Apple is improving the total time taken for review resulting in one day review time (some developers from US time zone can get even less then an hour)&lt;/p&gt;

&lt;p&gt;At my work, we do have multiple beta groups and most of the time a new update would take more then 2 days to get it reviewed for TestFlight. Its doesn’t work for urgent release. So we changed the release process little bit different and always keep the TestFlight app updates near instant.  &lt;/p&gt;

&lt;p&gt;The way TestFlight update works is every new version update has to go to review and every build on the same version is apporved immediately.&lt;/p&gt;

&lt;p&gt;So whenever we released a version to App Store, immediately we submit the same build again for TestFlight app review by bumping the version number. By the time we finish developing the app update, the initial version submitted to review would be approved and submitting second build on same version would get approved immediately.&lt;/p&gt;

&lt;p&gt;For example, after releasing v5.0 to App Store, try submitting v5.1 (or whatever version on your pipeline) with the same build as v5.0. Only change here is version number. By the time you actually wants to push v5.1 for your beta testers. Just bump the build number and submit. It will be approved immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="///static/cb1a6f8cb921c9165dfd1abd739562c1/3c024/test-flight-review-diagram.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FEeRGmUh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.rizwan.dev/static/cb1a6f8cb921c9165dfd1abd739562c1/3c024/test-flight-review-diagram.png" alt="TestFlight Review Time Process" title="TestFlight Review Time Process"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Above works fine as of dated. Who knows WWDC 2020 might have some improvements.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>swift</category>
      <category>apple</category>
      <category>ios</category>
      <category>testflight</category>
    </item>
    <item>
      <title>WWDC 2020 Wish-list</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Fri, 22 May 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/rizzu26/wwdc-2020-wish-list-4894</link>
      <guid>https://dev.to/rizzu26/wwdc-2020-wish-list-4894</guid>
      <description>&lt;p&gt;I wrote my thoughts on WWDC 2020 wish-list on twitter. Here is the list not in any particular order but hope to see it in real.&lt;/p&gt;

&lt;p&gt;Also, did I tell you? This will be my first ever WWDC. Since It’s online and free for everyone.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--i8apn3lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1143112129655873541/6FHDrvnJ_normal.jpg" alt="Rizwan profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Rizwan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/rizzu26"&gt;@rizzu26&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Here are the wish list or expectation for WWDC 2020. &lt;br&gt;&lt;br&gt;First of all Xcode release but stable just like iOS 12 to clean up all the mess from iOS 11
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:19 PM - 07 May 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1258537074556194818" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1258537074556194818" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1258537074556194818" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--i8apn3lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1143112129655873541/6FHDrvnJ_normal.jpg" alt="Rizwan profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Rizwan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/rizzu26"&gt;@rizzu26&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      AppStore connect CI. Don’t know what happend to &lt;a href="https://twitter.com/buddybuild"&gt;@buddybuild&lt;/a&gt; after Apple acquisition. So hoping we can see something this year
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:20 PM - 07 May 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1258537254894485504" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1258537254894485504" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1258537254894485504" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--i8apn3lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1143112129655873541/6FHDrvnJ_normal.jpg" alt="Rizwan profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Rizwan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/rizzu26"&gt;@rizzu26&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Updates for swiftUI, ARKit and ML - usual boring demos
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:21 PM - 07 May 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1258537413271416832" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1258537413271416832" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1258537413271416832" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--i8apn3lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1143112129655873541/6FHDrvnJ_normal.jpg" alt="Rizwan profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Rizwan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/rizzu26"&gt;@rizzu26&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      iPadOS spring board improvements. I’m talking widgets and customisations
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:21 PM - 07 May 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1258537588513619968" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1258537588513619968" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1258537588513619968" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--i8apn3lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1143112129655873541/6FHDrvnJ_normal.jpg" alt="Rizwan profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Rizwan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/rizzu26"&gt;@rizzu26&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      APIs from AVFoundation to access three camera simultaneously. Raw capture on all cams including wide angle.
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:25 PM - 07 May 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1258538534295621633" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1258538534295621633" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1258538534295621633" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--i8apn3lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1143112129655873541/6FHDrvnJ_normal.jpg" alt="Rizwan profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Rizwan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/rizzu26"&gt;@rizzu26&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Filters for TestFlight feedback’s. Over all improvements on TestFlight.
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:26 PM - 07 May 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1258538768350375937" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1258538768350375937" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1258538768350375937" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--i8apn3lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1143112129655873541/6FHDrvnJ_normal.jpg" alt="Rizwan profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Rizwan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/rizzu26"&gt;@rizzu26&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      App Store connect optimised for mobile. In case if App Store connect don’t have all the functionalities. Better to make website mobile friendly.
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      12:42 PM - 11 May 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1259826268444307456" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1259826268444307456" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1259826268444307456" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


</description>
      <category>swift</category>
      <category>apple</category>
      <category>wwdc</category>
      <category>wwdc2020</category>
    </item>
    <item>
      <title>Hidden messages from Advent Of Code challenge</title>
      <dc:creator>Rizwan</dc:creator>
      <pubDate>Mon, 02 Dec 2019 11:00:18 +0000</pubDate>
      <link>https://dev.to/rizzu26/hidden-messages-from-advent-of-code-challenge-2ba5</link>
      <guid>https://dev.to/rizzu26/hidden-messages-from-advent-of-code-challenge-2ba5</guid>
      <description>&lt;p&gt;Incase if you don't know &lt;a href="https://adventofcode.com"&gt;Advent Of Code&lt;/a&gt; is a small programming puzzles which can be solved in any programming language of your choice. It runs throughout the December and each day the complexity will increase.&lt;/p&gt;

&lt;p&gt;This year the over all theme was about Santa on some other planet and how we help him to reach earth on time for Christmas. I started little late on Day 2 and tried to catch up all 4 puzzles.&lt;/p&gt;

&lt;p&gt;Interesting thing I found today is one of the puzzle input was to figure out the input values to get output as &lt;code&gt;19690720&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you look closely to the value it's actually a Date - &lt;code&gt;1960/07/20&lt;/code&gt;. Which is the exact date of Apollo Moon landing. 🤯 Also lots of keywords and things used on Apollo Guidance computer like Noun and Verb. Never expected hidden messages from the puzzle. Good Job for the Apollo nostalgia &lt;a href="https://twitter.com/ericwastl"&gt;Eric Wastl&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S: If you are following the advent calendar and wanted to check my solution in swift, you can check at this &lt;a href="https://github.com/rizwankce/AdventOfCode"&gt;repo&lt;/a&gt; on Github. I will try to push it to GitHub whenever I found a solution.&lt;/p&gt;

</description>
      <category>adventofcode</category>
      <category>swift</category>
      <category>adventofcode2019</category>
    </item>
  </channel>
</rss>
