<?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: Passakorn Choosuk</title>
    <description>The latest articles on DEV Community by Passakorn Choosuk (@passakornc).</description>
    <link>https://dev.to/passakornc</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%2F450484%2F7c0ddc57-6acd-4f4c-88e2-9a948625580c.jpeg</url>
      <title>DEV Community: Passakorn Choosuk</title>
      <link>https://dev.to/passakornc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/passakornc"/>
    <language>en</language>
    <item>
      <title>[HowTo] enable Local Network Privacy Permissions on iOS14+</title>
      <dc:creator>Passakorn Choosuk</dc:creator>
      <pubDate>Mon, 25 Oct 2021 17:08:07 +0000</pubDate>
      <link>https://dev.to/passakornc/howto-enable-local-network-privacy-permissions-on-ios14-4ld4</link>
      <guid>https://dev.to/passakornc/howto-enable-local-network-privacy-permissions-on-ios14-4ld4</guid>
      <description>&lt;h2&gt;
  
  
  [Problem]
&lt;/h2&gt;

&lt;p&gt;After trying to launch my-flutter-app on iOS14 iPhone, then it displayed an issue about &lt;em&gt;Failed to register observatory port with mDNS&lt;/em&gt;. This is the full error message in the console&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&lt;br&gt;
 Failed to register observatory port with mDNS with error -65555.&lt;br&gt;
[VERBOSE-2:FlutterObservatoryPublisher.mm(103)] On iOS 14+, local network broadcast in apps need to be declared in the app's Info.plist. Debug and profile Flutter apps and modules host VM services on the local network to support debugging features such as hot reload and DevTools. To make your Flutter app or module attachable and debuggable, add a '_dartobservatory._tcp' value to the 'NSBonjourServices' key in your Info.plist for the Debug/Profile configurations. For more information, see &lt;a href="https://flutter.dev/docs/development/add-to-app/ios/project-setup#local-network-privacy-permissions" rel="noopener noreferrer"&gt;https://flutter.dev/docs/development/add-to-app/ios/project-setup#local-network-privacy-permissions&lt;/a&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  [Solution]&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;From the link above, we just follow the instruction and the problem will be solved.&lt;br&gt;
1 Rename Info.plist to Info-Debug.plist and copy this file to create a new file called Info-Release.plist&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpbhz6zqb2jdnioxv0oey.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpbhz6zqb2jdnioxv0oey.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2 Open Runner.xcworkspace with Xcode and remove Info.plist then add Info-Debug.plist and Info-Release.plist&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4tmkryvk91xs3dmeurax.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4tmkryvk91xs3dmeurax.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3 Add key &lt;em&gt;NSBonjourServices&lt;/em&gt; with value &lt;em&gt;_dartobservatory._tcp&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faqpsdiimw1yuy72veank.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faqpsdiimw1yuy72veank.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4 Change Info.plist file to &lt;em&gt;Runner/Info-$(CONFIGURATION).plist&lt;/em&gt; from &lt;em&gt;Runner/Info.plist&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvipm0jgmb410vh9viyip.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvipm0jgmb410vh9viyip.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5 Delete Info-Release.plist in Build Phase menu&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjy3bltycy4jy96mfiu4y.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjy3bltycy4jy96mfiu4y.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6 Run the app again and there is no compliant about local network permission anymore&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>ios</category>
    </item>
  </channel>
</rss>
