<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>hey_dohyunee.log</title>
        <link>https://velog.io/</link>
        <description>프론트엔드 개발자(React, Flutter)</description>
        <lastBuildDate>Sun, 01 Oct 2023 15:06:06 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>hey_dohyunee.log</title>
            <url>https://velog.velcdn.com/images/hey_dohyunee/profile/758b097a-1374-4d6b-9b67-c74cd5b51efa/image.png</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. hey_dohyunee.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/hey_dohyunee" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[macOS 14 + Xcode 15 업데이트]]></title>
            <link>https://velog.io/@hey_dohyunee/macOS-14-Xcode-15-%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8</link>
            <guid>https://velog.io/@hey_dohyunee/macOS-14-Xcode-15-%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8</guid>
            <pubDate>Sun, 01 Oct 2023 15:06:06 GMT</pubDate>
            <description><![CDATA[<p>업데이트 후 앱을 빌드해보니 에러가 났다.</p>
<pre><code class="language-bash">Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead</code></pre>
<p>iOS의 최소 빌드 버전이 12로 올라가면서 생긴 에러였고,
일주일전에 Xcode 15와 호환이 되도록 CocoaPods 1.13.0이 release 된 것을 확인했다.</p>
<h3 id="update-cocoapods">Update CocoaPods</h3>
<p>[CocoaPods 버전 확인]</p>
<blockquote>
<p>pod --version</p>
</blockquote>
<p>[CocoaPods 버전 업데이트]</p>
<blockquote>
<p>sudo gem install cocoapods</p>
</blockquote>
<p>[CocoaPods 버전 강제 업데이트]</p>
<blockquote>
<p>sudo gem install cocoapods --pre</p>
</blockquote>
<p>버전 업데이트는 successful 했다는 안내 문구가 뜨는데, 버전을 확인하면 계속해서 이전 버전을 보여주었다.</p>
<p>CocoaPods는 Ruby 기반의 도구인데, 문제는 Ruby가 너무 예전 버전이었다. (그동안은 쭉 2.6 버전의 시스템 Ruby를 사용하고 있었다.)</p>
<h3 id="update-ruby">Update Ruby</h3>
<p>[Ruby 버전 확인]</p>
<blockquote>
<p>ruby -v</p>
</blockquote>
<p>[Ruby 업데이트]</p>
<blockquote>
<p>brew install ruby</p>
</blockquote>
<p>zshrc에서 관련 $PATH 환경 변수 설정이 필요하다.</p>
<blockquote>
<p>open -e ~/.zshrc</p>
</blockquote>
<p>그런데, 공식 문서 가이드대로 따라하면 (<a href="https://mac.install.guide/ruby/13.html">https://mac.install.guide/ruby/13.html</a>)</p>
<pre><code class="language-bash">arch: posix_spawnp: pod: Bad CPU type in executable</code></pre>
<p>이러한 에러가 발생하여(macOS에서 애플리케이션의 아키텍처 불일치로 인해 발생하는 에러인데, 왜 발생하는지 이유를 찾을 수 없었다.)</p>
<p><a href="https://stackoverflow.com/questions/12287882/installing-ruby-with-homebrew">https://stackoverflow.com/questions/12287882/installing-ruby-with-homebrew</a>
를 참고하여 <strong>zshrc의 최상단을</strong> 아래와 같이 수정해주었다.</p>
<blockquote>
<p>export PATH=/opt/homebrew/bin:$PATH
export LDFLAGS=&quot;-L/opt/homebrew/opt/ruby/lib&quot;
export CPPFLAGS=&quot;-I/opt/homebrew/opt/ruby/include&quot;</p>
</blockquote>
<p>[zshrc 업데이트 사항 적용]</p>
<blockquote>
<p>source ~/.zshrc</p>
</blockquote>
<p><img src="https://velog.velcdn.com/images/hey_dohyunee/post/d738db7e-384f-4231-84ab-878b323a9184/image.png" alt=""></p>
<p>이후 다시 Android Studio에 들어오면 Ruby와 CocoaPods의 버전이 업데이트된 것을 확인할 수 있다.</p>
<h3 id="app-crashes-when-using-the-impeller-rendering-backend">App crashes when Using the Impeller rendering backend</h3>
<p>이제 다 된 줄 알고 앱을 실행해 보니 아래와 같이 에러 문구가 뜨고 그냥 앱이 꺼졌다.</p>
<pre><code class="language-bash">(lldb) 2023-10-01 23:48:30.911201+0900 Runner[1401:1182449] [VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(37)] Using the Impeller rendering backend.
* thread #1, queue = &#39;com.apple.main-thread&#39;, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
Target 0: (Runner) stopped.
Error launching application on 아이폰8.</code></pre>
<p>Podfile의 최하단을 아래와 같이 수정하였다.</p>
<pre><code>post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)

    target.build_configurations.each do |config|
      config.build_settings[&#39;IPHONEOS_DEPLOYMENT_TARGET&#39;] = &#39;12.0&#39;
...</code></pre><p>결국은 iOS 12로 직접 명시해 주었지만, 임시적인 방법이라는 생각이 든다.</p>
<h3 id="flutter-doctor">Flutter Doctor</h3>
<pre><code class="language-bash">[✓] Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.82.2)
[✓] Connected device (4 available)
[✓] Network resources
</code></pre>
<h3 id="참고">참고</h3>
<ul>
<li><a href="https://github.com/CocoaPods/CocoaPods/issues/12065">https://github.com/CocoaPods/CocoaPods/issues/12065</a></li>
<li><a href="https://mac.install.guide/ruby/13.html">https://mac.install.guide/ruby/13.html</a></li>
<li><a href="https://stackoverflow.com/questions/12287882/installing-ruby-with-homebrew">https://stackoverflow.com/questions/12287882/installing-ruby-with-homebrew</a></li>
<li><a href="https://github.com/flutter/flutter/issues/135154">https://github.com/flutter/flutter/issues/135154</a></li>
<li><a href="https://github.com/fluttercommunity/plus_plugins/issues/2152">https://github.com/fluttercommunity/plus_plugins/issues/2152</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[(lldb) warning: libobjc.A.dylib is being read from process memory.]]></title>
            <link>https://velog.io/@hey_dohyunee/lldb-warning-libobjc.A.dylib-is-being-read-from-process-memory</link>
            <guid>https://velog.io/@hey_dohyunee/lldb-warning-libobjc.A.dylib-is-being-read-from-process-memory</guid>
            <pubDate>Wed, 27 Sep 2023 17:54:01 GMT</pubDate>
            <description><![CDATA[<h3 id="예상-결과">예상 결과</h3>
<p>긴 대기 시간 없이 앱이 정상 빌드</p>
<h3 id="실제-결과">실제 결과</h3>
<p>오랜 대기 시간 후 앱이 실행</p>
<p>관련 로그</p>
<pre><code class="language-bash">(lldb) warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance.

The Dart VM Service was not discovered after 30 seconds. This is taking much longer than expected...</code></pre>
<h3 id="해결">해결</h3>
<ol>
<li>터미널에 아래 명령어로 관련 폴더 제거<pre><code class="language-bash">rm -r ~/Library/Developer/Xcode/iOS\ DeviceSupport</code></pre>
</li>
<li>Xcode &gt; Product &gt; Destination &gt; Manage Run Destinations... &gt; 현재 Conntected 되어있는 기기 우클릭 &gt; Unpair Device</li>
<li>기기가 이 컴퓨터를 신뢰하는지 묻는 메시지를 표시할 때까지 잠시 기다렸다가 신뢰를 선택</li>
<li>기기가 다시 Xcode 목록에 나타나게됨</li>
</ol>
<h3 id="참고">참고</h3>
<ul>
<li><a href="https://stackoverflow.com/questions/72598348/xcode-14-beta-build-issues-with-lldb">https://stackoverflow.com/questions/72598348/xcode-14-beta-build-issues-with-lldb</a></li>
<li><a href="https://github.com/flutter/flutter/issues/126588">https://github.com/flutter/flutter/issues/126588</a></li>
</ul>
]]></description>
        </item>
    </channel>
</rss>