[오류] no bundle url present react native ios

34 PM

디바이스에서는 문제 없이 빌드가 잘 되는데 유독 시뮬레이터에서만 packager가 동작하지 않고 위의 화면만 뿜어 댔는데 이유를 찾아보니…

infp.plist의 NSExceptionAllowsInsecureHTTPLoads 값이 동작하지 않았었더군요.
아래와 같은 실수로 덮어 씌우는 실수를 해버렸네요. 전의 NSExceptionDomains를 한번 더 설정해 버리는 통에
앞의 NSExceptionDomain를 덮어버리는 실수를 저질러 버렸네요. 사실 xcode로 추가했으면 실수 하지 않을 문제였을텐데…

어이 없어서 공유해봅니다.

수정 전(실수 부분)

<key>NSExceptionDomains</key>
<dict>
  <key>localhost</key>
  <dict>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <true/>
  </dict>
</dict>
<key>NSExceptionDomains</key>
<dict>
  <key>g1dev.xxx.com</key>
  <dict>
    <!--Include to allow subdomains-->
    <key>NSIncludesSubdomains</key>
    <true/>
    <!--Include to allow HTTP requests-->
    <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
    <true/>
    <!--Include to specify minimum TLS version-->
    <key>NSTemporaryExceptionMinimumTLSVersion</key>
    <string>TLSv1.1</string>
  </dict>
</dict>

수정 후

<key>NSExceptionDomains</key>
<dict>
  <key>localhost</key>
  <dict>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <true/>
  </dict>
  <key>g1dev.xxx.com</key>
  <dict>
    <!--Include to allow subdomains-->
    <key>NSIncludesSubdomains</key>
    <true/>
    <!--Include to allow HTTP requests-->
    <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
    <true/>
    <!--Include to specify minimum TLS version-->
    <key>NSTemporaryExceptionMinimumTLSVersion</key>
    <string>TLSv1.1</string>
  </dict>
</dict>
2개의 좋아요